|
9 | 9 | "ecmaVersion": 2020 |
10 | 10 | }, |
11 | 11 | "rules": { |
12 | | - "indent": [ |
13 | | - "error", |
14 | | - 2 |
15 | | - ], |
16 | | - "linebreak-style": [ |
17 | | - "error", |
18 | | - "unix" |
19 | | - ], |
| 12 | + "indent": ["error", 2], |
| 13 | + "linebreak-style": ["error", "unix"], |
20 | 14 | "quotes": [ |
21 | 15 | "error", |
22 | 16 | "single", |
23 | 17 | { |
24 | 18 | "allowTemplateLiterals": true |
25 | 19 | } |
26 | 20 | ], |
27 | | - "semi": [ |
28 | | - "error", |
29 | | - "always" |
30 | | - ], |
31 | | - "no-loop-func": [ |
32 | | - "error" |
33 | | - ], |
34 | | - "block-spacing": [ |
35 | | - "error", |
36 | | - "always" |
37 | | - ], |
38 | | - "camelcase": [ |
39 | | - "error" |
40 | | - ], |
41 | | - "eqeqeq": [ |
42 | | - "error", |
43 | | - "always" |
44 | | - ], |
45 | | - "strict": [ |
46 | | - "error", |
47 | | - "global" |
48 | | - ], |
| 21 | + "semi": ["error", "always"], |
| 22 | + "no-loop-func": ["error"], |
| 23 | + "block-spacing": ["error", "always"], |
| 24 | + "camelcase": ["error"], |
| 25 | + "eqeqeq": ["error", "always"], |
| 26 | + "strict": ["error", "global"], |
49 | 27 | "brace-style": [ |
50 | 28 | "error", |
51 | 29 | "1tbs", |
52 | 30 | { |
53 | 31 | "allowSingleLine": true |
54 | 32 | } |
55 | 33 | ], |
56 | | - "comma-style": [ |
57 | | - "error", |
58 | | - "last" |
59 | | - ], |
| 34 | + "comma-style": ["error", "last"], |
60 | 35 | "comma-spacing": [ |
61 | 36 | "error", |
62 | 37 | { |
63 | 38 | "before": false, |
64 | 39 | "after": true |
65 | 40 | } |
66 | 41 | ], |
67 | | - "eol-last": [ |
68 | | - "error" |
69 | | - ], |
70 | | - "func-call-spacing": [ |
71 | | - "error", |
72 | | - "never" |
73 | | - ], |
| 42 | + "eol-last": ["error"], |
| 43 | + "func-call-spacing": ["error", "never"], |
74 | 44 | "key-spacing": [ |
75 | 45 | "error", |
76 | 46 | { |
|
112 | 82 | "properties": true |
113 | 83 | } |
114 | 84 | ], |
115 | | - "new-parens": [ |
116 | | - "error" |
117 | | - ], |
118 | | - "no-lonely-if": [ |
119 | | - "error" |
120 | | - ], |
121 | | - "no-trailing-spaces": [ |
122 | | - "error" |
123 | | - ], |
124 | | - "no-unneeded-ternary": [ |
125 | | - "error" |
126 | | - ], |
127 | | - "no-whitespace-before-property": [ |
128 | | - "error" |
129 | | - ], |
130 | | - "object-curly-spacing": [ |
131 | | - "error", |
132 | | - "always" |
133 | | - ], |
134 | | - "operator-assignment": [ |
135 | | - "error", |
136 | | - "always" |
137 | | - ], |
138 | | - "operator-linebreak": [ |
139 | | - "error", |
140 | | - "after" |
141 | | - ], |
| 85 | + "new-parens": ["error"], |
| 86 | + "no-lonely-if": ["error"], |
| 87 | + "no-trailing-spaces": ["error"], |
| 88 | + "no-unneeded-ternary": ["error"], |
| 89 | + "no-whitespace-before-property": ["error"], |
| 90 | + "object-curly-spacing": ["error", "always"], |
| 91 | + "operator-assignment": ["error", "always"], |
| 92 | + "operator-linebreak": ["error", "after"], |
142 | 93 | "semi-spacing": [ |
143 | 94 | "error", |
144 | 95 | { |
145 | 96 | "before": false, |
146 | 97 | "after": true |
147 | 98 | } |
148 | 99 | ], |
149 | | - "space-before-blocks": [ |
150 | | - "error", |
151 | | - "always" |
152 | | - ], |
| 100 | + "space-before-blocks": ["error", "always"], |
153 | 101 | "space-before-function-paren": [ |
154 | 102 | "error", |
155 | 103 | { |
|
158 | 106 | "asyncArrow": "always" |
159 | 107 | } |
160 | 108 | ], |
161 | | - "space-in-parens": [ |
162 | | - "error", |
163 | | - "never" |
164 | | - ], |
165 | | - "space-infix-ops": [ |
166 | | - "error" |
167 | | - ], |
| 109 | + "space-in-parens": ["error", "never"], |
| 110 | + "space-infix-ops": ["error"], |
168 | 111 | "space-unary-ops": [ |
169 | 112 | "error", |
170 | 113 | { |
|
175 | 118 | } |
176 | 119 | } |
177 | 120 | ], |
178 | | - "no-unreachable": [ |
179 | | - "error" |
180 | | - ], |
181 | | - "no-global-assign": [ |
182 | | - "error" |
183 | | - ], |
184 | | - "no-self-compare": [ |
185 | | - "error" |
186 | | - ], |
187 | | - "no-unmodified-loop-condition": [ |
188 | | - "error" |
189 | | - ], |
| 121 | + "no-unreachable": ["error"], |
| 122 | + "no-global-assign": ["error"], |
| 123 | + "no-self-compare": ["error"], |
| 124 | + "no-unmodified-loop-condition": ["error"], |
190 | 125 | "no-constant-condition": [ |
191 | 126 | "error", |
192 | 127 | { |
193 | 128 | "checkLoops": false |
194 | 129 | } |
195 | 130 | ], |
196 | | - "no-console": [ |
197 | | - "off" |
198 | | - ], |
199 | | - "no-useless-concat": [ |
200 | | - "error" |
201 | | - ], |
202 | | - "no-useless-escape": [ |
203 | | - "error" |
204 | | - ], |
205 | | - "no-shadow-restricted-names": [ |
206 | | - "error" |
207 | | - ], |
| 131 | + "no-console": ["off"], |
| 132 | + "no-useless-concat": ["error"], |
| 133 | + "no-useless-escape": ["error"], |
| 134 | + "no-shadow-restricted-names": ["error"], |
208 | 135 | "no-use-before-define": [ |
209 | 136 | "error", |
210 | 137 | { |
211 | 138 | "functions": false |
212 | 139 | } |
213 | 140 | ], |
214 | | - "arrow-parens": [ |
215 | | - "error", |
216 | | - "as-needed" |
217 | | - ], |
218 | | - "arrow-body-style": [ |
219 | | - "error", |
220 | | - "as-needed" |
221 | | - ], |
222 | | - "arrow-spacing": [ |
223 | | - "error" |
224 | | - ], |
| 141 | + "arrow-parens": ["error", "as-needed"], |
| 142 | + "arrow-body-style": ["error", "as-needed"], |
| 143 | + "arrow-spacing": ["error"], |
225 | 144 | "no-confusing-arrow": [ |
226 | 145 | "error", |
227 | 146 | { |
228 | 147 | "allowParens": true |
229 | 148 | } |
230 | 149 | ], |
231 | | - "no-useless-computed-key": [ |
232 | | - "error" |
233 | | - ], |
234 | | - "no-useless-rename": [ |
235 | | - "error" |
236 | | - ], |
237 | | - "no-var": [ |
238 | | - "error" |
239 | | - ], |
240 | | - "object-shorthand": [ |
241 | | - "error", |
242 | | - "always" |
243 | | - ], |
244 | | - "prefer-arrow-callback": [ |
245 | | - "error" |
246 | | - ], |
247 | | - "prefer-const": [ |
248 | | - "error" |
249 | | - ], |
250 | | - "prefer-numeric-literals": [ |
251 | | - "error" |
252 | | - ], |
253 | | - "prefer-rest-params": [ |
254 | | - "error" |
255 | | - ], |
256 | | - "prefer-spread": [ |
257 | | - "error" |
258 | | - ], |
259 | | - "rest-spread-spacing": [ |
260 | | - "error", |
261 | | - "never" |
262 | | - ], |
263 | | - "template-curly-spacing": [ |
264 | | - "error", |
265 | | - "never" |
266 | | - ] |
| 150 | + "no-useless-computed-key": ["error"], |
| 151 | + "no-useless-rename": ["error"], |
| 152 | + "no-var": ["error"], |
| 153 | + "object-shorthand": ["error", "always"], |
| 154 | + "prefer-arrow-callback": ["error"], |
| 155 | + "prefer-const": ["error"], |
| 156 | + "prefer-numeric-literals": ["error"], |
| 157 | + "prefer-rest-params": ["error"], |
| 158 | + "prefer-spread": ["error"], |
| 159 | + "rest-spread-spacing": ["error", "never"], |
| 160 | + "template-curly-spacing": ["error", "never"] |
267 | 161 | } |
268 | 162 | } |
0 commit comments