-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.yaml
979 lines (963 loc) · 15.9 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
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
# compiled from and inspired by:
# https://eslint.org/docs/rules
# https://github.com/google/eslint-config-google
# https://github.com/facebook/create-react-app/tree/master/packages/eslint-config-react-app
# https://github.com/benmosher/eslint-plugin-import
# https://github.com/evcohen/eslint-plugin-jsx-a11y
# specify a parser that can understand all the cutting-edge JavaScript features/syntaxes we want to use
# https://eslint.org/docs/user-guide/configuring#specifying-parser
parser: babel-eslint
# set the parser to recognize all the cutting-edge JavaScript features/syntaxes we want to use
# https://eslint.org/docs/user-guide/configuring#specifying-parser-options
parserOptions:
ecmaVersion: 11
sourceType: module
ecmaFeatures:
jsx: true
modules: true
# specify environments to define global variables
# https://eslint.org/docs/user-guide/configuring#specifying-environments
env:
browser: true
node: true
commonjs: true
es2020: true
worker: true
amd: true
jest: true
# specify plugins to provide more rules and allow linting in additional contexts
plugins:
- import
- html
- react
- react-hooks
- jsx-a11y
# full rule set that we want to test and auto-fix for
rules:
# CORE - Possible Errors
for-direction:
- off
getter-return:
- off
no-async-promise-executor:
- off
no-await-in-loop:
- off
no-compare-neg-zero:
- warn
no-cond-assign:
- warn
no-console:
- off
no-constant-condition:
- warn
no-control-regex:
- warn
no-debugger:
- off
no-dupe-args:
- warn
no-dupe-else-if:
- warn
no-dupe-keys:
- warn
no-duplicate-case:
- warn
no-empty:
- warn
no-empty-character-class:
- warn
no-ex-assign:
- warn
no-extra-boolean-cast:
- warn
no-extra-parens:
- off
no-extra-semi:
- warn
no-func-assign:
- warn
no-import-assign:
- warn
no-inner-declarations:
- off
no-invalid-regexp:
- warn
no-irregular-whitespace:
- warn
no-misleading-character-class:
- off
no-obj-calls:
- warn
no-prototype-builtins:
- off
no-regex-spaces:
- off
no-setter-return:
- off
no-sparse-arrays:
- warn
no-template-curly-in-string:
- warn
no-unexpected-multiline:
- warn
no-unreachable:
- warn
no-unsafe-finally:
- warn
no-unsafe-negation:
- warn
no-useless-backreference:
- off
require-atomic-updates:
- off
use-isnan:
- warn
valid-typeof:
- warn
# CORE - Best Practices
accessor-pairs:
- off
array-callback-return:
- off
block-scoped-var:
- warn
class-methods-use-this:
- warn
complexity:
- off
consistent-return:
- off
curly:
- warn
- multi-or-nest
default-case:
- warn
default-case-last:
- off
default-param-last:
- off
dot-location:
- warn
- property
dot-notation:
- warn
eqeqeq:
- warn
grouped-accessor-pairs:
- off
guard-for-in:
- warn
max-classes-per-file:
- off
no-alert:
- off
no-caller:
- warn
no-case-declarations:
- warn
no-constructor-return:
- warn
no-div-regex:
- off
no-else-return:
- off
no-empty-function:
- off
no-empty-pattern:
- warn
no-eq-null:
- warn
no-eval:
- warn
no-extend-native:
- warn
no-extra-bind:
- warn
no-extra-label:
- warn
no-fallthrough:
- warn
no-floating-decimal:
- warn
no-global-assign:
- warn
no-implicit-coercion:
- warn
no-implicit-globals:
- off
no-implied-eval:
- warn
no-invalid-this:
- warn
no-iterator:
- warn
no-labels:
- warn
no-lone-blocks:
- warn
no-loop-func:
- warn
no-magic-numbers:
- off
no-multi-spaces:
- warn
no-multi-str:
- warn
no-new:
- warn
no-new-func:
- warn
no-new-wrappers:
- warn
no-octal:
- warn
no-octal-escape:
- off
no-param-reassign:
- off
no-proto:
- warn
no-redeclare:
- warn
no-restricted-properties:
- off
no-return-assign:
- off
no-return-await:
- warn
no-script-url:
- warn
no-self-assign:
- warn
no-self-compare:
- warn
no-sequences:
- off
no-throw-literal:
- warn
no-unmodified-loop-condition:
- off
no-unused-expressions:
- off
no-unused-labels:
- warn
no-useless-call:
- warn
no-useless-catch:
- warn
no-useless-concat:
- warn
no-useless-escape:
- warn
no-useless-return:
- off
no-void:
- warn
no-warn-comments:
- off
no-with:
- warn
prefer-named-capture-group:
- off
prefer-promise-reject-errors:
- warn
prefer-regex-literals:
- off
radix:
- off
require-await:
- warn
require-unicode-regexp:
- off
vars-on-top:
- off
wrap-iife:
- warn
yoda:
- warn
# CORE - Strict Mode
strict:
- off
# CORE - Variables
init-declarations:
- off
no-delete-var:
- warn
no-label-var:
- warn
no-restricted-globals:
- warn
no-shadow:
- off
no-shadow-restricted-names:
- warn
no-undef:
- warn
no-undef-init:
- off
no-undefined:
- off
no-unused-vars:
- warn
no-use-before-define:
- warn
- functions: false
classes: false
variables: false
# CORE - Node.js and CommonJS
callback-return:
- off
global-require:
- off
handle-callback-err:
- off
no-buffer-constructor:
- off
no-mixed-requires:
- off
no-new-require:
- off
no-path-concat:
- off
no-process-env:
- off
no-process-exit:
- off
no-restricted-modules:
- off
no-sync:
- off
# CORE - Stylistic Issues
array-bracket-newline:
- off
array-bracket-spacing:
- warn
array-element-newline:
- off
block-spacing:
- warn
brace-style:
- warn
camelcase:
- off
capitalized-comments:
- off
comma-dangle:
- warn
comma-spacing:
- warn
comma-style:
- warn
computed-property-spacing:
- warn
consistent-this:
- warn
eol-last:
- warn
func-call-spacing:
- warn
func-name-matching:
- warn
func-names:
- warn
- never
func-style:
- off
function-call-argument-newline:
- warn
- consistent
function-paren-newline:
- warn
- multiline-arguments
id-blacklist:
- off
id-length:
- off
id-match:
- off
implicit-arrow-linebreak:
- off
indent:
- warn
- 2
- SwitchCase: 1
VariableDeclarator: first
outerIIFEBody: 0
MemberExpression: 1
FunctionDeclaration:
parameters: first
body: 1
CallExpression:
arguments: first
ArrayExpression: first
ObjectExpression: first
ImportDeclaration: first
flatTernaryExpressions: false
ignoreComments: false
jsx-quotes:
- warn
- prefer-single
key-spacing:
- warn
keyword-spacing:
- warn
line-comment-position:
- off
linebreak-style:
- warn
lines-around-comment:
- off
lines-between-class-members:
- warn
max-depth:
- off
max-len:
- warn
- code: 80
comments: 80
tabWidth: 2
ignorePattern: ^.*import.*$
ignoreComments: true
ignoreTrailingComments: true
ignoreUrls: true
ignoreStrings: true
ignoreTemplateLiterals: true
ignoreRegExpLiterals: true
max-lines:
- off
max-lines-per-function:
- off
max-nested-callbacks:
- off
max-params:
- off
max-statements:
- off
max-statements-per-line:
- off
multiline-comment-style:
- off
multiline-ternary:
- off
new-cap:
- warn
new-parens:
- warn
newline-per-chained-call:
- off
no-array-constructor:
- warn
no-bitwise:
- off
no-continue:
- off
no-inline-comments:
- off
no-lonely-if:
- off
no-mixed-operators:
- off
no-mixed-spaces-and-tabs:
- warn
no-multi-assign:
- off
no-multiple-empty-lines:
- warn
- max: 2
no-negated-condition:
- off
no-nested-ternary:
- off
no-new-object:
- warn
no-plusplus:
- off
no-restricted-syntax:
- off
no-tabs:
- warn
no-ternary:
- off
no-trailing-spaces:
- warn
no-underscore-dangle:
- off
no-unneeded-ternary:
- off
no-whitespace-before-property:
- warn
nonblock-statement-body-position:
- warn
- below
object-curly-newline:
- warn
- multiline: true
consistent: true
object-curly-spacing:
- warn
- always
object-property-newline:
- off
one-var:
- off
one-var-declaration-per-line:
- warn
- always
operator-assignment:
- off
operator-linebreak:
- warn
- after
padded-blocks:
- warn
- never
padding-line-between-statements:
- off
prefer-exponentiation-operator:
- off
prefer-object-spread:
- warn
quote-props:
- warn
- consistent
quotes:
- warn
- single
- avoidEscape: true
allowTemplateLiterals: true
semi:
- warn
semi-spacing:
- warn
semi-style:
- warn
sort-keys:
- off
sort-vars:
- off
space-before-blocks:
- warn
space-before-function-paren:
- warn
- named: never
anonymous: never
asyncArrow: always
space-in-parens:
- warn
space-infix-ops:
- warn
space-unary-ops:
- off
spaced-comment:
- warn
switch-colon-spacing:
- warn
template-tag-spacing:
- off
unicode-bom:
- off
wrap-regex:
- off
# CORE - ECMAScript 6
arrow-body-style:
- off
arrow-parens:
- warn
arrow-spacing:
- warn
constructor-super:
- warn
generator-star-spacing:
- warn
no-class-assign:
- warn
no-confusing-arrow:
- off
no-const-assign:
- warn
no-dupe-class-members:
- warn
no-duplicate-imports:
- off
no-new-symbol:
- warn
no-restricted-exports:
- off
no-restricted-imports:
- off
no-this-before-super:
- warn
no-useless-computed-key:
- warn
no-useless-constructor:
- warn
no-useless-rename:
- warn
no-var:
- warn
object-shorthand:
- off
prefer-arrow-callback:
- warn
prefer-const:
- warn
- destructuring: all
prefer-destructuring:
- off
prefer-numeric-literals:
- off
prefer-rest-params:
- warn
prefer-spread:
- warn
prefer-template:
- off
require-yield:
- warn
rest-spread-spacing:
- warn
sort-imports:
- off
symbol-description:
- off
template-curly-spacing:
- warn
yield-star-spacing:
- warn
# PLUGIN - import
import/no-unresolved:
- off
import/named:
- off
import/default:
- off
import/namespace:
- off
import/no-restricted-paths:
- off
import/no-absolute-path:
- off
import/no-dynamic-require:
- off
import/no-internal-modules:
- off
import/no-webpack-loader-syntax:
- off
import/no-self-import:
- off
import/no-cycle:
- off
import/no-useless-path-segments:
- off
import/no-relative-parent-imports:
- off
import/no-unused-modules:
- off
import/export:
- off
import/no-named-as-default:
- off
import/no-named-as-default-member:
- off
import/no-deprecated:
- off
import/no-extraneous-dependencies:
- off
import/no-mutable-exports:
- off
import/unambiguous:
- off
import/no-commonjs:
- off
import/no-amd:
- warn
import/no-nodejs-modules:
- off
import/first:
- warn
import/exports-last:
- off
import/no-duplicates:
- off
import/no-namespace:
- off
import/extensions:
- off
import/order:
- off
import/newline-after-import:
- off
import/prefer-default-export:
- off
import/max-dependencies:
- off
import/no-unassigned-import:
- off
import/no-named-default:
- off
import/no-default-export:
- off
import/no-named-export:
- off
import/no-anonymous-default-export:
- off
import/group-exports:
- off
import/dynamic-import-chunkname:
- off
# PLUGIN - react
react/boolean-prop-naming:
- off
react/button-has-type:
- off
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-foreign-prop-types:
- off
react/forbid-prop-types:
- off
react/function-component-definition:
- off
react/no-access-state-in-setstate:
- off
react/no-adjacent-inline-elements:
- off
react/no-array-index-key:
- off
react/no-children-prop:
- warn
react/no-danger:
- off
react/no-danger-with-children:
- warn
react/no-deprecated:
- warn
react/no-did-mount-set-state:
- off
react/no-did-update-set-state:
- off
react/no-direct-mutation-state:
- warn
react/no-find-dom-node:
- warn
react/no-is-mounted:
- warn
react/no-multi-comp:
- off
react/no-redundant-should-component-update:
- off
react/no-render-return-value:
- warn
react/no-set-state:
- off
react/no-string-refs:
- warn
react/no-this-in-sfc:
- off
react/no-typos:
- warn
react/no-unescaped-entities:
- off
react/no-unknown-property:
- warn
react/no-unsafe:
- off
react/no-unused-prop-types:
- off
react/no-unused-state:
- off
react/no-will-update-set-state:
- off
react/prefer-es6-class:
- off
react/prefer-read-only-props:
- off
react/prefer-stateless-function:
- off
react/prop-types:
- off
react/react-in-jsx-scope:
- warn
react/require-default-props:
- off
react/require-optimization:
- off
react/require-render-return:
- warn
react/self-closing-comp:
- off
react/sort-comp:
- off
react/sort-prop-types:
- off
react/state-in-constructor:
- off
react/static-property-placement:
- off
react/style-prop-object:
- warn
react/void-dom-elements-no-children:
- off
# PLUGIN - react - JSX-specific rules
react/jsx-boolean-value:
- off
react/jsx-child-element-spacing:
- off
react/jsx-closing-bracket-location:
- off
react/jsx-closing-tag-location:
- off
react/jsx-curly-brace-presence:
- off
react/jsx-curly-newline:
- off
react/jsx-curly-spacing:
- off
react/jsx-equals-spacing:
- off
react/jsx-filename-extension:
- warn
- extensions:
- .js
- .jsx
react/jsx-first-prop-new-line:
- off
react/jsx-fragments:
- off
react/jsx-handler-names:
- off
react/jsx-indent:
- off
react/jsx-indent-props:
- off
react/jsx-key:
- warn
react/jsx-max-depth:
- off
react/jsx-max-props-per-line:
- off
react/jsx-no-bind:
- off
react/jsx-no-comment-textnodes:
- warn
react/jsx-no-duplicate-props:
- warn
react/jsx-no-literals:
- off
react/jsx-no-script-url:
- off
react/jsx-no-target-blank:
- warn
react/jsx-no-undef:
- warn
react/jsx-no-useless-fragment:
- off
react/jsx-one-expression-per-line:
- off
react/jsx-pascal-case:
- warn
react/jsx-props-no-multi-spaces:
- off
react/jsx-props-no-spreading:
- off
react/jsx-sort-default-props:
- off
react/jsx-sort-props:
- off
react/jsx-space-before-closing:
- off
react/jsx-tag-spacing:
- off
react/jsx-uses-react:
- warn
react/jsx-uses-vars:
- warn
react/jsx-wrap-multilines:
- off
# PLUGIN - react-hooks
react-hooks/rules-of-hooks:
- warn
react-hooks/exhaustive-deps:
- warn
# PLUGIN - jsx-a11ywarn
jsx-a11y/accessible-emoji:
- warn
jsx-a11y/alt-text:
- warn
jsx-a11y/anchor-has-content:
- warn
jsx-a11y/anchor-is-valid:
- off
jsx-a11y/aria-activedescendant-has-tabindex:
- warn
jsx-a11y/aria-props:
- warn
jsx-a11y/aria-proptypes:
- warn
jsx-a11y/aria-role:
- warn
jsx-a11y/aria-unsupported-elements:
- warn
jsx-a11y/click-events-have-key-events:
- off
jsx-a11y/control-has-associated-label:
- off
jsx-a11y/heading-has-content:
- warn
jsx-a11y/html-has-lang:
- off
jsx-a11y/iframe-has-title:
- warn
jsx-a11y/img-redundant-alt:
- warn
jsx-a11y/interactive-supports-focus:
- off
jsx-a11y/label-has-associated-control:
- off
jsx-a11y/label-has-for:
- off
jsx-a11y/lang:
- off
jsx-a11y/media-has-caption:
- off
jsx-a11y/mouse-events-have-key-events:
- off
jsx-a11y/no-access-key:
- warn
jsx-a11y/no-autofocus:
- off
jsx-a11y/no-distracting-elements:
- warn
jsx-a11y/no-interactive-element-to-noninteractive-role:
- off
jsx-a11y/no-noninteractive-element-interactions:
- off
jsx-a11y/no-noninteractive-element-to-interactive-role:
- off
jsx-a11y/no-noninteractive-tabindex:
- off
jsx-a11y/no-onchange:
- off
jsx-a11y/no-redundant-roles:
- warn
jsx-a11y/no-static-element-interactions:
- off
jsx-a11y/role-has-required-aria-props:
- warn
jsx-a11y/role-supports-aria-props:
- warn
jsx-a11y/scope:
- warn
jsx-a11y/tabindex-no-positive:
- off