-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.jshintrc
54 lines (50 loc) · 4.03 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
{
// Enforcing options
"bitwise" : true, // prohibits the use of bitwise operators such as ^ (XOR), | (OR) and others
"camelcase" : false, // allows you to 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 !==
"forin" : true, // requires all for in loops to filter objects' items
"immed" : true, // prohibits the use of immediate function invocations without wrapping them in parentheses
"latedef" : true, // 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 (calling constructor functions without assigning its result to any variable)
"plusplus" : false, // prohibits the use of unary increment and decrement operators
"quotmark" : "single", // enforces the consistency of quotation marks used throughout your code
"regexp" : true, // prohibits the use of unsafe . in regular expressions (unsafe regarding form validation)
"undef" : true, // prohibits the use of explicitly undeclared variables
"unused" : true, // warns when you define and never use your variables
"strict" : false, // requires all functions to run in EcmaScript 5's strict mode
"trailing" : true, // prohibits trailing whitespace in your code
// Relaxing options
"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
"eqnull" : true, // suppresses warnings about == null comparisons
"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
"globalstrict" : false, // suppresses warnings about the use of global strict mode. Global strict mode can break third-party widgets so it is not recommended
"iterator" : false, // suppresses warnings about the __iterator__ property
"lastsemic" : false, // suppresses warnings about missing semicolons but only when the semicolon is omited for the last statement in a one-line block
"laxbreak" : false, // suppresses all warnings about possibly unsafe line breakings in your code
"loopfunc" : false, // suppresses warnings about functions inside of loops
"onecase" : false, // suppresses warnings about switches with just one case
"proto" : false, // suppresses warnings about the __proto__ property
"regexdash" : true, // suppresses warnings about unescaped - in the end of regular expressions
"scripturl" : false, // suppresses warnings about the use of script-targeted URLs—such as javascript:...
"shadow" : false, // suppresses warnings about variable shadowing i.e. declaring a variable that had been already declared somewhere in the outer scope
"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;
// Environment options
"devel" : true, // defines globals that are usually used for logging poor-man's debugging: console, alert, etc
"node" : true,
// Other options
"indent" : 2,
"white" : true,
"predef" : [
// libs
"Ext", "CodeMirror"
]
}