@@ -2,6 +2,175 @@ import globals from "globals";
2
2
import pluginJs from "@eslint/js" ;
3
3
4
4
export default [
5
- { languageOptions : { globals : { ...globals . browser , ...globals . node , it : true , describe : true } } } ,
6
- pluginJs . configs . recommended ,
7
- ] ;
5
+ {
6
+ languageOptions : {
7
+ globals : {
8
+ ...globals . node ,
9
+ ...globals . browser ,
10
+ it : true ,
11
+ describe : true
12
+ } ,
13
+ parserOptions : {
14
+ ecmaVersion : 2022
15
+ }
16
+ } ,
17
+ rules : {
18
+ "arrow-parens" : [ 2 , "as-needed" ] ,
19
+ "arrow-spacing" : [ 2 , { "before" : true , "after" : true } ] ,
20
+ "block-scoped-var" : [ 0 ] ,
21
+ "brace-style" : [ 2 , "1tbs" , { "allowSingleLine" : true } ] ,
22
+ "camelcase" : [ 0 ] ,
23
+ "comma-dangle" : [ 2 , "never" ] ,
24
+ "comma-spacing" : [ 2 ] ,
25
+ "comma-style" : [ 2 , "last" ] ,
26
+ "complexity" : [ 0 , 11 ] ,
27
+ "consistent-return" : [ 2 ] ,
28
+ "consistent-this" : [ 0 , "that" ] ,
29
+ "curly" : [ 2 , "multi-line" ] ,
30
+ "default-case" : [ 2 ] ,
31
+ "dot-notation" : [ 2 , { "allowKeywords" : true } ] ,
32
+ "eol-last" : [ 2 ] ,
33
+ "eqeqeq" : [ 2 ] ,
34
+ "func-names" : [ 0 ] ,
35
+ "func-style" : [ 0 , "declaration" ] ,
36
+ "generator-star-spacing" : [ 2 , "after" ] ,
37
+ "guard-for-in" : [ 0 ] ,
38
+ "handle-callback-err" : [ 0 ] ,
39
+ "indent" : [ "error" , "tab" , { "VariableDeclarator" : { "var" : 1 , "let" : 1 , "const" : 1 } , "SwitchCase" : 1 } ] ,
40
+ "key-spacing" : [ 2 , { "beforeColon" : false , "afterColon" : true } ] ,
41
+ "quotes" : [ 2 , "double" , "avoid-escape" ] ,
42
+ "max-depth" : [ 0 , 4 ] ,
43
+ "max-len" : [ 0 , 80 , 4 ] ,
44
+ "max-nested-callbacks" : [ 0 , 2 ] ,
45
+ "max-params" : [ 0 , 3 ] ,
46
+ "max-statements" : [ 0 , 10 ] ,
47
+ "new-parens" : [ 2 ] ,
48
+ "new-cap" : [ 2 , { "capIsNewExceptions" : [ "ToInteger" , "ToObject" , "ToPrimitive" , "ToUint32" ] } ] ,
49
+ "newline-after-var" : [ 0 ] ,
50
+ "newline-before-return" : [ 2 ] ,
51
+ "no-alert" : [ 2 ] ,
52
+ "no-array-constructor" : [ 2 ] ,
53
+ "no-bitwise" : [ 0 ] ,
54
+ "no-caller" : [ 2 ] ,
55
+ "no-catch-shadow" : [ 2 ] ,
56
+ "no-cond-assign" : [ 2 ] ,
57
+ "no-console" : [ 0 ] ,
58
+ "no-constant-condition" : [ 1 ] ,
59
+ "no-continue" : [ 2 ] ,
60
+ "no-control-regex" : [ 2 ] ,
61
+ "no-debugger" : [ 2 ] ,
62
+ "no-delete-var" : [ 2 ] ,
63
+ "no-div-regex" : [ 0 ] ,
64
+ "no-dupe-args" : [ 2 ] ,
65
+ "no-dupe-keys" : [ 2 ] ,
66
+ "no-duplicate-case" : [ 2 ] ,
67
+ "no-else-return" : [ 0 ] ,
68
+ "no-empty" : [ 2 ] ,
69
+ "no-eq-null" : [ 0 ] ,
70
+ "no-eval" : [ 2 ] ,
71
+ "no-ex-assign" : [ 2 ] ,
72
+ "no-extend-native" : [ 1 ] ,
73
+ "no-extra-bind" : [ 2 ] ,
74
+ "no-extra-boolean-cast" : [ 2 ] ,
75
+ "no-extra-semi" : [ 1 ] ,
76
+ "no-empty-character-class" : [ 2 ] ,
77
+ "no-fallthrough" : [ 2 ] ,
78
+ "no-floating-decimal" : [ 2 ] ,
79
+ "no-func-assign" : [ 2 ] ,
80
+ "no-implied-eval" : [ 2 ] ,
81
+ "no-inline-comments" : [ 0 ] ,
82
+ "no-inner-declarations" : [ 2 , "functions" ] ,
83
+ "no-invalid-regexp" : [ 2 ] ,
84
+ "no-irregular-whitespace" : [ 2 ] ,
85
+ "no-iterator" : [ 2 ] ,
86
+ "no-label-var" : [ 2 ] ,
87
+ "no-labels" : [ 2 ] ,
88
+ "no-lone-blocks" : [ 2 ] ,
89
+ "no-lonely-if" : [ 2 ] ,
90
+ "no-loop-func" : [ 2 ] ,
91
+ "no-mixed-requires" : [ 0 , false ] ,
92
+ "no-mixed-spaces-and-tabs" : [ 2 , false ] ,
93
+ "no-multi-spaces" : [ 2 ] ,
94
+ "no-multi-str" : [ 2 ] ,
95
+ "no-multiple-empty-lines" : [ 2 , { "max" : 2 } ] ,
96
+ "no-native-reassign" : [ 0 ] ,
97
+ "no-negated-in-lhs" : [ 2 ] ,
98
+ "no-nested-ternary" : [ 0 ] ,
99
+ "no-new" : [ 2 ] ,
100
+ "no-new-func" : [ 0 ] ,
101
+ "no-new-object" : [ 2 ] ,
102
+ "no-new-require" : [ 0 ] ,
103
+ "no-new-wrappers" : [ 2 ] ,
104
+ "no-obj-calls" : [ 2 ] ,
105
+ "no-octal" : [ 2 ] ,
106
+ "no-octal-escape" : [ 2 ] ,
107
+ "no-param-reassign" : [ 0 ] ,
108
+ "no-path-concat" : [ 0 ] ,
109
+ "no-plusplus" : [ 0 ] ,
110
+ "no-process-env" : [ 0 ] ,
111
+ "no-process-exit" : [ 0 ] ,
112
+ "no-proto" : [ 2 ] ,
113
+ "no-redeclare" : [ 2 ] ,
114
+ "no-regex-spaces" : [ 2 ] ,
115
+ "no-reserved-keys" : [ 0 ] ,
116
+ "no-reno-new-funced-modules" : [ 0 ] ,
117
+ "no-return-assign" : [ 2 ] ,
118
+ "no-script-url" : [ 2 ] ,
119
+ "no-self-compare" : [ 0 ] ,
120
+ "no-sequences" : [ 2 ] ,
121
+ "no-shadow" : [ 2 ] ,
122
+ "no-shadow-restricted-names" : [ 2 ] ,
123
+ "no-spaced-func" : [ 2 ] ,
124
+ "no-sparse-arrays" : [ 2 ] ,
125
+ "no-sync" : [ 0 ] ,
126
+ "no-ternary" : [ 0 ] ,
127
+ "no-throw-literal" : [ 2 ] ,
128
+ "no-trailing-spaces" : [ 2 ] ,
129
+ "no-undef" : [ 2 ] ,
130
+ "no-undef-init" : [ 2 ] ,
131
+ "no-undefined" : [ 0 ] ,
132
+ "no-underscore-dangle" : [ 0 ] ,
133
+ "no-unreachable" : [ 2 ] ,
134
+ "no-unused-expressions" : [ 2 ] ,
135
+ "no-unused-vars" : [ 2 , { "vars" : "all" , "args" : "after-used" } ] ,
136
+ "no-use-before-define" : [ 2 ] ,
137
+ "no-void" : [ 0 ] ,
138
+ "no-warning-comments" : [ 0 , { "terms" : [ "todo" , "fixme" , "xxx" ] , "location" : "start" } ] ,
139
+ "no-with" : [ 2 ] ,
140
+ "no-extra-parens" : [ 2 ] ,
141
+ "one-var" : [ 0 ] ,
142
+ "operator-assignment" : [ 0 , "always" ] ,
143
+ "operator-linebreak" : [ 2 , "after" ] ,
144
+ "padded-blocks" : [ 0 ] ,
145
+ "quote-props" : [ 0 ] ,
146
+ "radix" : [ 0 ] ,
147
+ "semi" : [ 2 ] ,
148
+ "semi-spacing" : [ 2 , { before : false , after : true } ] ,
149
+ "sort-vars" : [ 0 ] ,
150
+ "keyword-spacing" : [ 2 ] ,
151
+ "space-before-function-paren" : [ 2 , { anonymous : "always" , named : "always" } ] ,
152
+ "space-before-blocks" : [ 2 , "always" ] ,
153
+ "space-in-brackets" : [ 0 , "never" , {
154
+ singleValue : true ,
155
+ arraysInArrays : false ,
156
+ arraysInObjects : false ,
157
+ objectsInArrays : true ,
158
+ objectsInObjects : true ,
159
+ propertyName : false
160
+ } ] ,
161
+ "space-in-parens" : [ 2 , "never" ] ,
162
+ "space-infix-ops" : [ 2 ] ,
163
+ "space-unary-ops" : [ 2 , { words : true , nonwords : false } ] ,
164
+ "spaced-line-comment" : [ 0 , "always" ] ,
165
+ strict : [ 0 ] ,
166
+ "use-isnan" : [ 2 ] ,
167
+ "valid-jsdoc" : [ 0 ] ,
168
+ "valid-typeof" : [ 2 ] ,
169
+ "vars-on-top" : [ 0 ] ,
170
+ "wrap-iife" : [ 2 ] ,
171
+ "wrap-regex" : [ 2 ] ,
172
+ yoda : [ 2 , "never" , { exceptRange : true } ]
173
+ }
174
+ } ,
175
+ pluginJs . configs . recommended
176
+ ] ;
0 commit comments