UNPKG

3.45 kBPlain TextView Raw
1{
2 // *Settings*
3 // Stop on first error
4 "passfail" : false,
5 // Maximum error before stopping.
6 "maxerr" : 100,
7
8
9 // *Predefined globals whom JSHint will ignore.*
10 // Standard browser globals e.g. `window`, `document`.
11 "browser" : false,
12 "node" : true,
13 "rhino" : false,
14 "couch" : false,
15 // Windows Scripting Host.
16 "wsh" : false,
17 "jquery" : false,
18 "prototypejs" : false,
19 "mootools" : false,
20 "dojo" : false,
21
22 "predef" : [
23 "before", "after", "beforeEach", "afterEach", "describe", "it", "xit"
24 ],
25
26 // *Development.*
27 // Allow debugger statements e.g. browser breakpoints.
28 "debug" : false,
29 // Allow developments statements e.g. `console.log();`.
30 "devel" : true,
31
32
33 // *EcmaScript 5*
34 // Allow EcmaScript 5 syntax.
35 "es5" : true,
36 // Require `use strict` pragma in every file.
37 "strict" : false,
38 // Allow global "use strict" (also enables 'strict').
39 "globalstrict" : false,
40
41
42 // *The Good Parts*
43 // Tolerate Automatic Semicolon Insertion (no semicolons).
44 "asi" : false,
45 // Tolerate unsafe line breaks e.g. `return [\n] x` without semicolons.
46 "laxbreak" : false,
47 // Prohibit bitwise operators (&, |, ^, etc.).
48 "bitwise" : true,
49 // Tolerate assignments inside if, for & while. Usually conditions & loops
50 // are for comparison, not assignments.
51 "boss" : false,
52 // Require {} for every new block or scope.
53 "curly" : true,
54 // Require triple equals i.e. `===`.
55 "eqeqeq" : true,
56 // Tolerate use of `== null`.
57 "eqnull" : false,
58 // Tolerate use of `eval`.
59 "evil" : false,
60 // Tolerate `ExpressionStatement` as Programs.
61 "expr" : false,
62 // Tolerate `for in` loops without `hasOwnPrototype`.
63 "forin" : false,
64 // Require immediate invocations to be wrapped in parens e.g.
65 // `( function(){}() );`
66 "immed" : true,
67 // Prohipit variable use before definition.
68 "latedef" : true,
69 // Allow functions to be defined within loops.
70 "loopfunc" : false,
71 // Prohibit use of `arguments.caller` and `arguments.callee`.
72 "noarg" : true,
73 // Prohibit `.` and `[^...]` in regular expressions.
74 "regexp" : false,
75 // Tolerate unescaped last dash i.e. `[-...]`.
76 "regexdash" : false,
77 // Tolerate script-targeted URLs.
78 "scripturl" : true,
79 // Allows re-define variables later in code e.g. `var x=1; x=2;`.
80 "shadow" : false,
81 // Tolerate `new function () { ... };` and `new Object;`.
82 "supernew" : false,
83 // Require all non-global variables be declared before they are used.
84 "undef" : true,
85
86
87 // *Personal styling prefrences*
88 // Require capitalization of all constructor functions e.g. `new F()`.
89 "newcap" : true,
90 // Prohipit use of empty blocks.
91 "noempty" : true,
92 // Prohibit use of constructors for side-effects.
93 "nonew" : true,
94 // Prohibit use of initial or trailing underbars in names.
95 "nomen" : true,
96 // Allow only one `var` statement per function.
97 "onevar" : false,
98 // Prohibit use of `++` & `--`.
99 "plusplus" : false,
100 // Tolerate all forms of subscript notation besides dot notation e.g.
101 // `dict['key']` instead of `dict.key`.
102 "sub" : false,
103 // Prohibit trailing whitespaces.
104 "trailing" : true,
105 // Check against strict whitespace and indentation rules.
106 "white" : true
107}
108