|
1 | 1 | {
|
2 |
| - "node": true, // Enable globals available when code is running inside of the NodeJS runtime environment. |
3 |
| - "browser": true, // Standard browser globals e.g. `window`, `document`. |
4 |
| - "esnext": true, // Allow ES.next specific features such as `const` and `let`. |
5 |
| - "bitwise": false, // Prohibit bitwise operators (&, |, ^, etc.). |
6 |
| - "camelcase": false, // Permit only camelcase for `var` and `object indexes`. |
7 |
| - "curly": false, // Require {} for every new block or scope. |
8 |
| - "eqeqeq": true, // Require triple equals i.e. `===`. |
9 |
| - "immed": true, // Require immediate invocations to be wrapped in parens e.g. `( function(){}() );` |
10 |
| - "latedef": true, // Prohibit variable use before definition. |
11 |
| - "newcap": true, // Require capitalization of all constructor functions e.g. `new F()`. |
12 |
| - "noarg": true, // Prohibit use of `arguments.caller` and `arguments.callee`. |
13 |
| - "quotmark": "single", // Define quotes to string values. |
14 |
| - "regexp": true, // Prohibit `.` and `[^...]` in regular expressions. |
15 |
| - "undef": true, // Require all non-global variables be declared before they are used. |
16 |
| - "unused": "vars", // Warn unused variables, but not unused params |
17 |
| - "strict": true, // Require `use strict` pragma in every file. |
18 |
| - "trailing": true, // Prohibit trailing whitespaces. |
19 |
| - "smarttabs": false, // Suppresses warnings about mixed tabs and spaces |
20 |
| - "globals": { // Globals variables. |
21 |
| - "angular": true |
22 |
| - }, |
23 |
| - "predef": [ // Extra globals. |
24 |
| - "define", |
25 |
| - "require", |
26 |
| - "exports", |
27 |
| - "module", |
28 |
| - "describe", |
29 |
| - "before", |
30 |
| - "beforeEach", |
31 |
| - "after", |
32 |
| - "afterEach", |
33 |
| - "it", |
34 |
| - "inject", |
35 |
| - "expect", |
36 |
| - "spyOn" |
37 |
| - ], |
38 |
| - "indent": 2, // Specify indentation spacing |
39 |
| - "devel": true, // Allow development statements e.g. `console.log();`. |
40 |
| - "noempty": true // Prohibit use of empty blocks. |
| 2 | + "maxerr" : 50, // {int} Maximum error before stopping |
| 3 | + |
| 4 | + // Enforcing |
| 5 | + "bitwise" : true, // true: Prohibit bitwise operators (&, |, ^, etc.) |
| 6 | + "camelcase" : false, // true: Identifiers must be in camelCase |
| 7 | + "curly" : false, // true: Require {} for every new block or scope |
| 8 | + "eqeqeq" : true, // true: Require triple equals (===) for comparison |
| 9 | + "forin" : false, // true: Require filtering for..in loops with obj.hasOwnProperty() |
| 10 | + "immed" : true, // true: Require immediate invocations to be wrapped in parens e.g. `(function () { } ());` |
| 11 | + "indent" : 2, // {int} Number of spaces to use for indentation |
| 12 | + "latedef" : true, // true: Require variables/functions to be defined before being used |
| 13 | + "newcap" : true, // true: Require capitalization of all constructor functions e.g. `new F()` |
| 14 | + "noarg" : true, // true: Prohibit use of `arguments.caller` and `arguments.callee` |
| 15 | + "noempty" : true, // true: Prohibit use of empty blocks |
| 16 | + "nonew" : true, // true: Prohibit use of constructors for side-effects (without assignment) |
| 17 | + "plusplus" : true, // true: Prohibit use of `++` & `--` |
| 18 | + "quotmark" : "single", // Quotation mark consistency: |
| 19 | + // false : do nothing (default) |
| 20 | + // true : ensure whatever is used is consistent |
| 21 | + // "single" : require single quotes |
| 22 | + // "double" : require double quotes |
| 23 | + "undef" : true, // true: Require all non-global variables to be declared (prevents global leaks) |
| 24 | + "unused" : "vars", // true: Require all defined variables be used |
| 25 | + "strict" : true, // true: Requires all functions run in ES5 Strict Mode |
| 26 | + "maxparams" : false, // {int} Max number of formal params allowed per function |
| 27 | + "maxdepth" : false, // {int} Max depth of nested blocks (within functions) |
| 28 | + "maxstatements" : false, // {int} Max number statements per function |
| 29 | + "maxcomplexity" : false, // {int} Max cyclomatic complexity per function |
| 30 | + "maxlen" : false, // {int} Max number of characters per line |
| 31 | + |
| 32 | + // Relaxing |
| 33 | + "asi" : false, // true: Tolerate Automatic Semicolon Insertion (no semicolons) |
| 34 | + "boss" : false, // true: Tolerate assignments where comparisons would be expected |
| 35 | + "debug" : false, // true: Allow debugger statements e.g. browser breakpoints. |
| 36 | + "eqnull" : false, // true: Tolerate use of `== null` |
| 37 | + "es5" : false, // true: Allow ES5 syntax (ex: getters and setters) |
| 38 | + "esnext" : true, // true: Allow ES.next (ES6) syntax (ex: `const`) |
| 39 | + "moz" : false, // true: Allow Mozilla specific syntax (extends and overrides esnext features) |
| 40 | + // (ex: `for each`, multiple try/catch, function expression…) |
| 41 | + "evil" : false, // true: Tolerate use of `eval` and `new Function()` |
| 42 | + "expr" : false, // true: Tolerate `ExpressionStatement` as Programs |
| 43 | + "funcscope" : false, // true: Tolerate defining variables inside control statements |
| 44 | + "globalstrict" : false, // true: Allow global "use strict" (also enables 'strict') |
| 45 | + "iterator" : false, // true: Tolerate using the `__iterator__` property |
| 46 | + "lastsemic" : false, // true: Tolerate omitting a semicolon for the last statement of a 1-line block |
| 47 | + "laxbreak" : false, // true: Tolerate possibly unsafe line breakings |
| 48 | + "laxcomma" : false, // true: Tolerate comma-first style coding |
| 49 | + "loopfunc" : false, // true: Tolerate functions being defined in loops |
| 50 | + "multistr" : false, // true: Tolerate multi-line strings |
| 51 | + "proto" : false, // true: Tolerate using the `__proto__` property |
| 52 | + "scripturl" : false, // true: Tolerate script-targeted URLs |
| 53 | + "shadow" : false, // true: Allows re-define variables later in code e.g. `var x=1; x=2;` |
| 54 | + "sub" : false, // true: Tolerate using `[]` notation when it can still be expressed in dot notation |
| 55 | + "supernew" : false, // true: Tolerate `new function () { ... };` and `new Object;` |
| 56 | + "validthis" : false, // true: Tolerate using this in a non-constructor function |
| 57 | + |
| 58 | + // Environments |
| 59 | + "browser" : true, // Web Browser (window, document, etc) |
| 60 | + "couch" : false, // CouchDB |
| 61 | + "devel" : true, // Development/debugging (alert, confirm, etc) |
| 62 | + "dojo" : false, // Dojo Toolkit |
| 63 | + "jquery" : false, // jQuery |
| 64 | + "mootools" : false, // MooTools |
| 65 | + "node" : true, // Node.js |
| 66 | + "nonstandard" : false, // Widely adopted globals (escape, unescape, etc) |
| 67 | + "prototypejs" : false, // Prototype and Scriptaculous |
| 68 | + "rhino" : false, // Rhino |
| 69 | + "worker" : false, // Web Workers |
| 70 | + "wsh" : false, // Windows Scripting Host |
| 71 | + "yui" : false, // Yahoo User Interface |
| 72 | + |
| 73 | + // Custom Globals |
| 74 | + "globals": { |
| 75 | + "angular": true, |
| 76 | + "define": true, |
| 77 | + "require": true, |
| 78 | + "exports": true, |
| 79 | + "module": true, |
| 80 | + "describe": true, |
| 81 | + "before": true, |
| 82 | + "beforeEach": true, |
| 83 | + "after": true, |
| 84 | + "afterEach": true, |
| 85 | + "it": true, |
| 86 | + "inject": true, |
| 87 | + "expect": true, |
| 88 | + "spyOn": true |
| 89 | + } |
41 | 90 | }
|
0 commit comments