This repository was archived by the owner on Aug 22, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy path.eslintrc.yaml
381 lines (294 loc) · 6.63 KB
/
.eslintrc.yaml
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
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
env:
browser: true
node: true
es6: true
plugins:
- html
globals:
module: false
RED: true
# configure rules
rules:
# Handles destructuring arrays with flow type in function parameters
array-bracket-spacing:
- error
- always
- arraysInArrays: false
objectsInArrays: false
# Enforce return statements in callbacks of array’s methods
array-callback-return:
- error
# Consistent arrow bodies
arrow-body-style:
- error
- never
# Guard against awaiting async functions inside of a loop
no-await-in-loop:
- warn
# Force spacing in single line blocks
block-spacing:
- error
- always
# Force the one true brace style
brace-style:
- error
- 1tbs
# Do not force camel-case
camelcase:
- off
# Force dangling commas
comma-dangle:
- error
- always-multiline
# Enforce spacing and after comma
comma-spacing:
- error
# Enforce one true comma style
comma-style:
- error
- last
# Require or disallow padding inside computed properties
computed-property-spacing:
- error
# Specify curly brace conventions for all control statements
curly:
- error
- all
# Enforce consistent newlines before or after dots
dot-location:
- error
- property
# Encourage use of dot notation whenever possible
dot-notation:
- error
# Require use of === and !==
eqeqeq:
- error
# Force consistent spacing when calling functions
func-call-spacing:
- error
- never
# Force space around generator stars
generator-star-spacing:
- error
- both
# Consisten indentation
indent:
- error
- 2
- SwitchCase: 0
MemberExpression: 1
# Consistent object key spacing
key-spacing:
- error
- beforeColon: false
afterColon: true
mode: strict
# Enforce spacing before and after keywords
keyword-spacing:
- error
# Disallow alert
no-alert:
- error
# Disallow if (true) and if (false)
no-constant-condition:
- error
# Disallow duplicate fn arguments
no-dupe-args:
- error
# Disallow duplicate object keys
no-dupe-keys:
- error
# Disallow duplicate case statements
no-duplicate-case:
- error
# Prevent duplicate imports
no-duplicate-imports:
- error
# Simplify if-else when possible
no-else-return:
- error
# Disallow eval
no-eval:
- error
# Avoid unnecessary binds
no-extra-bind:
- error
# Disallow faulty function assignments
no-func-assign:
- error
# Disallow assigning to globals
no-global-assign:
- error
# Avoid implied eval
no-implied-eval:
- error
# Avoid implicit globals
no-implicit-globals:
- error
# Disallow decalring functions inside nested block
no-inner-declarations:
- warn
# Prevent invalid regexes
no-invalid-regexp:
- error
# Prevent spacing characters other than space
no-irregular-whitespace:
- error
# Avoid lonely ifs in else blocks
no-lonely-if:
- error
# Prevent !a in b instead of !(a in b) bug
no-negated-in-lhs:
- error
# Avoid creating wrappers for String, Boolean, ...
no-new-wrappers:
- error
# Disallow mixed spaces and tabs for indentation
no-mixed-spaces-and-tabs:
- error
# Disallow use of multiple spaces
no-multi-spaces:
- error
# Prevent the accidental calling of global objects as functions
no-obj-calls:
- error
# Disallow reassignment of function parameters
no-param-reassign:
- error
# Forbid __proto__
no-proto:
- error
# Forbid x === x
no-self-compare:
- error
# Disallow assignments where both sides are exactly the same
no-self-assign:
- error
# disallow space between function identifier and application
no-spaced-func:
- error
# Disallow [,,]
no-sparse-arrays:
- error
# disallow trailing whitespace at the end of lines
no-trailing-spaces:
- error
# Avoid unnecessary ternaries
no-unneeded-ternary:
- error
# Disallow unreachable code
no-unreachable:
- error
# Disallow unsafe negations
no-unsafe-negation:
- error
no-unused-expressions:
- error
# Forbid unused variables
no-unused-vars:
- error
- args: none
caughtErrors: none
ignoreDestructuredVarsWithRest: true
no-useless-call:
- error
no-useless-computed-key:
- error
no-useless-constructor:
- error
no-useless-escape:
- error
no-useless-rename:
- error
# Disallow use of undefined
no-undefined:
- off
# Disallow use of undefined variables
no-undef:
- error
# Disallow use of variables before they are defined
no-use-before-define:
- warn
- functions: false
# Disallow whit blocks
no-with:
- error
# Disallow whitespace before object properties
no-whitespace-before-property:
- error
# Consistent object newlines
object-curly-newline:
- error
- multiline: true
consistent: true
# Allow only one declaration per line
one-var-declaration-per-line:
- error
# Force operator shorthands when possible
operator-assignment:
- error
- always
# Enforce operators to be placed before or after line breaks
operator-linebreak:
- error
- before
- overrides:
=: after
# Suggest using the rest parameters instead of arguments
prefer-rest-params:
- error
# Suggest using the spread operator instead of .apply()
prefer-spread:
- error
# Avoid useless string concatenation
no-useless-concat:
- error
# Require quotes around object literal property names
quote-props:
- error
- as-needed
- keywords: true
# Specify whether backticks, double or single quotes should be used
quotes:
- error
- double
- avoidEscape: true
allowTemplateLiterals: true
# Consistent spacing of the rest operator
rest-spread-spacing:
- error
- never
# Require or disallow use of semicolons instead of ASI
semi:
- error
- never
# Require or disallow a space before blocks
space-before-blocks:
- error
# Require or disallow a space before function opening parenthesis
space-before-function-paren:
- error
space-infix-ops:
- error
space-unary-ops:
- error
- nonwords: false
words: true
# Require or disallow a space immediately following the // or /* in a comment
spaced-comment:
- error
# Consistent spacing in template string
template-curly-spacing:
- error
# Never compare to NaN
use-isnan:
- error
# Ensure string compared to typeof is valid
valid-typeof:
- error
# enforce spacing around the * in yield* expressions
yield-star-spacing:
- error
- both
# vim: ft=yaml