@prowise/eslint-config-linting-rules 1.2.13 → 2.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +13 -3
- package/backend.js +4 -16
- package/base.js +30 -0
- package/eslint.config.js +4 -0
- package/front-react.js +19 -0
- package/front-solid.js +19 -0
- package/package.json +1 -1
- package/rules/{base-rules.js → baseSettings.js} +43 -551
- package/rules/plugin-import-rules.js +16 -4
- package/rules/plugin-jest-rules.js +59 -0
- package/rules/plugin-jsdoc-rules.js +6 -2
- package/rules/plugin-jsx-a11y-rules.js +49 -43
- package/rules/plugin-node-rules.js +41 -24
- package/rules/plugin-prefer-arrow-rules.js +17 -0
- package/rules/plugin-react-hooks-rules.js +5 -10
- package/rules/plugin-react-rules.js +24 -42
- package/rules/plugin-solid-rules.js +8 -2
- package/rules/plugin-stylistic-rules.js +538 -0
- package/rules/plugin-typescript-rules.js +56 -231
- package/rules/plugin-vitest-rules.js +77 -0
- package/rules/test-rules.js +1 -102
- package/typescript.js +6 -22
- package/eslint-plugin-esm-extensions/index.js +0 -155
- package/eslint-plugin-esm-extensions/package.json +0 -21
- package/frontend-vite.js +0 -38
- package/frontend.js +0 -39
- package/index.js +0 -35
- package/solid.js +0 -35
|
@@ -1,10 +1,16 @@
|
|
|
1
|
-
|
|
1
|
+
import solidPlugin from "eslint-plugin-solid";
|
|
2
|
+
|
|
3
|
+
export default {
|
|
2
4
|
/*
|
|
3
5
|
* ✅ recommended
|
|
4
6
|
* 🔧 fixable
|
|
5
7
|
* 💡 has suggestion
|
|
6
8
|
*/
|
|
7
|
-
|
|
9
|
+
|
|
10
|
+
plugins: {
|
|
11
|
+
solid: solidPlugin,
|
|
12
|
+
},
|
|
13
|
+
|
|
8
14
|
rules: {
|
|
9
15
|
/**
|
|
10
16
|
* Disallow early returns in components. ✅ 🔧
|
|
@@ -0,0 +1,538 @@
|
|
|
1
|
+
import stylePlugin from "@stylistic/eslint-plugin";
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
plugins: {
|
|
5
|
+
style: stylePlugin,
|
|
6
|
+
},
|
|
7
|
+
|
|
8
|
+
rules: {
|
|
9
|
+
/**
|
|
10
|
+
* Enforce line breaks after opening and before closing array brackets 🔧
|
|
11
|
+
* https://eslint.org/docs/latest/rules/array-bracket-newline.
|
|
12
|
+
*/
|
|
13
|
+
"style/array-bracket-newline": ["off", "consistent"], // object option alternative: { multiline: true, minItems: 3 }
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Enforce spacing inside array brackets 🔧
|
|
17
|
+
* https://eslint.org/docs/latest/rules/array-bracket-spacing.
|
|
18
|
+
*/
|
|
19
|
+
"style/array-bracket-spacing": ["error", "never"],
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Enforce line breaks between array elements 🔧
|
|
23
|
+
* https://eslint.org/docs/latest/rules/array-element-newline.
|
|
24
|
+
*/
|
|
25
|
+
"style/array-element-newline": ["off", { multiline: true, minItems: 3 }],
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Require parens in arrow function arguments 🔧
|
|
29
|
+
* https://eslint.org/docs/latest/rules/arrow-parens.
|
|
30
|
+
*/
|
|
31
|
+
"style/arrow-parens": ["error", "always"],
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* Require space before/after arrow function"s arrow 🔧
|
|
35
|
+
* https://eslint.org/docs/latest/rules/arrow-spacing.
|
|
36
|
+
*/
|
|
37
|
+
"style/arrow-spacing": ["error", { before: true, after: true }],
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Enforce spacing inside single-line blocks 🔧
|
|
41
|
+
* https://eslint.org/docs/latest/rules/block-spacing.
|
|
42
|
+
*/
|
|
43
|
+
"style/block-spacing": ["error", "always"],
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* Enforce one true brace style 🔧
|
|
47
|
+
* https://eslint.org/docs/latest/rules/brace-style.
|
|
48
|
+
*/
|
|
49
|
+
"style/brace-style": ["error", "1tbs", { allowSingleLine: true }],
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* Require trailing commas in multiline object literals 🔧
|
|
53
|
+
* https://eslint.org/docs/latest/rules/comma-dangle.
|
|
54
|
+
*/
|
|
55
|
+
"style/comma-dangle": [
|
|
56
|
+
"error",
|
|
57
|
+
{
|
|
58
|
+
arrays: "always-multiline",
|
|
59
|
+
objects: "always-multiline",
|
|
60
|
+
imports: "always-multiline",
|
|
61
|
+
exports: "always-multiline",
|
|
62
|
+
functions: "always-multiline",
|
|
63
|
+
},
|
|
64
|
+
],
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* Enforce spacing before and after comma 🔧
|
|
68
|
+
* https://eslint.org/docs/latest/rules/comma-spacing.
|
|
69
|
+
*/
|
|
70
|
+
"style/comma-spacing": ["error", { before: false, after: true }],
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* Enforce one true comma style 🔧
|
|
74
|
+
* https://eslint.org/docs/latest/rules/comma-style.
|
|
75
|
+
*/
|
|
76
|
+
"style/comma-style": [
|
|
77
|
+
"error",
|
|
78
|
+
"last",
|
|
79
|
+
{
|
|
80
|
+
exceptions: {
|
|
81
|
+
ArrayExpression: false,
|
|
82
|
+
ArrayPattern: false,
|
|
83
|
+
ArrowFunctionExpression: false,
|
|
84
|
+
CallExpression: false,
|
|
85
|
+
FunctionDeclaration: false,
|
|
86
|
+
FunctionExpression: false,
|
|
87
|
+
ImportDeclaration: false,
|
|
88
|
+
ObjectExpression: false,
|
|
89
|
+
ObjectPattern: false,
|
|
90
|
+
VariableDeclaration: false,
|
|
91
|
+
NewExpression: false,
|
|
92
|
+
},
|
|
93
|
+
},
|
|
94
|
+
],
|
|
95
|
+
|
|
96
|
+
/**
|
|
97
|
+
* Disallow padding inside computed properties 🔧
|
|
98
|
+
* https://eslint.org/docs/latest/rules/computed-property-spacing.
|
|
99
|
+
*/
|
|
100
|
+
"style/computed-property-spacing": ["error", "never"],
|
|
101
|
+
|
|
102
|
+
/**
|
|
103
|
+
* Enforces consistent newlines before or after dots 🔧
|
|
104
|
+
* https://eslint.org/docs/latest/rules/dot-location.
|
|
105
|
+
*/
|
|
106
|
+
"style/dot-location": ["error", "property"],
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* Enforce newline at the end of file, with no multiple empty lines 🔧
|
|
110
|
+
* https://eslint.org/docs/latest/rules/eol-last.
|
|
111
|
+
*/
|
|
112
|
+
"style/eol-last": ["error", "always"],
|
|
113
|
+
|
|
114
|
+
/**
|
|
115
|
+
* Enforce spacing between functions and their invocations 🔧
|
|
116
|
+
* https://eslint.org/docs/latest/rules/func-call-spacing.
|
|
117
|
+
*/
|
|
118
|
+
"style/func-call-spacing": ["error", "never"],
|
|
119
|
+
|
|
120
|
+
/**
|
|
121
|
+
* Enforce line breaks between arguments of a function call 🔧
|
|
122
|
+
* https://eslint.org/docs/latest/rules/function-call-argument-newline.
|
|
123
|
+
*/
|
|
124
|
+
"style/function-call-argument-newline": ["error", "consistent"],
|
|
125
|
+
|
|
126
|
+
/**
|
|
127
|
+
* Require line breaks inside function parentheses if there are line breaks between parameters. 🔧
|
|
128
|
+
* https://eslint.org/docs/latest/rules/function-paren-newline.
|
|
129
|
+
*/
|
|
130
|
+
"style/function-paren-newline": "off",
|
|
131
|
+
|
|
132
|
+
/**
|
|
133
|
+
* Enforce the spacing around the * in generator functions 🔧
|
|
134
|
+
* https://eslint.org/docs/latest/rules/generator-star-spacing.
|
|
135
|
+
*/
|
|
136
|
+
"style/generator-star-spacing": ["error", { before: false, after: true }],
|
|
137
|
+
|
|
138
|
+
/**
|
|
139
|
+
* Enforce the location of arrow function bodies with implicit returns 🔧
|
|
140
|
+
* https://eslint.org/docs/latest/rules/implicit-arrow-linebreak.
|
|
141
|
+
*/
|
|
142
|
+
"style/implicit-arrow-linebreak": "off",
|
|
143
|
+
|
|
144
|
+
/**
|
|
145
|
+
* This option sets a specific tab width for your code 🔧
|
|
146
|
+
* https://eslint.org/docs/latest/rules/indent.
|
|
147
|
+
*/
|
|
148
|
+
"style/indent": ["error", 4, { SwitchCase: 1 }],
|
|
149
|
+
|
|
150
|
+
/**
|
|
151
|
+
* Specify whether double or single quotes should be used in JSX attributes 🔧
|
|
152
|
+
* https://eslint.org/docs/latest/rules/jsx-quotes.
|
|
153
|
+
*/
|
|
154
|
+
"style/jsx-quotes": ["error", "prefer-double"],
|
|
155
|
+
|
|
156
|
+
/**
|
|
157
|
+
* Enforces spacing between keys and values in object literal properties 🔧
|
|
158
|
+
* https://eslint.org/docs/latest/rules/key-spacing.
|
|
159
|
+
*/
|
|
160
|
+
"style/key-spacing": ["error", { beforeColon: false, afterColon: true }],
|
|
161
|
+
|
|
162
|
+
/**
|
|
163
|
+
* Require a space before & after certain keywords 🔧
|
|
164
|
+
* https://eslint.org/docs/latest/rules/keyword-spacing.
|
|
165
|
+
*/
|
|
166
|
+
"style/keyword-spacing": [
|
|
167
|
+
"error",
|
|
168
|
+
{
|
|
169
|
+
before: true,
|
|
170
|
+
after: true,
|
|
171
|
+
overrides: {
|
|
172
|
+
return: { after: true },
|
|
173
|
+
throw: { after: true },
|
|
174
|
+
case: { after: true },
|
|
175
|
+
},
|
|
176
|
+
},
|
|
177
|
+
],
|
|
178
|
+
|
|
179
|
+
/**
|
|
180
|
+
* Enforce position of line comments
|
|
181
|
+
* https://eslint.org/docs/latest/rules/line-comment-position.
|
|
182
|
+
*/
|
|
183
|
+
"style/line-comment-position": [
|
|
184
|
+
"off",
|
|
185
|
+
{
|
|
186
|
+
position: "above",
|
|
187
|
+
ignorePattern: "",
|
|
188
|
+
applyDefaultPatterns: true,
|
|
189
|
+
},
|
|
190
|
+
],
|
|
191
|
+
|
|
192
|
+
/**
|
|
193
|
+
* Disallow mixed "LF" and "CRLF" as linebreaks 🔧
|
|
194
|
+
* https://eslint.org/docs/latest/rules/linebreak-style.
|
|
195
|
+
*/
|
|
196
|
+
"style/linebreak-style": ["error", "unix"],
|
|
197
|
+
|
|
198
|
+
/**
|
|
199
|
+
* Enforces empty lines around comments 🔧
|
|
200
|
+
* https://eslint.org/docs/latest/rules/lines-around-comment.
|
|
201
|
+
*/
|
|
202
|
+
"style/lines-around-comment": "off",
|
|
203
|
+
|
|
204
|
+
/**
|
|
205
|
+
* Require or disallow an empty line between class members 🔧
|
|
206
|
+
* https://eslint.org/docs/latest/rules/lines-between-class-members.
|
|
207
|
+
*/
|
|
208
|
+
"style/lines-between-class-members": ["error", "always", { exceptAfterSingleLine: true }],
|
|
209
|
+
|
|
210
|
+
/**
|
|
211
|
+
* Specify the maximum length of a line in your program
|
|
212
|
+
* https://eslint.org/docs/latest/rules/max-len.
|
|
213
|
+
*/
|
|
214
|
+
"style/max-len": [
|
|
215
|
+
"error",
|
|
216
|
+
{
|
|
217
|
+
code: 120,
|
|
218
|
+
tabWidth: 4,
|
|
219
|
+
ignoreUrls: true,
|
|
220
|
+
ignoreComments: false,
|
|
221
|
+
ignoreRegExpLiterals: true,
|
|
222
|
+
ignoreStrings: true,
|
|
223
|
+
ignoreTemplateLiterals: true,
|
|
224
|
+
},
|
|
225
|
+
],
|
|
226
|
+
|
|
227
|
+
/**
|
|
228
|
+
* Restrict the number of statements per line
|
|
229
|
+
* https://eslint.org/docs/latest/rules/max-statements-per-line.
|
|
230
|
+
*/
|
|
231
|
+
"style/max-statements-per-line": ["off", { max: 1 }],
|
|
232
|
+
|
|
233
|
+
/**
|
|
234
|
+
* Enforce a particular style for multiline comments 🔧
|
|
235
|
+
* https://eslint.org/docs/latest/rules/multiline-comment-style.
|
|
236
|
+
*/
|
|
237
|
+
"style/multiline-comment-style": ["off", "starred-block"],
|
|
238
|
+
|
|
239
|
+
/**
|
|
240
|
+
* Require multiline ternary 🔧
|
|
241
|
+
* https://eslint.org/docs/latest/rules/multiline-ternary.
|
|
242
|
+
*/
|
|
243
|
+
"style/multiline-ternary": ["off", "never"],
|
|
244
|
+
|
|
245
|
+
/**
|
|
246
|
+
* Disallow the omission of parentheses when invoking a constructor with no arguments 🔧
|
|
247
|
+
* https://eslint.org/docs/latest/rules/new-parens.
|
|
248
|
+
*/
|
|
249
|
+
"style/new-parens": "error",
|
|
250
|
+
|
|
251
|
+
/**
|
|
252
|
+
* Enforces new line after each method call in the chain to make it more readable and easy to maintain 🔧
|
|
253
|
+
* https://eslint.org/docs/latest/rules/newline-per-chained-call.
|
|
254
|
+
*/
|
|
255
|
+
"style/newline-per-chained-call": ["error", { ignoreChainWithDepth: 3 }],
|
|
256
|
+
|
|
257
|
+
/**
|
|
258
|
+
* Disallow arrow functions where they could be confused with comparisons 🔧
|
|
259
|
+
* https://eslint.org/docs/latest/rules/no-confusing-arrow.
|
|
260
|
+
*/
|
|
261
|
+
"style/no-confusing-arrow": "warn",
|
|
262
|
+
|
|
263
|
+
/**
|
|
264
|
+
* Disallow unnecessary semicolons ✅ 🔧
|
|
265
|
+
* https://eslint.org/docs/latest/rules/no-extra-semi.
|
|
266
|
+
*/
|
|
267
|
+
"style/no-extra-semi": "error",
|
|
268
|
+
|
|
269
|
+
/**
|
|
270
|
+
* Disallow the use of leading or trailing decimal points in numeric literals 🔧
|
|
271
|
+
* https://eslint.org/docs/latest/rules/no-floating-decimal.
|
|
272
|
+
*/
|
|
273
|
+
"style/no-floating-decimal": "error",
|
|
274
|
+
|
|
275
|
+
/**
|
|
276
|
+
* Disallow un-paren"d mixes of different operators
|
|
277
|
+
* https://eslint.org/docs/latest/rules/no-mixed-operators.
|
|
278
|
+
*/
|
|
279
|
+
"style/no-mixed-operators": [
|
|
280
|
+
"error",
|
|
281
|
+
{
|
|
282
|
+
// the list of arithmetic groups disallows mixing `%` and `**`
|
|
283
|
+
// with other arithmetic operators.
|
|
284
|
+
groups: [
|
|
285
|
+
["%", "**"],
|
|
286
|
+
["%", "+"],
|
|
287
|
+
["%", "-"],
|
|
288
|
+
["%", "*"],
|
|
289
|
+
["%", "/"],
|
|
290
|
+
["/", "*"],
|
|
291
|
+
["&", "|", "<<", ">>", ">>>"],
|
|
292
|
+
["==", "!=", "===", "!=="],
|
|
293
|
+
["&&", "||"],
|
|
294
|
+
],
|
|
295
|
+
allowSamePrecedence: false,
|
|
296
|
+
},
|
|
297
|
+
],
|
|
298
|
+
|
|
299
|
+
/**
|
|
300
|
+
* Disallow unnecessary parentheses 🔧
|
|
301
|
+
* https://eslint.org/docs/latest/rules/no-extra-parens.
|
|
302
|
+
*/
|
|
303
|
+
"style/no-extra-parens": [
|
|
304
|
+
"off",
|
|
305
|
+
"all",
|
|
306
|
+
{
|
|
307
|
+
conditionalAssign: true,
|
|
308
|
+
nestedBinaryExpressions: false,
|
|
309
|
+
returnAssign: false,
|
|
310
|
+
ignoreJSX: "all", // delegate to eslint-plugin-react
|
|
311
|
+
enforceForArrowConditionals: false,
|
|
312
|
+
},
|
|
313
|
+
],
|
|
314
|
+
|
|
315
|
+
/**
|
|
316
|
+
* Disallow mixed spaces and tabs for indentation ✅
|
|
317
|
+
* https://eslint.org/docs/latest/rules/no-mixed-spaces-and-tabs.
|
|
318
|
+
*/
|
|
319
|
+
"style/no-mixed-spaces-and-tabs": "error",
|
|
320
|
+
|
|
321
|
+
/**
|
|
322
|
+
* Disallow use of multiple spaces 🔧
|
|
323
|
+
* https://eslint.org/docs/latest/rules/no-multi-spaces.
|
|
324
|
+
*/
|
|
325
|
+
"style/no-multi-spaces": ["error", { ignoreEOLComments: false }],
|
|
326
|
+
|
|
327
|
+
/**
|
|
328
|
+
* Disallow multiple empty lines, only one newline at the end, and no new lines at the beginning 🔧
|
|
329
|
+
* https://eslint.org/docs/latest/rules/no-multiple-empty-lines.
|
|
330
|
+
*/
|
|
331
|
+
"style/no-multiple-empty-lines": ["error", { max: 1, maxBOF: 0, maxEOF: 0 }],
|
|
332
|
+
|
|
333
|
+
/**
|
|
334
|
+
* Disallow tab characters entirely
|
|
335
|
+
* https://eslint.org/docs/latest/rules/no-tabs.
|
|
336
|
+
*/
|
|
337
|
+
"style/no-tabs": "error",
|
|
338
|
+
|
|
339
|
+
/**
|
|
340
|
+
* Disallow trailing whitespace at the end of lines 🔧
|
|
341
|
+
* https://eslint.org/docs/latest/rules/no-trailing-spaces.
|
|
342
|
+
*/
|
|
343
|
+
"style/no-trailing-spaces": ["error", { skipBlankLines: false, ignoreComments: false }],
|
|
344
|
+
|
|
345
|
+
/**
|
|
346
|
+
* Disallow whitespace before properties 🔧
|
|
347
|
+
* https://eslint.org/docs/latest/rules/no-whitespace-before-property.
|
|
348
|
+
*/
|
|
349
|
+
"style/no-whitespace-before-property": "error",
|
|
350
|
+
|
|
351
|
+
/**
|
|
352
|
+
* Enforce the location of single-line statements 🔧
|
|
353
|
+
* https://eslint.org/docs/latest/rules/nonblock-statement-body-position.
|
|
354
|
+
*/
|
|
355
|
+
"style/nonblock-statement-body-position": ["error", "any", { overrides: {} }],
|
|
356
|
+
|
|
357
|
+
/**
|
|
358
|
+
* Require a newline around variable declaration 🔧
|
|
359
|
+
* https://eslint.org/docs/latest/rules/one-var-declaration-per-line.
|
|
360
|
+
*/
|
|
361
|
+
"style/one-var-declaration-per-line": ["error", "always"],
|
|
362
|
+
|
|
363
|
+
/**
|
|
364
|
+
* Enforce line breaks between braces. 🔧
|
|
365
|
+
* https://eslint.org/docs/latest/rules/object-curly-newline.
|
|
366
|
+
*/
|
|
367
|
+
"style/object-curly-newline": [
|
|
368
|
+
"error",
|
|
369
|
+
{
|
|
370
|
+
ObjectExpression: { minProperties: 10, multiline: true, consistent: true },
|
|
371
|
+
ObjectPattern: { minProperties: 10, multiline: true, consistent: true },
|
|
372
|
+
ImportDeclaration: { minProperties: 10, multiline: true, consistent: true },
|
|
373
|
+
ExportDeclaration: { minProperties: 10, multiline: true, consistent: true },
|
|
374
|
+
},
|
|
375
|
+
],
|
|
376
|
+
|
|
377
|
+
/**
|
|
378
|
+
* Require padding inside curly braces 🔧
|
|
379
|
+
* https://eslint.org/docs/latest/rules/object-curly-spacing.
|
|
380
|
+
*/
|
|
381
|
+
"style/object-curly-spacing": ["error", "always"],
|
|
382
|
+
|
|
383
|
+
/**
|
|
384
|
+
* Enforce "same line" or "multiple line" on object properties. 🔧
|
|
385
|
+
* https://eslint.org/docs/latest/rules/object-property-newline.
|
|
386
|
+
*/
|
|
387
|
+
"style/object-property-newline": ["error", { allowAllPropertiesOnSameLine: true }],
|
|
388
|
+
|
|
389
|
+
/**
|
|
390
|
+
* Requires operator at the beginning of the line in multiline statements 🔧
|
|
391
|
+
* https://eslint.org/docs/latest/rules/operator-linebreak.
|
|
392
|
+
*/
|
|
393
|
+
"style/operator-linebreak": ["error", "after", { overrides: { "?": "before", ":": "before" } }],
|
|
394
|
+
|
|
395
|
+
/**
|
|
396
|
+
* Disallow padding within blocks 🔧
|
|
397
|
+
* https://eslint.org/docs/latest/rules/padded-blocks.
|
|
398
|
+
*/
|
|
399
|
+
"style/padded-blocks": [
|
|
400
|
+
"error",
|
|
401
|
+
{
|
|
402
|
+
blocks: "never",
|
|
403
|
+
classes: "never",
|
|
404
|
+
switches: "never",
|
|
405
|
+
},
|
|
406
|
+
{
|
|
407
|
+
allowSingleLineBlocks: true,
|
|
408
|
+
},
|
|
409
|
+
],
|
|
410
|
+
|
|
411
|
+
/**
|
|
412
|
+
* Require or disallow padding lines between statements 🔧
|
|
413
|
+
* https://eslint.org/docs/latest/rules/padding-line-between-statements.
|
|
414
|
+
*/
|
|
415
|
+
"style/padding-line-between-statements": "off",
|
|
416
|
+
|
|
417
|
+
/**
|
|
418
|
+
* Specifies double quotes should be used 🔧
|
|
419
|
+
* https://eslint.org/docs/latest/rules/quotes.
|
|
420
|
+
*/
|
|
421
|
+
"style/quotes": ["error", "double", { avoidEscape: true }],
|
|
422
|
+
|
|
423
|
+
/**
|
|
424
|
+
* Require quotes around object literal property names 🔧
|
|
425
|
+
* https://eslint.org/docs/latest/rules/quote-props.
|
|
426
|
+
*/
|
|
427
|
+
"style/quote-props": ["error", "as-needed", { keywords: false, unnecessary: true, numbers: false }],
|
|
428
|
+
|
|
429
|
+
/**
|
|
430
|
+
* Enforce spacing between object rest-spread 🔧
|
|
431
|
+
* https://eslint.org/docs/latest/rules/rest-spread-spacing.
|
|
432
|
+
*/
|
|
433
|
+
"style/rest-spread-spacing": ["error", "never"],
|
|
434
|
+
|
|
435
|
+
/**
|
|
436
|
+
* Require or disallow use of semicolons instead of ASI.
|
|
437
|
+
*/
|
|
438
|
+
"style/semi": ["error", "always"],
|
|
439
|
+
|
|
440
|
+
/**
|
|
441
|
+
* Enforce spacing before and after semicolons 🔧
|
|
442
|
+
* https://eslint.org/docs/latest/rules/semi-spacing.
|
|
443
|
+
*/
|
|
444
|
+
"style/semi-spacing": ["error", { before: false, after: true }],
|
|
445
|
+
|
|
446
|
+
/**
|
|
447
|
+
* Enforce location of semicolons 🔧
|
|
448
|
+
* https://eslint.org/docs/latest/rules/semi-style.
|
|
449
|
+
*/
|
|
450
|
+
"style/semi-style": ["error", "last"],
|
|
451
|
+
|
|
452
|
+
/**
|
|
453
|
+
* Require or disallow space before blocks 🔧
|
|
454
|
+
* https://eslint.org/docs/latest/rules/space-before-blocks.
|
|
455
|
+
*/
|
|
456
|
+
"style/space-before-blocks": "error",
|
|
457
|
+
|
|
458
|
+
/**
|
|
459
|
+
* Require or disallow space before function opening parenthesis 🔧
|
|
460
|
+
* https://eslint.org/docs/latest/rules/space-before-function-paren.
|
|
461
|
+
*/
|
|
462
|
+
"style/space-before-function-paren": ["error", { anonymous: "always", named: "never", asyncArrow: "always" }],
|
|
463
|
+
|
|
464
|
+
/**
|
|
465
|
+
* Require or disallow spaces inside parentheses 🔧
|
|
466
|
+
* https://eslint.org/docs/latest/rules/space-in-parens.
|
|
467
|
+
*/
|
|
468
|
+
"style/space-in-parens": ["error", "never"],
|
|
469
|
+
|
|
470
|
+
/**
|
|
471
|
+
* Require spacing around infix operators 🔧
|
|
472
|
+
* https://eslint.org/docs/latest/rules/space-infix-ops.
|
|
473
|
+
*/
|
|
474
|
+
"style/space-infix-ops": ["error", { int32Hint: false }],
|
|
475
|
+
|
|
476
|
+
/**
|
|
477
|
+
* Require or disallow spaces before/after unary operators 🔧
|
|
478
|
+
* https://eslint.org/docs/latest/rules/space-unary-ops.
|
|
479
|
+
*/
|
|
480
|
+
"style/space-unary-ops": ["error", { words: true, nonwords: false, overrides: {} }],
|
|
481
|
+
|
|
482
|
+
/**
|
|
483
|
+
* Require or disallow a space immediately following the // or /* in a comment 🔧
|
|
484
|
+
* https://eslint.org/docs/latest/rules/spaced-comment.
|
|
485
|
+
*/
|
|
486
|
+
"style/spaced-comment": [
|
|
487
|
+
"error",
|
|
488
|
+
"always",
|
|
489
|
+
{
|
|
490
|
+
line: {
|
|
491
|
+
exceptions: ["-", "+"],
|
|
492
|
+
markers: ["=", "!", "/"], // space here to support sprockets directives, slash for TS /// comments
|
|
493
|
+
},
|
|
494
|
+
block: {
|
|
495
|
+
exceptions: ["-", "+"],
|
|
496
|
+
markers: ["=", "!", ":", "::"], // space here to support sprockets directives and flow comment types
|
|
497
|
+
balanced: true,
|
|
498
|
+
},
|
|
499
|
+
},
|
|
500
|
+
],
|
|
501
|
+
|
|
502
|
+
/**
|
|
503
|
+
* Enforce spacing around colons of switch statements 🔧
|
|
504
|
+
* https://eslint.org/docs/latest/rules/switch-colon-spacing.
|
|
505
|
+
*/
|
|
506
|
+
"style/switch-colon-spacing": ["error", { after: true, before: false }],
|
|
507
|
+
|
|
508
|
+
/**
|
|
509
|
+
* Enforce usage of spacing in template strings 🔧
|
|
510
|
+
* https://eslint.org/docs/latest/rules/template-curly-spacing.
|
|
511
|
+
*/
|
|
512
|
+
"style/template-curly-spacing": "error",
|
|
513
|
+
|
|
514
|
+
/**
|
|
515
|
+
* Require or disallow spacing between template tags and their literals 🔧
|
|
516
|
+
* https://eslint.org/docs/latest/rules/template-tag-spacing.
|
|
517
|
+
*/
|
|
518
|
+
"style/template-tag-spacing": ["error", "never"],
|
|
519
|
+
|
|
520
|
+
/**
|
|
521
|
+
* Require immediate function invocation to be wrapped in parentheses 🔧
|
|
522
|
+
* https://eslint.org/docs/latest/rules/wrap-iife.
|
|
523
|
+
*/
|
|
524
|
+
"style/wrap-iife": ["error", "inside", { functionPrototypeMethods: false }],
|
|
525
|
+
|
|
526
|
+
/**
|
|
527
|
+
* Require regex literals to be wrapped in parentheses 🔧
|
|
528
|
+
* https://eslint.org/docs/latest/rules/wrap-regex.
|
|
529
|
+
*/
|
|
530
|
+
"style/wrap-regex": "off",
|
|
531
|
+
|
|
532
|
+
/**
|
|
533
|
+
* Enforce spacing around the * in yield* expressions 🔧
|
|
534
|
+
* https://eslint.org/docs/latest/rules/yield-star-spacing.
|
|
535
|
+
*/
|
|
536
|
+
"style/yield-star-spacing": ["error", "after"],
|
|
537
|
+
},
|
|
538
|
+
};
|