1 | {
|
2 | // Settings
|
3 | "passfail" : false, // Stop on first error.
|
4 | "maxerr" : 100, // Maximum error before stopping.
|
5 |
|
6 |
|
7 | // Predefined globals whom JSHint will ignore.
|
8 | "browser" : true, // Standard browser globals e.g. `window`, `document`.
|
9 |
|
10 | "node" : true,
|
11 | "rhino" : false,
|
12 | "couch" : false,
|
13 | "wsh" : false, // Windows Scripting Host.
|
14 |
|
15 | "jquery" : false,
|
16 | "prototypejs" : false,
|
17 | "mootools" : false,
|
18 | "dojo" : false,
|
19 |
|
20 | "predef" : [ // Custom globals.
|
21 | //"exampleVar",
|
22 | //"anotherCoolGlobal",
|
23 | //"iLoveDouglas"
|
24 | ],
|
25 |
|
26 |
|
27 | // Development.
|
28 | "debug" : false, // Allow debugger statements e.g. browser breakpoints.
|
29 | "devel" : true, // Allow developments statements e.g. `console.log();`.
|
30 |
|
31 |
|
32 | // ECMAScript 5.
|
33 | "strict" : true, // Require `use strict` pragma in every file.
|
34 | "globalstrict" : true, // Allow global "use strict" (also enables 'strict').
|
35 |
|
36 |
|
37 | // The Good Parts.
|
38 | "asi" : true, // Tolerate Automatic Semicolon Insertion (no semicolons).
|
39 | "laxbreak" : true, // Tolerate unsafe line breaks e.g. `return [\n] x` without semicolons.
|
40 | "bitwise" : true, // Prohibit bitwise operators (&, |, ^, etc.).
|
41 | "boss" : false, // Tolerate assignments inside if, for & while. Usually conditions & loops are for comparison, not assignments.
|
42 | "curly" : true, // Require {} for every new block or scope.
|
43 | "eqeqeq" : false, // Require triple equals i.e. `===`.
|
44 | "eqnull" : true, // Tolerate use of `== null`.
|
45 | "evil" : false, // Tolerate use of `eval`.
|
46 | "expr" : false, // Tolerate `ExpressionStatement` as Programs.
|
47 | "forin" : false, // Tolerate `for in` loops without `hasOwnPrototype`.
|
48 | "immed" : true, // Require immediate invocations to be wrapped in parens e.g. `( function(){}() );`
|
49 | "latedef" : true, // Prohibit variable use before definition.
|
50 | "loopfunc" : false, // Allow functions to be defined within loops.
|
51 | "noarg" : true, // Prohibit use of `arguments.caller` and `arguments.callee`.
|
52 | "regexp" : false, // Prohibit `.` and `[^...]` in regular expressions.
|
53 | "regexdash" : false, // Tolerate unescaped last dash i.e. `[-...]`.
|
54 | "scripturl" : true, // Tolerate script-targeted URLs.
|
55 | "shadow" : false, // Allows re-define variables later in code e.g. `var x=1; x=2;`.
|
56 | "supernew" : false, // Tolerate `new function () { ... };` and `new Object;`.
|
57 | "undef" : true, // Require all non-global variables be declared before they are used.
|
58 |
|
59 |
|
60 | // Personal styling preferences.
|
61 | "newcap" : true, // Require capitalization of all constructor functions e.g. `new F()`.
|
62 | "noempty" : true, // Prohibit use of empty blocks.
|
63 | "nonew" : true, // Prohibit use of constructors for side-effects.
|
64 | "nomen" : false, // Prohibit use of initial or trailing underbars in names.
|
65 | "onevar" : false, // Allow only one `var` statement per function.
|
66 | "plusplus" : false, // Prohibit use of `++` & `--`.
|
67 | "sub" : true, // Tolerate all forms of subscript notation besides dot notation e.g. `dict['key']` instead of `dict.key`.
|
68 | "trailing" : true, // Prohibit trailing whitespaces.
|
69 | "white" : true, // Check against strict whitespace and indentation rules.
|
70 | //"funscope" : false, // This option suppresses warnings about declaring variables inside of control structures while accessing them later from the outside
|
71 | "iterator" : false, // This option suppresses warnings about the __iterator__ property. This property is not supported by all browsers so use it carefully
|
72 | "laxbreak" : true, // This option suppresses most of the warnings about possibly unsafe line breakings in your code
|
73 | "laxcomma" : true, // This option suppresses warnings about comma-first coding style
|
74 | "lastsemic" : false, // This option suppresses warnings about missing semicolons but only when the semicolon is omited for the last statement in a one-line block
|
75 | "multistr" : false, // This option suppresses warnings about multi-line strings
|
76 | "proto" : false, // This option suppresses warnings about the __proto__ property. This property is deprecated and not supported by all browsers
|
77 | "onecase" : false, // This option suppresses watnings about switches with just one case
|
78 | "smarttabs" : false, // This option suppresses warnings about mixed tabs and spaces when the latter are used for alignmnent only
|
79 | "validthis" : true, // This option suppresses warnings about possible strict violations when the code running in a strict mode and you use this in a non-constructor functionS
|
80 | "indent" : 2 // Specify indentation spacing
|
81 | }
|