|
1 |
| -//.jshintrc |
2 | 1 | {
|
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" : true, // 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" : 80, // {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 |
| - "jquery" : false, // jQuery |
75 |
| - "mootools" : false, // MooTools |
76 |
| - "node" : false, // Node.js |
77 |
| - "nonstandard" : false, // Widely adopted globals (escape, unescape, etc) |
78 |
| - "prototypejs" : false, // Prototype and Scriptaculous |
79 |
| - "rhino" : false, // Rhino |
80 |
| - "worker" : false, // Web Workers |
81 |
| - "wsh" : false, // Windows Scripting Host |
82 |
| - "yui" : false, // Yahoo User Interface |
83 |
| - //"meteor" : false, // Meteor.js |
84 |
| - |
85 |
| - // Legacy |
86 |
| - "nomen" : false, // true: Prohibit dangling `_` in variables |
87 |
| - "onevar" : false, // true: Allow only one `var` statement per function |
88 |
| - "passfail" : false, // true: Stop on first error |
89 |
| - "white" : false, // true: Check against strict whitespace and indentation rules |
90 |
| - |
91 |
| - // Custom Globals |
| 2 | + "maxerr" : 50, |
| 3 | + "bitwise" : true, |
| 4 | + "camelcase" : true, |
| 5 | + "curly" : true, |
| 6 | + "eqeqeq" : true, |
| 7 | + "forin" : true, |
| 8 | + "immed" : false, |
| 9 | + "indent" : 2, |
| 10 | + "latedef" : false, |
| 11 | + "newcap" : false, |
| 12 | + "noarg" : true, |
| 13 | + "noempty" : true, |
| 14 | + "nonew" : false, |
| 15 | + "plusplus" : false, |
| 16 | + "quotmark" : false, |
| 17 | + "undef" : false, |
| 18 | + "unused" : true, |
| 19 | + "strict" : false, |
| 20 | + "trailing" : true, |
| 21 | + "maxparams" : false, |
| 22 | + "maxdepth" : false, |
| 23 | + "maxstatements" : false, |
| 24 | + "maxcomplexity" : false, |
| 25 | + "asi" : false, |
| 26 | + "boss" : false, |
| 27 | + "debug" : false, |
| 28 | + "eqnull" : false, |
| 29 | + "es5" : false, |
| 30 | + "esnext" : false, |
| 31 | + "moz" : false, |
| 32 | + "evil" : false, |
| 33 | + "expr" : false, |
| 34 | + "funcscope" : false, |
| 35 | + "globalstrict" : true, |
| 36 | + "iterator" : false, |
| 37 | + "lastsemic" : false, |
| 38 | + "laxbreak" : false, |
| 39 | + "laxcomma" : false, |
| 40 | + "loopfunc" : false, |
| 41 | + "multistr" : false, |
| 42 | + "proto" : false, |
| 43 | + "scripturl" : false, |
| 44 | + "smarttabs" : false, |
| 45 | + "shadow" : false, |
| 46 | + "sub" : false, |
| 47 | + "supernew" : false, |
| 48 | + "validthis" : false, |
| 49 | + "browser" : true, |
| 50 | + "couch" : false, |
| 51 | + "devel" : true, |
| 52 | + "dojo" : false, |
| 53 | + "jquery" : false, |
| 54 | + "mootools" : false, |
| 55 | + "node" : false, |
| 56 | + "nonstandard" : false, |
| 57 | + "prototypejs" : false, |
| 58 | + "rhino" : false, |
| 59 | + "worker" : false, |
| 60 | + "wsh" : false, |
| 61 | + "yui" : false, |
| 62 | + "nomen" : false, |
| 63 | + "onevar" : false, |
| 64 | + "passfail" : false, |
| 65 | + "white" : false, |
92 | 66 | "predef" : [
|
93 | 67 | "Meteor",
|
94 | 68 | "Accounts",
|
95 | 69 | "Session",
|
96 | 70 | "Template",
|
97 | 71 | "check",
|
98 | 72 | "Match",
|
99 |
| - "Deps", |
| 73 | + "Tracker", |
100 | 74 | "EJSON",
|
101 | 75 | "Email",
|
102 | 76 | "Package",
|
|
109 | 83 | "_",
|
110 | 84 | "Random",
|
111 | 85 | "HTTP"
|
112 |
| - ] // additional predefined global variables |
| 86 | + ] |
113 | 87 | }
|
0 commit comments