-
-
Notifications
You must be signed in to change notification settings - Fork 10
/
.eslintrc.yaml
409 lines (408 loc) · 8.54 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
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
# Copied from musicbrainz-server:
# https://github.com/metabrainz/musicbrainz-server/blob/master/.eslintrc.yaml
root: true
parser: "@babel/eslint-parser"
parserOptions:
requireConfigFile: false
babelOptions:
presets:
- "@babel/preset-react"
plugins:
- import
- react
- prettier
env:
browser: true
node: true
extends:
- eslint:recommended
- plugin:react/recommended
- plugin:prettier/recommended
settings:
react:
version: detect
rules:
for-direction: error
no-await-in-loop: error
no-cond-assign: warn
no-constant-condition:
- error
- checkLoops: false
no-control-regex: warn
no-debugger: error
no-dupe-args: error
no-dupe-keys: error
no-duplicate-case: error
no-empty-character-class: error
no-empty:
- error
- allowEmptyCatch: true
no-extra-semi: warn
no-irregular-whitespace: warn
no-obj-calls: error
no-prototype-builtins: warn
no-regex-spaces: error
no-sparse-arrays: error
no-unexpected-multiline: error
no-unreachable: error
no-unsafe-finally: error
no-unsafe-negation: error
use-isnan: error
valid-typeof: error
block-scoped-var: warn
class-methods-use-this: warn
consistent-return: error
curly:
- error
- all
dot-location:
- warn
- property
dot-notation:
- warn
- allowKeywords: true
eqeqeq: warn
no-alert: 'off'
no-else-return: warn
no-eq-null: error
no-floating-decimal: warn
no-multi-spaces:
- error
- ignoreEOLComments: true
radix: warn
wrap-iife: warn
strict: 'off'
no-use-before-define: 'off'
array-bracket-newline:
- warn
- multiline: true
array-bracket-spacing:
- warn
- never
array-element-newline:
- warn
- multiline: true
block-spacing:
- warn
- always
brace-style:
- warn
- 1tbs
camelcase:
- warn
- properties: never
comma-dangle:
- warn
- arrays: always-multiline
objects: always-multiline
imports: always-multiline
exports: always-multiline
functions: always-multiline
comma-spacing:
- warn
- before: false
after: true
comma-style:
- warn
- last
computed-property-spacing:
- warn
- never
consistent-this:
- warn
- self
eol-last:
- warn
- always
func-call-spacing:
- warn
- never
function-paren-newline:
- warn
- consistent
implicit-arrow-linebreak:
- warn
- beside
indent:
- warn
- 2
- SwitchCase: 1
jsx-quotes:
- warn
- prefer-double
key-spacing:
- warn
- mode: minimum
keyword-spacing:
- warn
- before: true
after: true
linebreak-style:
- warn
- unix
lines-between-class-members:
- warn
- always
max-len:
- warn
- code: 78
ignoreUrls: true
ignoreStrings: true
ignoreTemplateLiterals: true
ignoreRegExpLiterals: true
max-statements-per-line:
- warn
- max: 1
multiline-comment-style:
- warn
- starred-block
multiline-ternary: 'off'
new-cap: 'off'
new-parens: warn
newline-per-chained-call:
- warn
- ignoreChainWithDepth: 3
no-lonely-if: warn
no-mixed-spaces-and-tabs: warn
no-multi-assign: 'off'
no-multiple-empty-lines:
- warn
- max: 2
maxBOF: 0
maxEOF: 0
no-negated-condition: warn
no-nested-ternary: 'off'
no-plusplus: 'off'
no-tabs: warn
no-ternary: 'off'
no-trailing-spaces: warn
no-underscore-dangle: 'off'
no-unneeded-ternary: warn
no-whitespace-before-property: warn
object-curly-newline:
- warn
- multiline: true
consistent: true
object-curly-spacing:
- warn
- never
object-property-newline:
- warn
- allowAllPropertiesOnSameLine: true
one-var:
- warn
- never
operator-assignment:
- warn
- always
operator-linebreak:
- warn
- after
- overrides:
"?": before
":": before
padded-blocks:
- warn
- never
quote-props:
- warn
- consistent-as-needed
- numbers: true
quotes:
- warn
- single
- avoidEscape: true
allowTemplateLiterals: true
semi:
- warn
- always
- omitLastInOneLineBlock: true
semi-spacing:
- warn
- before: false
after: true
semi-style:
- warn
- last
sort-keys:
- warn
- asc
- caseSensitive: true
natural: true
space-before-blocks:
- warn
- always
space-before-function-paren:
- warn
- anonymous: always
named: never
asyncArrow: always
space-in-parens:
- warn
- never
space-infix-ops:
- warn
- int32Hint: true
space-unary-ops:
- warn
- words: true
nonwords: false
spaced-comment:
- warn
- always
- block:
balanced: true
switch-colon-spacing:
- warn
- after: true
before: false
template-tag-spacing:
- warn
- never
constructor-super: error
no-class-assign: error
no-const-assign: error
no-dupe-class-members: error
no-duplicate-imports: 'off'
no-new-symbol: error
no-this-before-super: error
no-useless-constructor: warn
no-useless-rename: warn
no-var: warn
prefer-const: warn
prefer-numeric-literals: warn
require-yield: error
rest-spread-spacing:
- warn
- never
sort-imports: 'off'
template-curly-spacing:
- warn
- never
import/export: error
import/extensions:
- warn
- never
import/first: warn
import/newline-after-import:
- warn
- count: 1
import/no-commonjs: error
import/no-duplicates: warn
import/no-dynamic-require: error
import/no-unresolved: error
import/order:
- warn
- newlines-between: always
react/boolean-prop-naming: 'off'
react/button-has-type: error
react/default-props-match-prop-types: 'off'
react/destructuring-assignment: 'off'
react/display-name: 'off'
react/forbid-component-props: 'off'
react/forbid-dom-props: 'off'
react/forbid-elements: 'off'
react/forbid-prop-types: 'off'
react/forbid-foreign-prop-types: 'off'
react/no-access-state-in-setstate: error
react/no-array-index-key: 'off'
react/no-children-prop: error
react/no-danger: 'off'
react/no-danger-with-children: error
react/no-deprecated: error
react/no-did-mount-set-state: 'off'
react/no-did-update-set-state: error
react/no-direct-mutation-state: error
react/no-find-dom-node: warn
react/no-is-mounted: warn
react/no-multi-comp:
- warn
- ignoreStateless: true
react/no-redundant-should-component-update: error
react/no-render-return-value: warn
react/no-set-state: 'off'
react/no-typos: error
react/no-string-refs: warn
react/no-this-in-sfc: error
react/no-unescaped-entities: error
react/no-unknown-property: error
react/no-unused-prop-types: 'off'
react/no-unused-state: error
react/no-will-update-set-state: error
react/prefer-es6-class: 'off'
react/prefer-stateless-function: warn
react/prop-types: 'off'
react/react-in-jsx-scope: error
react/require-default-props: 'off'
react/require-optimization: 'off'
react/require-render-return: error
react/self-closing-comp: error
react/sort-comp: warn
react/sort-prop-types: 'off'
react/style-prop-object: error
react/void-dom-elements-no-children: error
react/jsx-boolean-value:
- warn
- never
react/jsx-closing-bracket-location:
- error
- tag-aligned
react/jsx-closing-tag-location: error
react/jsx-curly-spacing:
- error
- when: never
children: true
react/jsx-equals-spacing:
- error
- never
react/jsx-filename-extension:
- error
- extensions:
- ".js"
react/jsx-first-prop-new-line:
- error
- multiline-multiprop
react/jsx-handler-names: warn
react/jsx-indent:
- error
- 2
react/jsx-indent-props:
- error
- 2
react/jsx-key: warn
react/jsx-max-props-per-line:
- error
- maximum: 1
when: multiline
react/jsx-no-bind: warn
react/jsx-no-comment-textnodes: warn
react/jsx-no-duplicate-props:
- error
- ignoreCase: true
react/jsx-no-literals: warn
react/jsx-no-target-blank: error
react/jsx-no-undef:
- error
- allowGlobals: true
react/jsx-one-expression-per-line: 'off'
react/jsx-curly-brace-presence:
- error
- props: never
children: ignore
react/jsx-pascal-case: error
react/jsx-sort-default-props: warn
react/jsx-sort-props: warn
react/jsx-tag-spacing:
- error
- beforeClosing: never
react/jsx-uses-react: warn
react/jsx-uses-vars: warn
react/jsx-wrap-multilines:
- error
- declaration: parens-new-line
assignment: parens-new-line
return: parens-new-line
arrow: parens-new-line
condition: ignore
logical: ignore
prop: ignore