|
| 1 | +{ |
| 2 | + // Predefined globals whom JSHint will ignore. |
| 3 | + "browser" : true, // Standard browser globals e.g. `window`, `document`. |
| 4 | + "predef" : [ // Custom globals. |
| 5 | + "FileList" |
| 6 | + ], |
| 7 | + |
| 8 | + "debug" : false, // Allow debugger statements e.g. browser breakpoints. |
| 9 | + "devel" : true, // Allow developments statements e.g. `console.log();`. |
| 10 | + |
| 11 | + // ECMAScript 5. |
| 12 | + "es5" : false, // Allow ECMAScript 5 syntax. |
| 13 | + |
| 14 | + // The Good Parts. |
| 15 | + "asi" : true, // Tolerate Automatic Semicolon Insertion (no semicolons). |
| 16 | + "laxbreak" : true, // Tolerate unsafe line breaks e.g. `return [\n] x` without semicolons. |
| 17 | + "bitwise" : true, // Prohibit bitwise operators (&, |, ^, etc.). |
| 18 | + "boss" : false, // Tolerate assignments inside if, for & while. Usually conditions & loops are for comparison, not assignments. |
| 19 | + "curly" : true, // Require {} for every new block or scope. |
| 20 | + "eqeqeq" : true, // Require triple equals i.e. `===`. |
| 21 | + "eqnull" : false, // Tolerate use of `== null`. |
| 22 | + "evil" : true, // Tolerate use of `eval`. |
| 23 | + "expr" : false, // Tolerate `ExpressionStatement` as Programs. |
| 24 | + "forin" : false, // Tolerate `for in` loops without `hasOwnPrototype`. |
| 25 | + "immed" : true, // Require immediate invocations to be wrapped in parens e.g. `( function(){}() );` |
| 26 | + "latedef" : true, // Prohipit variable use before definition. |
| 27 | + "loopfunc" : true, // Allow functions to be defined within loops. |
| 28 | + "noarg" : true, // Prohibit use of `arguments.caller` and `arguments.callee`. |
| 29 | + "regexp" : true, // Prohibit `.` and `[^...]` in regular expressions. |
| 30 | + "regexdash" : false, // Tolerate unescaped last dash i.e. `[-...]`. |
| 31 | + "scripturl" : true, // Tolerate script-targeted URLs. |
| 32 | + "shadow" : false, // Allows re-define variables later in code e.g. `var x=1; x=2;`. |
| 33 | + "supernew" : false, // Tolerate `new function () { ... };` and `new Object;`. |
| 34 | + "undef" : true, // Require all non-global variables be declared before they are used. |
| 35 | + |
| 36 | + // Personal styling preferences. |
| 37 | + "newcap" : true, // Require capitalization of all constructor functions e.g. `new F()`. |
| 38 | + "noempty" : true, // Prohibit use of empty blocks. |
| 39 | + "nonew" : true, // Prohibit use of constructors for side-effects. |
| 40 | + "nomen" : true, // Prohibit use of initial or trailing underbars in names. |
| 41 | + "onevar" : false, // Allow only one `var` statement per function. |
| 42 | + "plusplus" : false, // Prohibit use of `++` & `--`. |
| 43 | + "sub" : false // Tolerate all forms of subscript notation besides dot notation e.g. `dict['key']` instead of `dict.key`. |
| 44 | +} |
0 commit comments