|
| 1 | +//.jshintrc |
| 2 | +{ |
| 3 | + // JSHint Meteor Configuration File |
| 4 | + // Match the Meteor Style Guide |
| 5 | + // |
| 6 | + // By @raix with contributions from @aldeed and @awatson1978 |
| 7 | + // Source https://github.com/raix/Meteor-jshintrc |
| 8 | + // |
| 9 | + // See http://jshint.com/docs/ for more details |
| 10 | + |
| 11 | + "maxerr" : 50, // {int} Maximum error before stopping |
| 12 | + |
| 13 | + // Enforcing |
| 14 | + "bitwise" : true, // true: Prohibit bitwise operators (&, |, ^, etc.) |
| 15 | + "camelcase" : true, // true: Identifiers must be in camelCase |
| 16 | + // "curly" : true, // true: Require {} for every new block or scope |
| 17 | + "eqeqeq" : true, // true: Require triple equals (===) for comparison |
| 18 | + "forin" : true, // true: Require filtering for..in loops with obj.hasOwnProperty() |
| 19 | + "immed" : false, // true: Require immediate invocations to be wrapped in parens e.g. `(function () { } ());` |
| 20 | + "indent" : 2, // {int} Number of spaces to use for indentation |
| 21 | + "latedef" : false, // true: Require variables/functions to be defined before being used |
| 22 | + "newcap" : false, // true: Require capitalization of all constructor functions e.g. `new F()` |
| 23 | + "noarg" : true, // true: Prohibit use of `arguments.caller` and `arguments.callee` |
| 24 | + "noempty" : true, // true: Prohibit use of empty blocks |
| 25 | + "nonew" : false, // true: Prohibit use of constructors for side-effects (without assignment) |
| 26 | + "plusplus" : false, // true: Prohibit use of `++` & `--` |
| 27 | + "quotmark" : false, // Quotation mark consistency: |
| 28 | + // false : do nothing (default) |
| 29 | + // true : ensure whatever is used is consistent |
| 30 | + // "single" : require single quotes |
| 31 | + // "double" : require double quotes |
| 32 | + "undef" : true, // true: Require all non-global variables to be declared (prevents global leaks) |
| 33 | + "unused" : true, // true: Require all defined variables be used |
| 34 | + "strict" : false, // true: Requires all functions run in ES5 Strict Mode |
| 35 | + "trailing" : true, // true: Prohibit trailing whitespaces |
| 36 | + "maxparams" : false, // {int} Max number of formal params allowed per function |
| 37 | + "maxdepth" : false, // {int} Max depth of nested blocks (within functions) |
| 38 | + "maxstatements" : false, // {int} Max number statements per function |
| 39 | + "maxcomplexity" : false, // {int} Max cyclomatic complexity per function |
| 40 | + "maxlen" : false, // {int} Max number of characters per line |
| 41 | + |
| 42 | + // Relaxing |
| 43 | + "asi" : false, // true: Tolerate Automatic Semicolon Insertion (no semicolons) |
| 44 | + "boss" : false, // true: Tolerate assignments where comparisons would be expected |
| 45 | + "debug" : false, // true: Allow debugger statements e.g. browser breakpoints. |
| 46 | + "eqnull" : false, // true: Tolerate use of `== null` |
| 47 | + "es5" : false, // true: Allow ES5 syntax (ex: getters and setters) |
| 48 | + "esnext" : false, // true: Allow ES.next (ES6) syntax (ex: `const`) |
| 49 | + "moz" : false, // true: Allow Mozilla specific syntax (extends and overrides esnext features) |
| 50 | + // (ex: `for each`, multiple try/catch, function expression…) |
| 51 | + "evil" : false, // true: Tolerate use of `eval` and `new Function()` |
| 52 | + "expr" : false, // true: Tolerate `ExpressionStatement` as Programs |
| 53 | + "funcscope" : false, // true: Tolerate defining variables inside control statements" |
| 54 | + "globalstrict" : true, // true: Allow global "use strict" (also enables 'strict') |
| 55 | + "iterator" : false, // true: Tolerate using the `__iterator__` property |
| 56 | + "lastsemic" : false, // true: Tolerate omitting a semicolon for the last statement of a 1-line block |
| 57 | + "laxbreak" : false, // true: Tolerate possibly unsafe line breakings |
| 58 | + "laxcomma" : false, // true: Tolerate comma-first style coding |
| 59 | + "loopfunc" : false, // true: Tolerate functions being defined in loops |
| 60 | + "multistr" : false, // true: Tolerate multi-line strings |
| 61 | + "proto" : false, // true: Tolerate using the `__proto__` property |
| 62 | + "scripturl" : false, // true: Tolerate script-targeted URLs |
| 63 | + "smarttabs" : false, // true: Tolerate mixed tabs/spaces when used for alignment |
| 64 | + "shadow" : false, // true: Allows re-define variables later in code e.g. `var x=1; x=2;` |
| 65 | + "sub" : false, // true: Tolerate using `[]` notation when it can still be expressed in dot notation |
| 66 | + "supernew" : false, // true: Tolerate `new function () { ... };` and `new Object;` |
| 67 | + "validthis" : false, // true: Tolerate using this in a non-constructor function |
| 68 | + |
| 69 | + // Environments |
| 70 | + "browser" : true, // Web Browser (window, document, etc) |
| 71 | + "couch" : false, // CouchDB |
| 72 | + "devel" : true, // Development/debugging (alert, confirm, etc) |
| 73 | + "dojo" : false, // Dojo Toolkit |
| 74 | + "jasmine" : true, // Jasmine testing framework |
| 75 | + "jquery" : false, // jQuery |
| 76 | + "mootools" : false, // MooTools |
| 77 | + "node" : false, // Node.js |
| 78 | + "nonstandard" : false, // Widely adopted globals (escape, unescape, etc) |
| 79 | + "prototypejs" : false, // Prototype and Scriptaculous |
| 80 | + "rhino" : false, // Rhino |
| 81 | + "worker" : false, // Web Workers |
| 82 | + "wsh" : false, // Windows Scripting Host |
| 83 | + "yui" : false, // Yahoo User Interface |
| 84 | + //"meteor" : false, // Meteor.js |
| 85 | + |
| 86 | + // Legacy |
| 87 | + "nomen" : false, // true: Prohibit dangling `_` in variables |
| 88 | + "onevar" : false, // true: Allow only one `var` statement per function |
| 89 | + "passfail" : false, // true: Stop on first error |
| 90 | + "white" : false, // true: Check against strict whitespace and indentation rules |
| 91 | + |
| 92 | + // Custom globals, from http://docs.meteor.com, in the order they appear there |
| 93 | + "globals" : { |
| 94 | + "Meteor": false, |
| 95 | + "DDP": false, |
| 96 | + "Mongo": false, //Meteor.Collection renamed to Mongo.Collection |
| 97 | + "Session": false, |
| 98 | + "Accounts": false, |
| 99 | + "Template": false, |
| 100 | + "Blaze": false, //UI is being renamed Blaze |
| 101 | + "UI": false, |
| 102 | + "Match": false, |
| 103 | + "check": false, |
| 104 | + "Tracker": false, //Deps renamed to Tracker |
| 105 | + "Deps": false, |
| 106 | + "ReactiveVar": false, |
| 107 | + "EJSON": false, |
| 108 | + "HTTP": false, |
| 109 | + "Email": false, |
| 110 | + "Assets": false, |
| 111 | + "Handlebars": false, // https://github.com/meteor/meteor/wiki/Handlebars |
| 112 | + "Package": false, |
| 113 | + |
| 114 | + // Meteor internals |
| 115 | + "DDPServer": false, |
| 116 | + "global": false, |
| 117 | + "Log": false, |
| 118 | + "MongoInternals": false, |
| 119 | + "process": false, |
| 120 | + "WebApp": false, |
| 121 | + "WebAppInternals": false, |
| 122 | + |
| 123 | + // globals useful when creating Meteor packages |
| 124 | + "Npm": false, |
| 125 | + "Tinytest": false, |
| 126 | + |
| 127 | + // Meteor packages |
| 128 | + "$": false, |
| 129 | + "_": false, |
| 130 | + "__": false, |
| 131 | + "AccountsTemplates": false, |
| 132 | + "AutoForm": false, |
| 133 | + "Avatar": false, |
| 134 | + "Cookie": false, |
| 135 | + "FastRender": false, |
| 136 | + "Gravatar": false, |
| 137 | + "Herald": false, |
| 138 | + "Kadira": false, |
| 139 | + "moment": false, |
| 140 | + "Random": false, |
| 141 | + "RouteController": false, |
| 142 | + "Router": false, |
| 143 | + "SEO": false, |
| 144 | + "SimpleSchema": false, |
| 145 | + "SubsManager": false, |
| 146 | + "SyncedCron": false, |
| 147 | + "TAPi18n": false, |
| 148 | + "FlowRouter": false, |
| 149 | + |
| 150 | + // Telescope collections |
| 151 | + "Categories": true, |
| 152 | + "Comments": true, |
| 153 | + "Feeds": true, |
| 154 | + "Invites": true, |
| 155 | + "Migrations": true, |
| 156 | + "Posts": true, |
| 157 | + "Releases": true, |
| 158 | + "Searches": true, |
| 159 | + "Users": true, |
| 160 | + |
| 161 | + // Telescope objects |
| 162 | + "buildAndSendEmail": true, |
| 163 | + "buildEmailNotification": true, |
| 164 | + "buildEmailTemplate": true, |
| 165 | + "compareVersions": true, |
| 166 | + "coreSubscriptions": true, |
| 167 | + "daysPerPage": true, |
| 168 | + "deleteDummyContent": true, |
| 169 | + "Events": true, |
| 170 | + "fetchFeeds": true, |
| 171 | + "getCategoryUrl": true, |
| 172 | + "getEmailTemplate": true, |
| 173 | + "getPostCategories": true, |
| 174 | + "getTemplate": true, |
| 175 | + "getVotePower": true, |
| 176 | + "i18n": true, |
| 177 | + "InviteSchema": true, |
| 178 | + "logEvent": true, |
| 179 | + "marked": true, |
| 180 | + "Messages": true, |
| 181 | + "Pages": true, |
| 182 | + "sendEmail": true, |
| 183 | + "serveAPI": true, |
| 184 | + "Settings": true, |
| 185 | + "Telescope": true, |
| 186 | + "templates": true, |
| 187 | + "themeSettings": true |
| 188 | + }, |
| 189 | + "esnext": true |
| 190 | +} |
0 commit comments