-
Notifications
You must be signed in to change notification settings - Fork 0
/
.jshintrc
44 lines (37 loc) · 1.61 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
{
// Settings
"esversion": 6,
"globalstrict": true,
"maxparams": 5,
"maxdepth": 5,
"maxstatements": 25,
"maxcomplexity": 6,
"boss" : true, // Tolerate assignments inside if, for & while. Usually conditions & loops are for comparison, not assignments.
"curly" : false, // Require curly brackets for every new block or scope.
"eqeqeq" : true, // Require triple equals i.e. `===`.
"eqnull" : true, // Tolerate use of `== null`.
"latedef" : false, // Prohibit variable use before definition.
"loopfunc" : false, // Allow functions to be defined within loops.
"undef" : false, // Require all non-global variables be declared before they are used.
// Predefined globals whom JSHint will ignore.
"browser" : true,
"node" : true,
//Custom Globals
"predef" : [
"chrome",
"console"
],
// Development.
"debug" : false, // Allow debugger statements e.g. browser breakpoints.
"devel" : false, // Allow developments statements e.g. `console.log();`.
//specify a white list of global variables that are not formally defined in the source code
"globals": {
"$": false,
"require": false
},
// Personal styling prefrences
"nomen" : false, // Prohibit use of initial or trailing underbars in names.
"sub" : false, // Tolerate all forms of subscript notation besides dot notation e.g. `dict['key']` instead of `dict.key`.
"trailing" : true, // Prohibit trailing whitespaces.
"white" : false // Check against strict whitespace and indentation rules.
}