-
Notifications
You must be signed in to change notification settings - Fork 375
/
.jshintrc
64 lines (60 loc) · 4.48 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
63
64
{
// http://www.jshint.com/docs/
// Based on [email protected]
"bitwise": true, //prohibits the use of bitwise operators such as ^ (XOR), | (OR) and others
"camelcase": false, //force all variable names to use either camelCase style or UPPER_CASE with underscores
"curly": true, //requires you to always put curly braces around blocks in loops and conditionals
"eqeqeq": true, //prohibits the use of == and != in favor of === and !==
"es3": false, //tells JSHint that your code needs to adhere to ECMAScript 3 specification
"forin": false, //requires all `for in` loops to filter object's items with `hasOwnProperty()`
"immed": true, //prohibits the use of immediate function invocations without wrapping them in parentheses
"indent": 4, //enforces specific tab width
"latedef": false, //prohibits the use of a variable before it was defined
"newcap": true, //requires you to capitalize names of constructor functions
"noarg": true, //prohibits the use of `arguments.caller` and `arguments.callee`
"noempty": true, //warns when you have an empty block in your code
"nonew": true, //prohibits the use of constructor functions for side-effects
"plusplus": false, //prohibits the use of unary increment and decrement operators
"quotmark": true, //enforces the consistency of quotation marks used throughout your code
"undef": true, //prohibits the use of explicitly undeclared variables
"unused": true, //warns when you define and never use your variables
"strict": true, //requires all functions to run in ECMAScript 5's strict mode
"trailing": true, //makes it an error to leave a trailing whitespace in your code
"maxparams": 10, //set the max number of formal parameters allowed per function
"maxdepth": 3, //control how nested do you want your blocks to be
//"maxstatements": 0, //set the max number of statements allowed per function
//"maxcomplexity": 0, //control cyclomatic complexity throughout your code
"maxlen": 140, //set the maximum length of a line
"asi": false, //suppresses warnings about missing semicolons
"boss": false, //suppresses warnings about the use of assignments in cases where comparisons are expected
"debug": false, //suppresses warnings about the debugger statements in your code
"eqnull": false, //suppresses warnings about == null comparisons
"esnext": false, //your code uses ES.next specific features such as const
"evil": false, //suppresses warnings about the use of eval
"expr": false, //suppresses warnings about the use of expressions where normally you would expect to see assignments or function calls
"funcscope": false, //suppresses warnings about declaring variables inside of control structures while accessing them later from the outside
"globalstrict": false, //suppresses warnings about the use of global strict mode
"iterator": false, //suppresses warnings about the `__iterator__` property
"lastsemic": false, //suppresses warnings about missing semicolons, but only when the semicolon is omitted for the last statement in a one-line block
"laxbreak": false, //suppresses most of the warnings about possibly unsafe line breakings in your code
"laxcomma": false, //suppresses warnings about comma-first coding style
"loopfunc": false, //suppresses warnings about functions inside of loops
"moz": false, //tells JSHint that your code uses Mozilla JavaScript extensions
"multistr": false, //suppresses warnings about multi-line strings
"proto": false, //suppresses warnings about the `__proto__` property
"scripturl": true, //suppresses warnings about the use of script-targeted URLs—such as `javascript:...`
"smarttabs": true, //suppresses warnings about mixed tabs and spaces when the latter are used for alignmnent only
"shadow": false, //suppresses warnings about variable shadowing
"sub": false, //suppresses warnings about using `[]` notation when it can be expressed in dot notation
"supernew": false, //suppresses warnings about "weird" constructions like `new function () { ... }` and `new Object;`
"validthis": true, //suppresses warnings about possible strict violations when the code is running in strict mode and you use `this` in a non-constructor function
// ENVIRONMENTS / GLOBALS
"browser": true,
"jquery": true,
"node": true,
"esversion": 6,
"globals": {
"define": true,
"ActiveXObject": true
}
}