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