|
| 1 | +{ |
| 2 | + // Settings |
| 3 | + "passfail" : false, // Stop on first error. |
| 4 | + "maxerr" : 500, // Maximum errors before stopping. |
| 5 | + "multistr" : true, |
| 6 | + |
| 7 | + |
| 8 | + // Predefined globals whom JSHint will ignore. |
| 9 | + "node" : false, |
| 10 | + |
| 11 | + "predef" : [ // Extra globals. |
| 12 | + "__dirname", |
| 13 | + "Buffer", |
| 14 | + "event", |
| 15 | + "exports", |
| 16 | + "global", |
| 17 | + "main", |
| 18 | + "module", |
| 19 | + "process", |
| 20 | + "require", |
| 21 | + |
| 22 | + "after", |
| 23 | + "afterEach", |
| 24 | + "before", |
| 25 | + "beforeEach", |
| 26 | + "context", |
| 27 | + "describe", |
| 28 | + "it" |
| 29 | + ], |
| 30 | + |
| 31 | + // Development. |
| 32 | + "debug" : false, // Allow debugger statements e.g. browser breakpoints. |
| 33 | + "devel" : true, // Allow development statements e.g. `console.log();`. |
| 34 | + |
| 35 | + |
| 36 | + // EcmaScript 5. |
| 37 | + "es5" : true, // Allow EcmaScript 5 syntax. |
| 38 | + "strict" : false, // Require `use strict` pragma in every file. |
| 39 | + "globalstrict" : false, // Allow global "use strict" (also enables 'strict'). |
| 40 | + |
| 41 | + |
| 42 | + "asi" : false, // Tolerate Automatic Semicolon Insertion (no semicolons). |
| 43 | + "laxbreak" : false, // Tolerate unsafe line breaks e.g. `return [\n] x` without semicolons. |
| 44 | + "bitwise" : true, // Prohibit bitwise operators (&, |, ^, etc.). |
| 45 | + "boss" : false, // Tolerate assignments inside if, for & while. Usually conditions & loops are for comparison, not assignments. |
| 46 | + "curly" : true, // Require {} for every new block or scope. |
| 47 | + "eqeqeq" : false, // Require triple equals i.e. `===`. |
| 48 | + "eqnull" : false, // Tolerate use of `== null`. |
| 49 | + "evil" : false, // Tolerate use of `eval`. |
| 50 | + "expr" : false, // Tolerate `ExpressionStatement` as Programs. |
| 51 | + "forin" : false, // Tolerate `for in` loops without `hasOwnProperty`. |
| 52 | + "immed" : true, // Require immediate invocations to be wrapped in parens e.g. `( function(){}() );` |
| 53 | + "latedef" : true, // Prohibit variable use before definition. |
| 54 | + "loopfunc" : true, // Allow functions to be defined within loops. |
| 55 | + //"maxparams" : 4, |
| 56 | + //"maxdepth" : 5, |
| 57 | + //"maxcomplexity" : 10, |
| 58 | + "noarg" : true, // Prohibit use of `arguments.caller` and `arguments.callee`. |
| 59 | + "regexp" : false, // Prohibit `.` and `[^...]` in regular expressions. |
| 60 | + "regexdash" : false, // Tolerate unescaped last dash i.e. `[-...]`. |
| 61 | + "scripturl" : true, // Tolerate script-targeted URLs. |
| 62 | + "shadow" : false, // Allows re-define variables later in code e.g. `var x=1; x=2;`. |
| 63 | + "supernew" : false, // Tolerate `new function () { ... };` and `new Object;`. |
| 64 | + "undef" : true, // Require all non-global variables be declared before they are used. |
| 65 | + |
| 66 | + |
| 67 | + "newcap" : false, // Require capitalization of all constructor functions e.g. `new F()`. |
| 68 | + "noempty" : true, // Prohibit use of empty blocks. |
| 69 | + "nonew" : false, // Prohibit use of constructors for side-effects. |
| 70 | + "nomen" : false, // Prohibit use of initial or trailing underbars in names. |
| 71 | + "onevar" : false, // Allow only one `var` statement per function. |
| 72 | + "plusplus" : false, // Prohibit use of `++` & `--`. |
| 73 | + "sub" : true, // Tolerate all forms of subscript notation besides dot notation e.g. `dict['key']` instead of `dict.key`. |
| 74 | + "trailing" : true, // Prohibit trailing whitespaces. (only works if white is 'true') |
| 75 | + "white" : true, // Check against strict whitespace and indentation rules. |
| 76 | + "indent" : 4 // ignored because "white" is false. |
| 77 | +} |
0 commit comments