forked from paypal/react-engine
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.jshintrc
170 lines (131 loc) · 4.53 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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
{
/*
* ENVIRONMENTS
* =================
*/
// Define globals exposed by modern browsers.
"browser": true,
// Define globals exposed by jQuery.
"jquery": true,
// Define globals exposed by Node.js.
"node": true,
/*
* ENFORCING OPTIONS
* =================
*/
// Force all variable names to use either camelCase style or UPPER_CASE
// with underscores.
"camelcase": true,
// Prohibit use of == and != in favor of === and !==.
"eqeqeq": true,
// Enforce tab width of 2 spaces.
"indent": 4,
// Prohibit use of a variable before it is defined.
"latedef": true,
// Enforce line length to 80 characters
"maxlen": 120,
// Require capitalized names for constructor functions.
"newcap": false,
// Enforce use of single quotation marks for strings.
"quotmark": "single",
// Enforce placing 'use strict' at the top function scope
"strict": true,
// Prohibit use of explicitly undeclared variables.
"undef": true,
// Warn when variables are defined but never used.
"unused": true,
// Maximum error before stopping
"maxerr": 50,
// true = Prohibit bitwise operators (&, |, ^, etc.)
"bitwise": true,
// true = Require {} for every new block or scope
"curly": true,
// true = Require filtering for..in loops with obj.hasOwnProperty()
"forin": false,
// true = Require immediate invocations to be wrapped in parens e.g. `(function () { } ());`
"immed": false,
// true = Prohibit use of `arguments.caller` and `arguments.callee`
"noarg": true,
// true = Prohibit use of empty blocks
"noempty": true,
// true = Prohibit use of `++` & `--`
"plusplus": false,
// true = Require all non-global variables to be declared (prevents global leaks)
"undef": true,
// Max number of formal params allowed per function
"maxparams": 10,
// Max depth of nested blocks (within functions)
"maxdepth": 3,
// Max number statements per function
"maxstatements": 25,
// Max cyclomatic complexity per function
"maxcomplexity": 6,
/*
* RELAXING OPTIONS
* =================
*/
// Suppress warnings about == null comparisons.
"eqnull": false,
// true = Tolerate Automatic Semicolon Insertion (no semicolons)
"asi": false,
// true = Tolerate assignments where comparisons would be expected
"boss": false,
// true = Allow debugger statements e.g. browser breakpoints.
"debug": false,
// true = Allow ES.next (ES6) syntax (ex: `const`)
"esnext": true,
// true = Allow Mozilla specific syntax (extends and overrides esnext features)
"moz": false,
// true = Tolerate use of `eval` and `new Function()`
"evil": false,
// true = Tolerate `ExpressionStatement` as Programs
"expr": false,
// true = Tolerate defining variables inside control statements"
"funcscope": false,
// true = Allow global "use strict" (also enables 'strict')
"globalstrict": false,
// true = Tolerate using the `__iterator__` property
"iterator": false,
// true = Tolerate omitting a semicolon for the last statement of a 1-line block
"lastsemic": false,
// true = Tolerate possibly unsafe line breakings
"laxbreak": false,
// true = Tolerate comma-first style coding
"laxcomma": false,
// true = Tolerate functions being defined in loops
"loopfunc": false,
// true = Tolerate multi-line strings
"multistr": false,
// true = Tolerate using the `__proto__` property
"proto": true,
// true = Tolerate script-targeted URLs
"scripturl": false,
// true = Allows re-define variables later in code e.g. `var x=1; x=2;`
"shadow": false,
// true = Tolerate using `[]` notation when it can still be expressed in dot notation
"sub": false,
// true = Tolerate `new function () { ... };` and `new Object;`
"supernew": false,
// true = Tolerate using this in a non-constructor function
"validthis": false,
// Custom Globals
"globals" : { // additional predefined global variables
// mocha
"before" : true,
"beforeEach" : true,
"after" : true,
"afterEach" : true,
"describe" : true,
"it" : true,
// RequireJS / CommonJS
"define" : true,
"requirejs" : true,
"require" : true,
// Nemo
"nemo" : true,
// Browser globals
"URL" : true,
// React
"document" : true
}
}