1
1
module . exports = {
2
2
rules : {
3
3
// enforces getter/setter pairs in objects
4
- 'accessor-pairs' : 0 ,
4
+ 'accessor-pairs' : 'off' ,
5
5
6
6
// enforces return statements in callbacks of array's methods
7
7
// http://eslint.org/docs/rules/array-callback-return
8
- 'array-callback-return' : 2 ,
8
+ 'array-callback-return' : 'error' ,
9
9
10
10
// treat var statements as if they were block scoped
11
- 'block-scoped-var' : 2 ,
11
+ 'block-scoped-var' : 'error' ,
12
12
13
13
// specify the maximum cyclomatic complexity allowed in a program
14
- complexity : [ 0 , 11 ] ,
14
+ complexity : [ 'off' , 11 ] ,
15
15
16
16
// require return statements to either always or never specify values
17
- 'consistent-return' : 2 ,
17
+ 'consistent-return' : 'error' ,
18
18
19
19
// specify curly brace conventions for all control statements
20
- curly : [ 2 , 'multi-line' ] ,
20
+ curly : [ 'error' , 'multi-line' ] ,
21
21
22
22
// require default case in switch statements
23
- 'default-case' : [ 2 , { commentPattern : '^no default$' } ] ,
23
+ 'default-case' : [ 'error' , { commentPattern : '^no default$' } ] ,
24
24
25
25
// encourages use of dot notation whenever possible
26
- 'dot-notation' : [ 2 , { allowKeywords : true } ] ,
26
+ 'dot-notation' : [ 'error' , { allowKeywords : true } ] ,
27
27
28
28
// enforces consistent newlines before or after dots
29
29
// http://eslint.org/docs/rules/dot-location
30
- 'dot-location' : [ 2 , 'property' ] ,
30
+ 'dot-location' : [ 'error' , 'property' ] ,
31
31
32
32
// require the use of === and !==
33
33
// http://eslint.org/docs/rules/eqeqeq
34
- eqeqeq : [ 2 , 'allow-null' ] ,
34
+ eqeqeq : [ 'error' , 'allow-null' ] ,
35
35
36
36
// make sure for-in loops have an if statement
37
- 'guard-for-in' : 2 ,
37
+ 'guard-for-in' : 'error' ,
38
38
39
39
// disallow the use of alert, confirm, and prompt
40
- 'no-alert' : 1 ,
40
+ 'no-alert' : 'warn' ,
41
41
42
42
// disallow use of arguments.caller or arguments.callee
43
- 'no-caller' : 2 ,
43
+ 'no-caller' : 'error' ,
44
44
45
45
// disallow lexical declarations in case/default clauses
46
46
// http://eslint.org/docs/rules/no-case-declarations.html
47
- 'no-case-declarations' : 2 ,
47
+ 'no-case-declarations' : 'error' ,
48
48
49
49
// disallow division operators explicitly at beginning of regular expression
50
50
// http://eslint.org/docs/rules/no-div-regex
51
- 'no-div-regex' : 0 ,
51
+ 'no-div-regex' : 'off' ,
52
52
53
53
// disallow else after a return in an if
54
- 'no-else-return' : 2 ,
54
+ 'no-else-return' : 'error' ,
55
55
56
56
// disallow empty functions, except for standalone funcs/arrows
57
57
// http://eslint.org/docs/rules/no-empty-function
58
- 'no-empty-function' : [ 2 , {
58
+ 'no-empty-function' : [ 'error' , {
59
59
allow : [
60
60
'arrowFunctions' ,
61
61
'functions' ,
@@ -65,33 +65,33 @@ module.exports = {
65
65
66
66
// disallow empty destructuring patterns
67
67
// http://eslint.org/docs/rules/no-empty-pattern
68
- 'no-empty-pattern' : 2 ,
68
+ 'no-empty-pattern' : 'error' ,
69
69
70
70
// disallow comparisons to null without a type-checking operator
71
- 'no-eq-null' : 0 ,
71
+ 'no-eq-null' : 'off' ,
72
72
73
73
// disallow use of eval()
74
- 'no-eval' : 2 ,
74
+ 'no-eval' : 'error' ,
75
75
76
76
// disallow adding to native types
77
- 'no-extend-native' : 2 ,
77
+ 'no-extend-native' : 'error' ,
78
78
79
79
// disallow unnecessary function binding
80
- 'no-extra-bind' : 2 ,
80
+ 'no-extra-bind' : 'error' ,
81
81
82
82
// disallow Unnecessary Labels
83
83
// http://eslint.org/docs/rules/no-extra-label
84
- 'no-extra-label' : 2 ,
84
+ 'no-extra-label' : 'error' ,
85
85
86
86
// disallow fallthrough of case statements
87
- 'no-fallthrough' : 2 ,
87
+ 'no-fallthrough' : 'error' ,
88
88
89
89
// disallow the use of leading or trailing decimal points in numeric literals
90
- 'no-floating-decimal' : 2 ,
90
+ 'no-floating-decimal' : 'error' ,
91
91
92
92
// disallow implicit type conversions
93
93
// http://eslint.org/docs/rules/no-implicit-coercion
94
- 'no-implicit-coercion' : [ 0 , {
94
+ 'no-implicit-coercion' : [ 'off' , {
95
95
boolean : false ,
96
96
number : true ,
97
97
string : true ,
@@ -100,136 +100,136 @@ module.exports = {
100
100
101
101
// disallow var and named functions in global scope
102
102
// http://eslint.org/docs/rules/no-implicit-globals
103
- 'no-implicit-globals' : 0 ,
103
+ 'no-implicit-globals' : 'off' ,
104
104
105
105
// disallow use of eval()-like methods
106
- 'no-implied-eval' : 2 ,
106
+ 'no-implied-eval' : 'error' ,
107
107
108
108
// disallow this keywords outside of classes or class-like objects
109
- 'no-invalid-this' : 0 ,
109
+ 'no-invalid-this' : 'off' ,
110
110
111
111
// disallow usage of __iterator__ property
112
- 'no-iterator' : 2 ,
112
+ 'no-iterator' : 'error' ,
113
113
114
114
// disallow use of labels for anything other then loops and switches
115
- 'no-labels' : [ 2 , { allowLoop : false , allowSwitch : false } ] ,
115
+ 'no-labels' : [ 'error' , { allowLoop : false , allowSwitch : false } ] ,
116
116
117
117
// disallow unnecessary nested blocks
118
- 'no-lone-blocks' : 2 ,
118
+ 'no-lone-blocks' : 'error' ,
119
119
120
120
// disallow creation of functions within loops
121
- 'no-loop-func' : 2 ,
121
+ 'no-loop-func' : 'error' ,
122
122
123
123
// disallow magic numbers
124
124
// http://eslint.org/docs/rules/no-magic-numbers
125
- 'no-magic-numbers' : [ 0 , {
125
+ 'no-magic-numbers' : [ 'off' , {
126
126
ignore : [ ] ,
127
127
ignoreArrayIndexes : true ,
128
128
enforceConst : true ,
129
129
detectObjects : false ,
130
130
} ] ,
131
131
132
132
// disallow use of multiple spaces
133
- 'no-multi-spaces' : 2 ,
133
+ 'no-multi-spaces' : 'error' ,
134
134
135
135
// disallow use of multiline strings
136
- 'no-multi-str' : 2 ,
136
+ 'no-multi-str' : 'error' ,
137
137
138
138
// disallow reassignments of native objects
139
- 'no-native-reassign' : 2 ,
139
+ 'no-native-reassign' : 'error' ,
140
140
141
141
// disallow use of new operator when not part of the assignment or comparison
142
- 'no-new' : 2 ,
142
+ 'no-new' : 'error' ,
143
143
144
144
// disallow use of new operator for Function object
145
- 'no-new-func' : 2 ,
145
+ 'no-new-func' : 'error' ,
146
146
147
147
// disallows creating new instances of String, Number, and Boolean
148
- 'no-new-wrappers' : 2 ,
148
+ 'no-new-wrappers' : 'error' ,
149
149
150
150
// disallow use of (old style) octal literals
151
- 'no-octal' : 2 ,
151
+ 'no-octal' : 'error' ,
152
152
153
153
// disallow use of octal escape sequences in string literals, such as
154
154
// var foo = 'Copyright \251';
155
- 'no-octal-escape' : 2 ,
155
+ 'no-octal-escape' : 'error' ,
156
156
157
157
// disallow reassignment of function parameters
158
158
// disallow parameter object manipulation
159
159
// rule: http://eslint.org/docs/rules/no-param-reassign.html
160
- 'no-param-reassign' : [ 2 , { props : true } ] ,
160
+ 'no-param-reassign' : [ 'error' , { props : true } ] ,
161
161
162
162
// disallow usage of __proto__ property
163
- 'no-proto' : 2 ,
163
+ 'no-proto' : 'error' ,
164
164
165
165
// disallow declaring the same variable more then once
166
- 'no-redeclare' : 2 ,
166
+ 'no-redeclare' : 'error' ,
167
167
168
168
// disallow use of assignment in return statement
169
- 'no-return-assign' : 2 ,
169
+ 'no-return-assign' : 'error' ,
170
170
171
171
// disallow use of `javascript:` urls.
172
- 'no-script-url' : 2 ,
172
+ 'no-script-url' : 'error' ,
173
173
174
174
// disallow self assignment
175
175
// http://eslint.org/docs/rules/no-self-assign
176
- 'no-self-assign' : 2 ,
176
+ 'no-self-assign' : 'error' ,
177
177
178
178
// disallow comparisons where both sides are exactly the same
179
- 'no-self-compare' : 2 ,
179
+ 'no-self-compare' : 'error' ,
180
180
181
181
// disallow use of comma operator
182
- 'no-sequences' : 2 ,
182
+ 'no-sequences' : 'error' ,
183
183
184
184
// restrict what can be thrown as an exception
185
- 'no-throw-literal' : 2 ,
185
+ 'no-throw-literal' : 'error' ,
186
186
187
187
// disallow unmodified conditions of loops
188
188
// http://eslint.org/docs/rules/no-unmodified-loop-condition
189
- 'no-unmodified-loop-condition' : 0 ,
189
+ 'no-unmodified-loop-condition' : 'off' ,
190
190
191
191
// disallow usage of expressions in statement position
192
- 'no-unused-expressions' : [ 2 , {
192
+ 'no-unused-expressions' : [ 'error' , {
193
193
allowShortCircuit : false ,
194
194
allowTernary : false ,
195
195
} ] ,
196
196
197
197
// disallow unused labels
198
198
// http://eslint.org/docs/rules/no-unused-labels
199
- 'no-unused-labels' : 2 ,
199
+ 'no-unused-labels' : 'error' ,
200
200
201
201
// disallow unnecessary .call() and .apply()
202
- 'no-useless-call' : 0 ,
202
+ 'no-useless-call' : 'off' ,
203
203
204
204
// disallow useless string concatenation
205
205
// http://eslint.org/docs/rules/no-useless-concat
206
- 'no-useless-concat' : 2 ,
206
+ 'no-useless-concat' : 'error' ,
207
207
208
208
// disallow unnecessary string escaping
209
209
// http://eslint.org/docs/rules/no-useless-escape
210
- 'no-useless-escape' : 2 ,
210
+ 'no-useless-escape' : 'error' ,
211
211
212
212
// disallow use of void operator
213
213
// http://eslint.org/docs/rules/no-void
214
- 'no-void' : 2 ,
214
+ 'no-void' : 'error' ,
215
215
216
216
// disallow usage of configurable warning terms in comments: e.g. todo
217
- 'no-warning-comments' : [ 0 , { terms : [ 'todo' , 'fixme' , 'xxx' ] , location : 'start' } ] ,
217
+ 'no-warning-comments' : [ 'off' , { terms : [ 'todo' , 'fixme' , 'xxx' ] , location : 'start' } ] ,
218
218
219
219
// disallow use of the with statement
220
- 'no-with' : 2 ,
220
+ 'no-with' : 'error' ,
221
221
222
222
// require use of the second argument for parseInt()
223
- radix : 2 ,
223
+ radix : 'error' ,
224
224
225
225
// requires to declare all vars on top of their containing scope
226
- 'vars-on-top' : 2 ,
226
+ 'vars-on-top' : 'error' ,
227
227
228
228
// require immediate function invocation to be wrapped in parentheses
229
229
// http://eslint.org/docs/rules/wrap-iife.html
230
- 'wrap-iife' : [ 2 , 'outside' ] ,
230
+ 'wrap-iife' : [ 'error' , 'outside' ] ,
231
231
232
232
// require or disallow Yoda conditions
233
- yoda : 2
233
+ yoda : 'error'
234
234
}
235
235
} ;
0 commit comments