-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.json
1173 lines (914 loc) · 45.7 KB
/
.eslintrc.json
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
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
{
"env": {
"browser": true,
"es6": true
},
"extends": "eslint-config-airbnb",
"rules": {
// Enforces getter/setter pairs in objects and classes
// https://eslint.org/docs/rules/accessor-pairs
"accessor-pairs": "off",
// Enforces return statements in callbacks of array"s methods
// https://eslint.org/docs/rules/array-callback-return
"array-callback-return": "error",
// Limit Cyclomatic Complexity
// https://eslint.org/docs/rules/complexity
"complexity": "off",
// Enforce that class methods utilize this
// https://eslint.org/docs/rules/class-methods-use-this
"class-methods-use-this": "off",
// Require return statements to either always or never specify values
// https://eslint.org/docs/rules/consistent-return
"consistent-return": "off",
// Require Following Curly Brace Conventions
// https://eslint.org/docs/rules/curly
"curly": [ "error", "multi-line" ],
// Require Default Case in Switch Statements
// https://eslint.org/docs/rules/default-case
"default-case": "off",
// Enforce default clauses in switch statements to be last
// https://eslint.org/docs/rules/default-case-last
"default-case-last": "off",
// Enforce default parameters to be last
// https://eslint.org/docs/rules/default-param-last
"default-param-last": "off",
// Require Dot Notation
// https://eslint.org/docs/rules/dot-notation
"dot-notation": [ "error", { "allowKeywords": true }],
// Enforce newline before and after dot
// https://eslint.org/docs/rules/dot-location
"dot-location": [ "error", "property" ],
// Require === and !==
// https://eslint.org/docs/rules/eqeqeq
"eqeqeq": [ "error", "always" ],
// Require grouped accessor pairs in object literals and classes
// https://eslint.org/docs/rules/grouped-accessor-pairs
"grouped-accessor-pairs": "error",
// Require Guarding for-in
// https://eslint.org/docs/rules/guard-for-in
"guard-for-in": "error",
// Enforce a maximum number of classes per file
// https://eslint.org/docs/rules/max-classes-per-file
"max-classes-per-file": [ "error", 1 ],
// Disallow Use of Alert
// https://eslint.org/docs/rules/no-alert
"no-alert": "error",
// Disallow Use of caller/callee
// https://eslint.org/docs/rules/no-caller
"no-caller": "error",
// Disallow lexical declarations in case/default clauses
// https://eslint.org/docs/rules/no-case-declarations
"no-case-declarations": "error",
// Disallow returning value in constructor
// https://eslint.org/docs/rules/no-constructor-return
"no-constructor-return": "error",
// Disallow Regular Expressions That Look Like Division
// https://eslint.org/docs/rules/no-div-regex
"no-div-regex": "off",
// Disallow return before else
// https://eslint.org/docs/rules/no-else-return
"no-else-return": "off",
// Disallow empty functions
// https://eslint.org/docs/rules/no-empty-function
"no-empty-function": "off",
// Disallow empty destructuring patterns
// https://eslint.org/docs/rules/no-empty-pattern
"no-empty-pattern": "error",
// Disallow Null Comparisons
// https://eslint.org/docs/rules/no-eq-null
"no-eq-null": "error",
// Disallow eval()
// https://eslint.org/docs/rules/no-eval
"no-eval": "error",
// Disallow Extending of Native Objects
// https://eslint.org/docs/rules/no-extend-native
"no-extend-native": "error",
// Disallow unnecessary function binding
// https://eslint.org/docs/rules/no-extra-bind
"no-extra-bind": "error",
// Disallow Unnecessary Labels
// https://eslint.org/docs/rules/no-extra-label
"no-extra-label": "error",
// Disallow Case Statement Fallthrough
// https://eslint.org/docs/rules/no-fallthrough
"no-fallthrough": "error",
// Disallow Floating Decimals
// https://eslint.org/docs/rules/no-floating-decimal
"no-floating-decimal": "error",
// Disallow assignment to native objects or read-only global variables
// https://eslint.org/docs/rules/no-global-assign
"no-global-assign": "error",
// Disallow the type conversion with shorter notations.
// https://eslint.org/docs/rules/no-implicit-coercion
"no-implicit-coercion": "off",
// Disallow declarations in the global scope
// https://eslint.org/docs/rules/no-implicit-globals
"no-implicit-globals": "off",
// Disallow Implied eval()
// https://eslint.org/docs/rules/no-implied-eval
"no-implied-eval": "error",
// Disallow this keywords outside of classes or class-like objects.
// https://eslint.org/docs/rules/no-invalid-this
"no-invalid-this": "off",
// Disallow Iterator
// https://eslint.org/docs/rules/no-iterator
"no-iterator": "error",
// Disallow Labeled Statements
// https://eslint.org/docs/rules/no-labels
"no-labels": [ "error", { "allowLoop": true, "allowSwitch": true }],
// Disallow Unnecessary Nested Blocks
// https://eslint.org/docs/rules/no-lone-blocks
"no-lone-blocks": "error",
// Disallow Functions in Loops
// https://eslint.org/docs/rules/no-loop-func
"no-loop-func": "off",
// Disallow Magic Numbers
// https://eslint.org/docs/rules/no-magic-numbers
"no-magic-numbers": "off",
// Disallow multiple spaces
// https://eslint.org/docs/rules/no-multi-spaces
"no-multi-spaces": "error",
// Disallow Multiline Strings
// https://eslint.org/docs/rules/no-multi-str
"no-multi-str": "error",
// Disallow new For Side Effects
// https://eslint.org/docs/rules/no-new
"no-new": "error",
// Disallow Function Constructor
// https://eslint.org/docs/rules/no-new-func
"no-new-func": "error",
// Disallow Primitive Wrapper Instances
// https://eslint.org/docs/rules/no-new-wrappers
"no-new-wrappers": "error",
// Disallow octal literals
// https://eslint.org/docs/rules/no-octal
"no-octal": "error",
// Disallow octal escape sequences in string literals
// https://eslint.org/docs/rules/no-octal-escape
"no-octal-escape": "error",
// Disallow Reassignment of Function Parameters
// https://eslint.org/docs/rules/no-param-reassign
"no-param-reassign": "off",
// Disallow Use of __proto__
// https://eslint.org/docs/rules/no-proto
"no-proto": "error",
// Disallow variable redeclaration
// https://eslint.org/docs/rules/no-redeclare
"no-redeclare": "error",
// Disallow certain object properties
// https://eslint.org/docs/rules/no-restricted-properties
"no-restricted-properties": [
"error",
{
"object": "arguments",
"property": "callee",
"message": "arguments.callee is deprecated"
},
{
"object": "global",
"property": "isFinite",
"message": "Please use Number.isFinite instead"
},
{
"object": "self",
"property": "isFinite",
"message": "Please use Number.isFinite instead"
},
{
"object": "window",
"property": "isFinite",
"message": "Please use Number.isFinite instead"
},
{
"object": "global",
"property": "isNaN",
"message": "Please use isNaN instead"
},
{
"object": "self",
"property": "isNaN",
"message": "Please use isNaN instead"
},
{
"object": "window",
"property": "isNaN",
"message": "Please use isNaN instead"
},
{
"property": "__defineGetter__",
"message": "Please use Object.defineProperty instead."
},
{
"property": "__defineSetter__",
"message": "Please use Object.defineProperty instead."
},
{
"object": "Math",
"property": "pow",
"message": "Use the exponentiation operator (**) instead."
}
],
// Disallow Assignment in return Statement
// https://eslint.org/docs/rules/no-return-assign
"no-return-assign": [ "error", "always" ],
// Disallows unnecessary return await
// https://eslint.org/docs/rules/no-return-await
"no-return-await": "error",
// Disallow Script URLs
// https://eslint.org/docs/rules/no-script-url
"no-script-url": "error",
// Disallow Self Assignment
// https://eslint.org/docs/rules/no-self-assign
"no-self-assign": "error",
// Disallow Self Compare
// https://eslint.org/docs/rules/no-self-compare
"no-self-compare": "off",
// Disallow Use of the Comma Operator
// https://eslint.org/docs/rules/no-sequences
"no-sequences": "error",
// Restrict what can be thrown as an exception
// https://eslint.org/docs/rules/no-throw-literal
"no-throw-literal": "error",
// Disallow unmodified conditions of loops
// https://eslint.org/docs/rules/no-unmodified-loop-condition
"no-unmodified-loop-condition": "off",
// Disallow Unused Expressions
// https://eslint.org/docs/rules/no-unused-expressions
"no-unused-expressions": "error",
// Disallow Unused Labels
// https://eslint.org/docs/rules/no-unused-labels
"no-unused-labels": "error",
// Disallow unnecessary .call() and .apply()
// https://eslint.org/docs/rules/no-useless-call
"no-useless-call": "off",
// Disallow unnecessary catch clauses
// https://eslint.org/docs/rules/no-useless-catch
"no-useless-catch": "error",
// Disallow unnecessary concatenation of strings
// https://eslint.org/docs/rules/no-useless-concat
"no-useless-concat": "error",
// Disallow unnecessary escape usage
// https://eslint.org/docs/rules/no-useless-escape
"no-useless-escape": "error",
// Disallow redundant return statements
// https://eslint.org/docs/rules/no-useless-return
"no-useless-return": "error",
// Disallow use of void operator
// https://eslint.org/docs/rules/no-void
"no-void": "error",
// Disallow Warning Comments
// https://eslint.org/docs/rules/no-warning-comments
"no-warning-comments": "off",
// Disallow with statements
// https://eslint.org/docs/rules/no-with
"no-with": "error",
// Require using Error objects as Promise rejection reasons
// https://eslint.org/docs/rules/prefer-promise-reject-errors
"prefer-promise-reject-errors": [ "error", { "allowEmptyReject": true }],
// Suggest using named capture group in regular expression
// https://eslint.org/docs/rules/prefer-named-capture-group
"prefer-named-capture-group": "off",
// Disallow use of the RegExp constructor in favor of regular expression literals
// https://eslint.org/docs/rules/prefer-regex-literals
"prefer-regex-literals": "off",
// Require Radix Parameter
// https://eslint.org/docs/rules/radix
"radix": "error",
// Disallow async functions which have no await expression
// https://eslint.org/docs/rules/require-await
"require-await": "error",
// Enforce the use of u flag on RegExp
// https://eslint.org/docs/rules/require-unicode-regexp
"require-unicode-regexp": "off",
// Require Variable Declarations to be at the top of their scope
// https://eslint.org/docs/rules/vars-on-top
"vars-on-top": "error",
// Require IIFEs to be Wrapped
// https://eslint.org/docs/rules/wrap-iife
"wrap-iife": [ "error", "inside", { "functionPrototypeMethods": false }],
// Require or disallow Yoda Conditions
// https://eslint.org/docs/rules/yoda
"yoda": "error",
// Enforce "for" loop update clause moving the counter in the right direction
// https://eslint.org/docs/rules/for-direction
"for-direction": "error",
// Enforces that a return statement is present in property getters
// https://eslint.org/docs/rules/getter-return
"getter-return": "off",
// Disallow using an async function as a Promise executor
// https://eslint.org/docs/rules/no-async-promise-executor
"no-async-promise-executor": "error",
// https://eslint.org/docs/rules/no-await-in-loop
"no-await-in-loop": "off",
// Disallow comparing against -0
// https://eslint.org/docs/rules/no-compare-neg-zero
"no-compare-neg-zero": "error",
// Disallow assignment operators in conditional statements
// https://eslint.org/docs/rules/no-cond-assign
"no-cond-assign": [ "error", "always" ],
// Disallow the use of console
// https://eslint.org/docs/rules/no-console
"no-console": "off",
// Disallow constant expressions in conditions
// https://eslint.org/docs/rules/no-constant-condition
"no-constant-condition": "error",
// Disallow control characters in regular expressions
// https://eslint.org/docs/rules/no-control-regex
"no-control-regex": "error",
// Disallow the use of debugger
// https://eslint.org/docs/rules/no-debugger
"no-debugger": "off",
// Disallow duplicate arguments in function definitions
// https://eslint.org/docs/rules/no-dupe-args
"no-dupe-args": "error",
// Disallow duplicate conditions in if-else-if chains
// https://eslint.org/docs/rules/no-dupe-else-if
"no-dupe-else-if": "error",
// Disallow duplicate keys in object literals
// https://eslint.org/docs/rules/no-dupe-keys
"no-dupe-keys": "error",
// Rule to disallow a duplicate case label
// https://eslint.org/docs/rules/no-duplicate-case
"no-duplicate-case": "error",
// Disallow empty block statements
// https://eslint.org/docs/rules/no-empty
"no-empty": "error",
// Disallow empty character classes in regular expressions
// https://eslint.org/docs/rules/no-empty-character-class
"no-empty-character-class": "error",
// Disallow reassigning exceptions in catch clauses
// https://eslint.org/docs/rules/no-ex-assign
"no-ex-assign": "error",
// Disallow unnecessary boolean casts
// https://eslint.org/docs/rules/no-extra-boolean-cast
"no-extra-boolean-cast": "error",
// Disallow unnecessary parentheses
// https://eslint.org/docs/rules/no-extra-parens
"no-extra-parens": [
"error",
"all",
{
"conditionalAssign": true,
"nestedBinaryExpressions": false,
"returnAssign": false,
"ignoreJSX": "all", // delegate to eslint-plugin-react
"enforceForArrowConditionals": false
}
],
// Disallow unnecessary semicolons
// https://eslint.org/docs/rules/no-extra-semi
"no-extra-semi": "error",
// Disallow reassigning function declarations
// https://eslint.org/docs/rules/no-func-assign
"no-func-assign": "error",
// Disallow assigning to imported bindings
// https://eslint.org/docs/rules/no-import-assign
"no-import-assign": "error",
// Disallow variable or function declarations in nested blocks
// https://eslint.org/docs/rules/no-inner-declarations
"no-inner-declarations": "error",
// Disallow invalid regular expression strings in RegExp constructors
// https://eslint.org/docs/rules/no-invalid-regexp
"no-invalid-regexp": "error",
// Disallow irregular whitespace
// https://eslint.org/docs/rules/no-irregular-whitespace
"no-irregular-whitespace": "error",
// Disallow Number Literals That Lose Precision
// https://eslint.org/docs/rules/no-loss-of-precision
"no-loss-of-precision": "error",
// Disallow characters which are made with multiple code points in character class syntax
// https://eslint.org/docs/rules/no-misleading-character-class
"no-misleading-character-class": "error",
// Disallow calling global object properties as functions
// https://eslint.org/docs/rules/no-obj-calls
"no-obj-calls": "error",
// Disallow returning values from Promise executor functions
// https://eslint.org/docs/rules/no-promise-executor-return
"no-promise-executor-return": "error",
// Disallow use of Object.prototypes builtins directly
// https://eslint.org/docs/rules/no-prototype-builtins
"no-prototype-builtins": "error",
// Disallow multiple spaces in regular expression literals
// https://eslint.org/docs/rules/no-regex-spaces
"no-regex-spaces": "error",
// Disallow returning values from setters
// https://eslint.org/docs/rules/no-setter-return
"no-setter-return": "error",
// Disallow sparse arrays
// https://eslint.org/docs/rules/no-sparse-arrays
"no-sparse-arrays": "error",
// Disallow template literal placeholder syntax in regular strings
// https://eslint.org/docs/rules/no-template-curly-in-string
"no-template-curly-in-string": "error",
// Disallow confusing multiline expressions
// https://eslint.org/docs/rules/no-unexpected-multiline
"no-unexpected-multiline": "error",
// Disallow unreachable code after return, throw, continue, and break statements
// https://eslint.org/docs/rules/no-unreachable
"no-unreachable": "error",
// Disallow loops with a body that allows only one iteration
// https://eslint.org/docs/rules/no-unreachable-loop
"no-unreachable-loop": "error",
// Disallow control flow statements in finally blocks
// https://eslint.org/docs/rules/no-unsafe-finally
"no-unsafe-finally": "error",
// Disallow negating the left operand of relational operators
// https://eslint.org/docs/rules/no-unsafe-negation
"no-unsafe-negation": "error",
// Disallow useless backreferences in regular expressions
// https://eslint.org/docs/rules/no-useless-backreference
"no-useless-backreference": "error",
// Disallow negating the left operand in in expressions
// https://eslint.org/docs/rules/no-negated-in-lhs
"no-negated-in-lhs": "error",
// Disallow assignments that can lead to race conditions due to usage of await or yield
// https://eslint.org/docs/rules/require-atomic-updates
"require-atomic-updates": "off",
// Require calls to isNaN() when checking for NaN
// https://eslint.org/docs/rules/use-isnan
"use-isnan": "error",
// Enforce comparing typeof expressions against valid strings
// https://eslint.org/docs/rules/valid-typeof
"valid-typeof": [ "error", { "requireStringLiterals": true }],
// Require braces in arrow function body
// https://eslint.org/docs/rules/arrow-body-style
"arrow-body-style": [ "error", "as-needed" ],
// Require parens in arrow function arguments
// https://eslint.org/docs/rules/arrow-parens
"arrow-parens": [ "error", "as-needed", { "requireForBlockBody": true }],
// Require space before/after arrow function"s arrow
// https://eslint.org/docs/rules/arrow-spacing
"arrow-spacing": "error",
// Verify calls of super() in constructors
// https://eslint.org/docs/rules/constructor-super
"constructor-super": "error",
// Enforce spacing around the * in generator functions
// https://eslint.org/docs/rules/generator-star-spacing
"generator-star-spacing": [ "error", { "before": false, "after": true }],
// Disallow modifying variables of class declarations
// https://eslint.org/docs/rules/no-class-assign
"no-class-assign": "error",
// Disallow arrow functions where they could be confused with comparisons
// https://eslint.org/docs/rules/no-confusing-arrow
"no-confusing-arrow": "error",
// Disallow modifying variables that are declared using const
// https://eslint.org/docs/rules/no-const-assign
"no-const-assign": "error",
// Disallow duplicate name in class members
// https://eslint.org/docs/rules/no-dupe-class-members
"no-dupe-class-members": "error",
// Disallow duplicate imports
// https://eslint.org/docs/rules/no-duplicate-imports
"no-duplicate-imports": "error",
// Disallow Symbol Constructor
// https://eslint.org/docs/rules/no-new-symbol
"no-new-symbol": "error",
// Disallow specified names in exports
// https://eslint.org/docs/rules/no-restricted-exports
"no-restricted-exports": [ "error", { "restrictedNamedExports": [ "default", "then" ]}],
// Disallow specific imports
// https://eslint.org/docs/rules/no-restricted-imports
"no-restricted-imports": "off",
// Disallow use of this/super before calling super() in constructors
// https://eslint.org/docs/rules/no-this-before-super
"no-this-before-super": "error",
// Disallow unnecessary computed property keys in objects and classes
// https://eslint.org/docs/rules/no-useless-computed-key
"no-useless-computed-key": "error",
// Disallow unnecessary constructor
// https://eslint.org/docs/rules/no-useless-constructor
"no-useless-constructor": "error",
// Disallow renaming import, export, and destructured assignments to the same name
// https://eslint.org/docs/rules/no-useless-rename
"no-useless-rename": "error",
// Require let or const instead of var
// https://eslint.org/docs/rules/no-var
"no-var": "error",
// Require Object Literal Shorthand Syntax
// https://eslint.org/docs/rules/object-shorthand
"object-shorthand": [ "error", "always", { "avoidQuotes": true }],
// Require using arrow functions for callbacks
// https://eslint.org/docs/rules/prefer-arrow-callback
"prefer-arrow-callback": "error",
// Suggest using const
// https://eslint.org/docs/rules/prefer-const
"prefer-const": [ "error", { "ignoreReadBeforeAssign": true }],
// Prefer destructuring from arrays and objects
// https://eslint.org/docs/rules/prefer-destructuring
"prefer-destructuring": [
"error",
{
"array": false,
"object": false
},
{ "enforceForRenamedProperties": false }
],
// Disallow parseInt() and Number.parseInt() in favor of binary, octal, and hexadecimal literals
// https://eslint.org/docs/rules/prefer-numeric-literals
"prefer-numeric-literals": "error",
// Suggest using the rest parameters instead of arguments
// https://eslint.org/docs/rules/prefer-rest-params
"prefer-rest-params": "error",
// Suggest using spread syntax instead of .apply()
// https://eslint.org/docs/rules/prefer-spread
"prefer-spread": "error",
// Suggest using template literals instead of string
// https://eslint.org/docs/rules/prefer-template
"prefer-template": "error",
// Disallow generator functions that do not have yield
// https://eslint.org/docs/rules/require-yield
"require-yield": "error",
// Enforce spacing between rest and spread operators and their expressions
// https://eslint.org/docs/rules/rest-spread-spacing
"rest-spread-spacing": [ "error", "never" ],
// Import Sorting - conflicts with import/order
// https://eslint.org/docs/rules/sort-imports
"sort-imports": "off",
// Require symbol description
// https://eslint.org/docs/rules/symbol-description
"symbol-description": "error",
// Enforce Usage of Spacing in Template Strings
// https://eslint.org/docs/rules/template-curly-spacing
"template-curly-spacing": [ "error", "always" ],
// Enforce spacing around the * in yield* expressions
// https://eslint.org/docs/rules/yield-star-spacing
"yield-star-spacing": "error",
// This rule enforces line breaks after opening and before closing array brackets.
// https://eslint.org/docs/rules/array-bracket-newline
"array-bracket-newline": [ "error", { "multiline": true }],
// This rule enforces line breaks between array elements.
// https://eslint.org/docs/rules/array-element-newline
"array-element-newline": [
"error", {
"ArrayExpression": "consistent",
"ArrayPattern": { "multiline": true }
}
],
// This rule enforces consistent spacing inside array brackets.
// https://eslint.org/docs/rules/array-bracket-spacing
"array-bracket-spacing": [
"error",
"always",
{
"singleValue": false,
"objectsInArrays": false,
"arraysInArrays": false
}
],
// This rule enforces consistent spacing inside an open block token and the next token on the same line. This
// https://eslint.org/docs/rules/block-spacing
"block-spacing": "error",
// This rule enforces consistent brace style for blocks.
// https://eslint.org/docs/rules/brace-style
"brace-style": [ "error", "1tbs", { "allowSingleLine": true }],
// This rule looks for any underscores (_) located within the source code, and requires those variables to be camelCase.
// https://eslint.org/docs/rules/camelcase
"camelcase": [
"error",
{
"properties": "never",
"ignoreDestructuring": true,
"ignoreImports": true,
"ignoreGlobals": true
}
],
// This rule aims to enforce a consistent style of comments across your codebase, specifically by either requiring or disallowing a capitalized letter as the first word character in a comment
// https://eslint.org/docs/rules/capitalized-comments
"capitalized-comments": "off",
// This rule enforces consistent use of trailing commas in object and array literals.
// https://eslint.org/docs/rules/comma-dangle
"comma-dangle": [ "error", "always-multiline" ],
// This rule enforces consistent spacing before and after commas in variable declarations, array literals, object literals, function parameters, and sequences.
// https://eslint.org/docs/rules/comma-spacing
"comma-spacing": "error",
// This rule enforce consistent comma style in array literals, object literals, and variable declarations.
// https://eslint.org/docs/rules/comma-style
"comma-style": "error",
// This rule enforces consistent spacing inside computed property brackets.
// https://eslint.org/docs/rules/computed-property-spacing
"computed-property-spacing": "error",
// This rule enforces consistent naming when capturing the current execution context.
// https://eslint.org/docs/rules/consistent-this
"consistent-this": "off",
// This rule enforces at least one newline (or absence thereof) at the end of non-empty files.
// https://eslint.org/docs/rules/eol-last
"eol-last": "error",
// This rule enforces line breaks between arguments of a function call.
// https://eslint.org/docs/rules/function-call-argument-newline
"function-call-argument-newline": [ "error", "consistent" ],
// This rule requires or disallows spaces between the function name and the opening parenthesis that calls it.
// https://eslint.org/docs/rules/func-call-spacing
"func-call-spacing": "error",
// This rule requires function names to match the name of the variable or property to which they are assigned
// https://eslint.org/docs/rules/func-name-matching
"func-name-matching": [ "error", "always", { "considerPropertyDescriptor": true }],
// require function expressions to have a name
// https://eslint.org/docs/rules/func-names
"func-names": "off",
// This rule enforces a particular type of function style throughout a JavaScript file, either declarations or expressions
// https://eslint.org/docs/rules/func-style
"func-style": "off",
// This rule enforces consistent line breaks inside parentheses of function parameters or arguments.
// https://eslint.org/docs/rules/function-paren-newline
"function-paren-newline": [ "error", "consistent" ],
// This rule disallows specified identifiers in assignments and function definitions.
// https://eslint.org/docs/rules/id-denylist
"id-denylist": "off",
// This rule enforces a minimum and/or maximum identifier length convention.
// https://eslint.org/docs/rules/id-length
"id-length": "off",
// This rule requires identifiers in assignments and function definitions to match a specified regular expression.
// https://eslint.org/docs/rules/id-match
"id-match": "off",
// This rule aims to enforce a consistent location for an arrow function containing an implicit return.
// https://eslint.org/docs/rules/implicit-arrow-linebreak
"implicit-arrow-linebreak": "error",
// This rule enforces a consistent indentation style. The default style is 4 spaces.
// https://eslint.org/docs/rules/indent
"indent": [ "error", 4, { "SwitchCase": 1 }],
// This rule enforces the consistent use of either double or single quotes in JSX attributes..
// https://eslint.org/docs/rules/jsx-quotes
"jsx-quotes": "off",
// This rule enforces consistent spacing between keys and values in object literal properties. In the case of long lines, it is acceptable to add a new line wherever whitespace is allowed.
// https://eslint.org/docs/rules/key-spacing
"key-spacing": "error",
// This rule enforces consistent spacing around keywords and keyword-like tokens.
// https://eslint.org/docs/rules/keyword-spacing
"keyword-spacing": "error",
// enforce position of line comments
// https://eslint.org/docs/rules/line-comment-position
"line-comment-position": "off",
// This rule enforces consistent line endings independent of operating system, VCS, or editor used across your codebase.
// https://eslint.org/docs/rules/linebreak-style
"linebreak-style": "error",
// This rule improves readability by enforcing lines between class members
// https://eslint.org/docs/rules/lines-between-class-members
"lines-between-class-members": "error",
// This rule requires empty lines before and/or after comments
// TODO after auto fix
// https://eslint.org/docs/rules/lines-around-comment
"lines-around-comment": "off",
// This rule enforces a maximum depth that blocks can be nested to reduce code complexity.
// https://eslint.org/docs/rules/max-depth
"max-depth": "off",
// specify the maximum length of a line in your program
// https://eslint.org/docs/rules/max-len
"max-len": [ "error", { "code": 200 }],
// This rule enforces a maximum number of lines per file, in order to aid in maintainability and reduce complexity.
// https://eslint.org/docs/rules/max-lines
"max-lines": "off",
// This rule enforces a maximum number of lines per function, in order to aid in maintainability and reduce complexity.
// https://eslint.org/docs/rules/max-lines-per-function
"max-lines-per-function": "off",
// This rule enforces a maximum depth that callbacks can be nested to increase code clarity.
// https://eslint.org/docs/rules/max-nested-callbacks
"max-nested-callbacks": "off",
// This rule enforces a maximum number of parameters allowed in function definitions.
// https://eslint.org/docs/rules/max-params
"max-params": "off",
// This rule enforces a maximum number of statements allowed in function blocks.
"max-statements": "off",
// This rule enforces a maximum number of statements allowed per line.
// https://eslint.org/docs/rules/max-statements-per-line
"max-statements-per-line": "off",
// Enforce a particular style for multiline comments
// https://eslint.org/docs/rules/multiline-comment-style
"multiline-comment-style": "off",
// This rule enforces or disallows newlines between operands of a ternary expression.
// https://eslint.org/docs/rules/multiline-ternary
"multiline-ternary": [ "error", "always-multiline" ],
// Require constructor names to begin with a capital letter
// https://eslint.org/docs/rules/new-cap
"new-cap": [ "error", { "capIsNew": false }],
// Require parentheses when invoking a constructor with no arguments
// https://eslint.org/docs/rules/new-parens
"new-parens": "error",
// This rule requires a newline after each call in a method chain or deep member access. Computed property accesses such as instance[something] are excluded.
// https://eslint.org/docs/rules/newline-per-chained-call
"newline-per-chained-call": [ "error", { "ignoreChainWithDepth": 4 }],
// This rule enforces a nearly universal stylistic concern. That being said, this rule may be disabled if the constructor style is preferred.
// https://eslint.org/docs/rules/no-array-constructor
"no-array-constructor": "error",
// This rule disallows bitwise operators.
// https://eslint.org/docs/rules/no-bitwise
"no-bitwise": "off",
// This rule disallows continue statements.
// https://eslint.org/docs/rules/no-continue
"no-continue": "off",
// This rule disallows comments on the same line as code.
// https://eslint.org/docs/rules/no-inline-comments
"no-inline-comments": "off",
// This rule disallows if statements as the only statement in else blocks.
// https://eslint.org/docs/rules/no-lonely-if
"no-lonely-if": "off",
// Disallow mixes of different operators
// https://eslint.org/docs/rules/no-mixed-operators
"no-mixed-operators": "off",
// Disallow mixed spaces and tabs for indentation
// https://eslint.org/docs/rules/no-mixed-spaces-and-tabs
"no-mixed-spaces-and-tabs": "error",
// Disallow use of chained assignment expressions
// https://eslint.org/docs/rules/no-multi-assign
"no-multi-assign": "error",
// Disallow multiple empty lines, only one newline at the end, and no new lines at the beginning
// https://eslint.org/docs/rules/no-multiple-empty-lines
"no-multiple-empty-lines": [ "error", { "max": 1, "maxBOF": 0, "maxEOF": 0 }],
// Disallow negated conditions
// https://eslint.org/docs/rules/no-negated-condition
"no-negated-condition": "off",
// Disallow nested ternary expressions
// https://eslint.org/docs/rules/no-nested-ternary
"no-nested-ternary": "off",
// Disallow use of the Object constructor
// https://eslint.org/docs/rules/no-new-object
"no-new-object": "error",
// Disallow use of unary operators, ++ and --
// https://eslint.org/docs/rules/no-plusplus
"no-plusplus": "off",
// Disallow certain syntax forms
// https://eslint.org/docs/rules/no-restricted-syntax
"no-restricted-syntax": [
"error",
{
"selector": "WithStatement",
"message": "`with` is disallowed in strict mode because it makes code impossible to predict and optimize."
}
],
// Disallow space between function identifier and application
// https://eslint.org/docs/rules/no-spaced-func
"no-spaced-func": "error",
// Disallow tab characters entirely
// https://eslint.org/docs/rules/no-tabs
"no-tabs": "error",
// Disallow the use of ternary operators
// https://eslint.org/docs/rules/no-ternary
"no-ternary": "off",
// Disallow trailing whitespace at the end of lines
// https://eslint.org/docs/rules/no-trailing-spaces
"no-trailing-spaces": "error",
// Disallow dangling underscores in identifiers
// https://eslint.org/docs/rules/no-underscore-dangle
"no-underscore-dangle": "off",
// This rule disallow ternary operators when simpler alternatives exist.
// https://eslint.org/docs/rules/no-unneeded-ternary
"no-unneeded-ternary": [ "error", { "defaultAssignment": false }],
// Disallow whitespace before properties
// https://eslint.org/docs/rules/no-whitespace-before-property
"no-whitespace-before-property": "error",
// Enforce the location of single-line statements
// https://eslint.org/docs/rules/nonblock-statement-body-position
"nonblock-statement-body-position": "error",
// require padding inside curly braces
// https://eslint.org/docs/rules/object-curly-spacing
"object-curly-spacing": [
"error",
"always",
{
"arraysInObjects": false,
"objectsInObjects": false
}
],
// Enforce consistent line breaks inside braces
// https://eslint.org/docs/rules/object-curly-newline
"object-curly-newline": [ "error", { "multiline": true, "consistent": true }],
// Enforce placing object properties on separate lines
// https://eslint.org/docs/rules/object-property-newline
"object-property-newline": "off",
// Enforce variables to be declared either together or separately in functions