@@ -17,24 +17,12 @@ module.exports = {
17
17
// make sure for-in loops have an if statement
18
18
"guard-for-in" : "error" ,
19
19
20
- // require a capital letter for constructors
21
- "new-cap" : "error" ,
22
-
23
- // disallow the omission of parentheses when invoking a constructor with no arguments
24
- "new-parens" : "error" ,
25
-
26
20
// disallow use of the Array constructor
27
21
"no-array-constructor" : "error" ,
28
22
29
23
// disallow use of bitwise operators
30
24
"no-bitwise" : "error" ,
31
25
32
- // disallow use of arguments.caller or arguments.callee
33
- "no-caller" : "error" ,
34
-
35
- // disallow the catch clause parameter name being the same as a variable in the outer scope
36
- "no-catch-shadow" : "warn" ,
37
-
38
26
// disallow assignment in conditional expressions
39
27
"no-cond-assign" : "error" ,
40
28
@@ -68,9 +56,6 @@ module.exports = {
68
56
// disallow comparisons to null without a type-checking operator
69
57
"no-eq-null" : "error" ,
70
58
71
- // disallow use of eval()
72
- "no-eval" : "error" ,
73
-
74
59
// disallow adding to native types
75
60
"no-extend-native" : "error" ,
76
61
@@ -92,9 +77,6 @@ module.exports = {
92
77
// disallow overwriting functions written as function declarations
93
78
"no-func-assign" : "error" ,
94
79
95
- // disallow use of eval()-like methods
96
- "no-implied-eval" : "error" ,
97
-
98
80
// disallow function or variable declarations in nested blocks
99
81
"no-inner-declarations" : "error" ,
100
82
@@ -107,18 +89,12 @@ module.exports = {
107
89
// disallow labels that share a name with a variable
108
90
"no-label-var" : "error" ,
109
91
110
- // disallow use of labeled statements
111
- "no-labels" : "error" ,
112
-
113
92
// disallow unnecessary nested blocks
114
93
"no-lone-blocks" : "warn" ,
115
94
116
95
// disallow creation of functions within loops
117
96
"no-loop-func" : "warn" ,
118
97
119
- // disallow use of multiline strings
120
- "no-multi-str" : "error" ,
121
-
122
98
// disallow reassignments of native objects
123
99
"no-native-reassign" : "error" ,
124
100
@@ -146,36 +122,33 @@ module.exports = {
146
122
// disallow use of octal escape sequences in string literals, such as var foo = "Copyright \050";
147
123
"no-octal-escape" : "error" ,
148
124
149
- // disallow usage of __proto__ property
150
- "no-proto" : "error" ,
151
-
152
125
// disallow declaring the same variable more then once
153
126
"no-redeclare" : "error" ,
154
127
155
- // disallow use of javascript: urls.
156
- "no-script-url" : "error" ,
157
-
158
128
// disallow comparisons where both sides are exactly the same
159
129
"no-self-compare" : "error" ,
160
130
161
- // disallow use of comma operator
162
- "no-sequences" : "error" ,
163
-
164
131
// disallow declaration of variables already declared in the outer scope
165
132
"no-shadow" : "warn" ,
166
133
167
- // disallow shadowing of names such as arguments
168
- "no-shadow-restricted-names" : "error" ,
169
-
170
134
// disallow sparse arrays
171
135
"no-sparse-arrays" : "error" ,
172
136
173
- // disallow throwing non-Error objects
174
- "no-throw-literal" : "error" ,
175
-
176
137
// disallow use of undeclared variables unless mentioned in a /*global */ block
177
138
"no-undef" : "error" ,
178
139
140
+ // disallow unreachable statements after a return, throw, continue, or break statement
141
+ "no-unreachable" : "warn" ,
142
+
143
+ // disallow usage of expressions in statement position
144
+ "no-unused-expressions" : [
145
+ "error" ,
146
+ {
147
+ allowShortCircuit : true , // allow short-circuited expressions (e.g. foo && bar())
148
+ allowTernary : true , // allow ternary expressions (e.g. foo ? bar() : baz())
149
+ } ,
150
+ ] ,
151
+
179
152
// disallow declaration of variables that are not used in the code
180
153
"no-unused-vars" : [
181
154
"error" ,
@@ -185,22 +158,6 @@ module.exports = {
185
158
} ,
186
159
] ,
187
160
188
- // disallow use of void operator
189
- "no-void" : "error" ,
190
-
191
- // disallow use of the with statement
192
- "no-with" : "error" ,
193
-
194
- // require assignment operator shorthand where possible
195
- "operator-assignment" : "error" ,
196
-
197
- // Require the "use strict" pragma, either at the global level or function level,
198
- // depending on whether CommonJS is being used or not
199
- strict : [
200
- "error" ,
201
- "safe" ,
202
- ] ,
203
-
204
161
// disallow comparisons with the value NaN
205
162
"use-isnan" : "error" ,
206
163
@@ -210,8 +167,5 @@ module.exports = {
210
167
// require immediate function invocation to be wrapped in parentheses
211
168
"wrap-iife" : "error" ,
212
169
213
- // disallow Yoda conditions
214
- yoda : "error" ,
215
-
216
170
}
217
171
} ;
0 commit comments