UNPKG

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