-
Notifications
You must be signed in to change notification settings - Fork 1
/
.jshintrc
62 lines (60 loc) · 4.27 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
58
59
60
61
62
{
// Enforcing
"bitwise" : true, // Prohibit bitwise operators (&, |, ^, etc.)
"camelcase" : false, // Identifiers must be in camelCase
"curly" : true, // Require {} for every new block or scope
"eqeqeq" : true, // Require triple equals (===) for comparison
"es3" : false, // ?
"forin" : true, // Require filtering for..in loops with obj.hasOwnProperty()
"freeze" : true, // prohibits overwriting prototypes of native objects such as Array, Date etc.
"immed" : true, // Require immediate invocations to be wrapped in parens e.g. `(function () { } ());`
"indent" : 4,
"latedef" : "nofunc", // Require variables/functions to be defined before being used
"maxcomplexity" : 8, // Max cyclomatic complexity per function
"maxdepth" : 5, // Max depth of nested blocks (within functions)
"maxlen" : false, // Max number of characters per line
"maxparams" : 10, // Max number of formal params allowed per function
"maxstatements" : 40, // Max number statements per function
"newcap" : true, // Require capitalization of all constructor functions e.g. `new F()`
"noarg" : true, // Prohibit use of `arguments.caller` and `arguments.callee`
"noempty" : true, // Prohibit use of empty blocks
"nonbsp" : true, // Prohibit "non-breaking whitespace" characters.
"nonew" : true, // Prohibit use of constructors for side-effects (without assignment)
"plusplus" : false, // Prohibit use of `++` and `--`
"quotmark" : "single", // Quotation mark consistency
"undef" : true, // Require all non-global variables to be declared (prevents global leaks)
"unused" : false, // Unused variables
"strict" : false, // Requires all functions run in ES5 Strict Mode
"varstmt" : false, // Disallow any var statements. Only `let` and `const` are allowed.
// Relaxing
"asi" : false, // Tolerate Automatic Semicolon Insertion (no semicolons)
"boss" : false, // Tolerate assignments where comparisons would be expected
"debug" : false, // Allow debugger statements e.g. browser breakpoints.
"eqnull" : true, // Tolerate use of `== null`
"evil" : false, // Tolerate use of `eval` and `new Function()`
"expr" : false, // Tolerate `ExpressionStatement` as Programs
"esversion" : 5, // {int} Specify the ECMAScript version to which the code must adhere.
"funcscope" : false, // Tolerate defining variables inside control statements
"globalstrict" : false, // Allow global "use strict" (also enables 'strict')
"iterator" : false, // Tolerate using the `__iterator__` property
"lastsemic" : false, // Tolerate omitting a semicolon for the last statement of a 1-line block
"laxbreak" : false, // Tolerate possibly unsafe line breakings
"laxcomma" : false, // Tolerate comma-first style coding
"loopfunc" : true, // Tolerate functions being defined in loops
"moz" : false, // Allow Mozilla specific syntax (extends and overrides esnext features)
"multistr" : false, // Tolerate multi-line strings
"noyield" : false, // Tolerate generator functions with no yield statement in them.
"notypeof" : false, // Tolerate invalid typeof operator values
"proto" : false, // Tolerate using the `__proto__` property
"scripturl" : false, // Tolerate script-targeted URLs
"shadow" : false, // Allows re-define variables later in code e.g. `var x=1; x=2;`
"sub" : true, // Tolerate using `[]` notation when it can still be expressed in dot notation
"supernew" : false, // Tolerate `new function () { ... };` and `new Object;`
"validthis" : false, // Tolerate using this in a non-constructor function
"browser" : true, // Web Browser (window, document, etc)
"node" : false, // Node.js
"jquery" : true, // jQuery
"globals": { // Additional libs
"angular": false
}
}