-
Notifications
You must be signed in to change notification settings - Fork 1
/
.jshintrc
57 lines (53 loc) · 3.42 KB
/
.jshintrc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
{ // JSHint Default Configuration File (as on JSHint website)
// See http://jshint.com/docs/ for more details
// https://github.com/jshint/jshint/blob/main/examples/.jshintrc
// Enforcing
"eqeqeq": true, // true: Require triple equals (===) for comparison
"latedef": false, // true: Require variables/functions to be defined before being used
"noempty": true, // true: Prohibit use of empty blocks
"nonbsp": true, // true: Prohibit "non-breaking whitespace" characters.
"plusplus": true, // true: Prohibit use of `++` and `--`
"quotmark": true, // Quotation mark consistency:
// false : do nothing (default)
// true : ensure whatever is used is consistent
// "single" : require single quotes
// "double" : require double quotes
"undef": true, // true: Require all non-global variables to be declared (prevents global leaks)
"strict": false, // true: Requires all functions run in ES5 Strict Mode
"maxparams": 6, // {int} Max number of formal params allowed per function
"maxdepth": 3, // {int} Max depth of nested blocks (within functions)
"maxstatements": 8, // {int} Max number statements per function
"maxcomplexity": 15, // {int} Max cyclomatic complexity per function
"maxlen": 100, // {int} Max number of characters per line
"esversion": 6,
"varstmt": false, // true: Disallow any var statements. Only `let` and `const` are allowed.
"unused": true,
// Relaxing
"asi": true, // true: Tolerate Automatic Semicolon Insertion (no semicolons)
"boss": true, // true: Tolerate assignments where comparisons would be expected
"debug": true, // true: Allow debugger statements e.g. browser breakpoints.
"eqnull": false, // true: Tolerate use of `== null`
"moz": false, // true: Allow Mozilla specific syntax (extends and overrides esnext features) // (ex: `for each`, multiple try/catch, function expression…)
"evil": true, // true: Tolerate use of `eval` and `new Function()`
"expr": false, // true: Tolerate `ExpressionStatement` as Programs
"funcscope": true, // true: Tolerate defining variables inside control statements
"globalstrict": false, // true: Allow global "use strict" (also enables 'strict')
"iterator": true, // true: Tolerate using the `__iterator__` property
"lastsemic": true, // true: Tolerate omitting a semicolon for the last statement of a 1-line block
"laxbreak": false, // true: Tolerate possibly unsafe line breakings
"laxcomma": true, // true: Tolerate comma-first style coding
"loopfunc": false, // true: Tolerate functions being defined in loops
"multistr": true, // true: Tolerate multi-line strings
"noyield": false, // true: Tolerate generator functions with no yield statement in them.
"notypeof": false, // true: Tolerate invalid typeof operator values
"proto": false, // true: Tolerate using the `__proto__` property
"scripturl": false, // true: Tolerate script-targeted URLs
"shadow": false, // true: Allows re-define variables later in code e.g. `var x=1; x=2;`
"sub": false, // true: Tolerate using `[]` notation when it can still be expressed in dot notation
"supernew": true, // true: Tolerate `new function () { ... };` and `new Object;`
"validthis": true, // true: Tolerate using this in a non-constructor function
"globals": {},
// Environment
"browser": true,
"mocha": true // Mocha
}