@newsteam/eslint-config 1.2.13 → 1.2.15
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/dist/index.d.ts +0 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +11 -24
- package/dist/plugins/array-function.js +5 -5
- package/dist/plugins/css-modules.js +2 -2
- package/dist/plugins/destructuring.js +2 -2
- package/dist/plugins/eslint-comments.js +19 -19
- package/dist/plugins/import-newlines.js +1 -1
- package/dist/plugins/import-x.js +19 -19
- package/dist/plugins/newline-destructuring.js +1 -1
- package/dist/plugins/next.js +21 -21
- package/dist/plugins/no-unsanitized.js +2 -2
- package/dist/plugins/no-useless-assign.js +1 -1
- package/dist/plugins/node.js +31 -31
- package/dist/plugins/perfectionist.d.ts.map +1 -1
- package/dist/plugins/perfectionist.js +21 -20
- package/dist/plugins/promise.js +13 -13
- package/dist/plugins/react-19-upgrade.js +7 -7
- package/dist/plugins/react-compiler.js +1 -1
- package/dist/plugins/react-hooks.js +22 -22
- package/dist/plugins/react-perf.js +1 -1
- package/dist/plugins/react-refresh.js +1 -1
- package/dist/plugins/react.js +69 -69
- package/dist/plugins/security.js +13 -13
- package/dist/plugins/sort-react-dependency-arrays.js +1 -1
- package/dist/plugins/stylistic.d.ts.map +1 -1
- package/dist/plugins/stylistic.js +102 -88
- package/dist/plugins/typescript.d.ts.map +1 -1
- package/dist/plugins/typescript.js +172 -126
- package/dist/plugins/unicorn.js +127 -127
- package/dist/rules.js +186 -186
- package/dist/settings.d.ts.map +1 -1
- package/dist/settings.js +0 -1
- package/package.json +38 -44
- package/dist/plugins/const-case.d.ts +0 -3
- package/dist/plugins/const-case.d.ts.map +0 -1
- package/dist/plugins/const-case.js +0 -16
- package/dist/plugins/more.d.ts +0 -3
- package/dist/plugins/more.d.ts.map +0 -1
- package/dist/plugins/more.js +0 -101
|
@@ -17,7 +17,7 @@ export const stylisticPlugin = [
|
|
|
17
17
|
* https://eslint.style/rules/default/array-bracket-newline
|
|
18
18
|
*/
|
|
19
19
|
"@stylistic/array-bracket-newline": [
|
|
20
|
-
"
|
|
20
|
+
"warn",
|
|
21
21
|
"consistent",
|
|
22
22
|
],
|
|
23
23
|
/*
|
|
@@ -25,14 +25,14 @@ export const stylisticPlugin = [
|
|
|
25
25
|
*
|
|
26
26
|
* https://eslint.style/rules/default/array-bracket-spacing
|
|
27
27
|
*/
|
|
28
|
-
"@stylistic/array-bracket-spacing": "
|
|
28
|
+
"@stylistic/array-bracket-spacing": "warn",
|
|
29
29
|
/*
|
|
30
30
|
* Enforce line breaks after each array element
|
|
31
31
|
*
|
|
32
32
|
* https://eslint.style/rules/default/array-element-newline
|
|
33
33
|
*/
|
|
34
34
|
"@stylistic/array-element-newline": [
|
|
35
|
-
"
|
|
35
|
+
"warn",
|
|
36
36
|
"consistent",
|
|
37
37
|
],
|
|
38
38
|
/*
|
|
@@ -40,33 +40,33 @@ export const stylisticPlugin = [
|
|
|
40
40
|
*
|
|
41
41
|
* https://eslint.style/rules/default/arrow-parens
|
|
42
42
|
*/
|
|
43
|
-
"@stylistic/arrow-parens": "
|
|
43
|
+
"@stylistic/arrow-parens": "warn",
|
|
44
44
|
/*
|
|
45
45
|
* Enforce consistent spacing before and after the arrow in arrow functions
|
|
46
46
|
*
|
|
47
47
|
* https://eslint.style/rules/default/arrow-spacing
|
|
48
48
|
*/
|
|
49
|
-
"@stylistic/arrow-spacing": "
|
|
49
|
+
"@stylistic/arrow-spacing": "warn",
|
|
50
50
|
/*
|
|
51
51
|
* Disallow or enforce spaces inside of blocks after opening block and
|
|
52
52
|
* before closing block
|
|
53
53
|
*
|
|
54
54
|
* https://eslint.style/rules/default/block-spacing
|
|
55
55
|
*/
|
|
56
|
-
"@stylistic/block-spacing": "
|
|
56
|
+
"@stylistic/block-spacing": "warn",
|
|
57
57
|
/*
|
|
58
58
|
* Enforce consistent brace style for blocks
|
|
59
59
|
*
|
|
60
60
|
* https://eslint.style/rules/default/brace-style
|
|
61
61
|
*/
|
|
62
|
-
"@stylistic/brace-style": "
|
|
62
|
+
"@stylistic/brace-style": "warn",
|
|
63
63
|
/*
|
|
64
64
|
* Require or disallow trailing commas
|
|
65
65
|
*
|
|
66
66
|
* https://eslint.style/rules/default/comma-dangle
|
|
67
67
|
*/
|
|
68
68
|
"@stylistic/comma-dangle": [
|
|
69
|
-
"
|
|
69
|
+
"warn",
|
|
70
70
|
{
|
|
71
71
|
arrays: "always-multiline",
|
|
72
72
|
enums: "always-multiline",
|
|
@@ -83,26 +83,26 @@ export const stylisticPlugin = [
|
|
|
83
83
|
*
|
|
84
84
|
* https://eslint.style/rules/default/comma-spacing
|
|
85
85
|
*/
|
|
86
|
-
"@stylistic/comma-spacing": "
|
|
86
|
+
"@stylistic/comma-spacing": "warn",
|
|
87
87
|
/*
|
|
88
88
|
* Enforce consistent comma style
|
|
89
89
|
*
|
|
90
90
|
* https://eslint.style/rules/default/comma-style
|
|
91
91
|
*/
|
|
92
|
-
"@stylistic/comma-style": "
|
|
92
|
+
"@stylistic/comma-style": "warn",
|
|
93
93
|
/*
|
|
94
94
|
* Enforce consistent spacing inside computed property brackets
|
|
95
95
|
*
|
|
96
96
|
* https://eslint.style/rules/default/computed-property-spacing
|
|
97
97
|
*/
|
|
98
|
-
"@stylistic/computed-property-spacing": "
|
|
98
|
+
"@stylistic/computed-property-spacing": "warn",
|
|
99
99
|
/*
|
|
100
100
|
*
|
|
101
101
|
*
|
|
102
102
|
* https://eslint.style/rules/default/curly-newline
|
|
103
103
|
*/
|
|
104
104
|
"@stylistic/curly-newline": [
|
|
105
|
-
"
|
|
105
|
+
"warn",
|
|
106
106
|
{
|
|
107
107
|
ArrowFunctionExpression: "always",
|
|
108
108
|
BlockStatement: "always",
|
|
@@ -145,7 +145,7 @@ export const stylisticPlugin = [
|
|
|
145
145
|
* https://eslint.style/rules/default/dot-location
|
|
146
146
|
*/
|
|
147
147
|
"@stylistic/dot-location": [
|
|
148
|
-
"
|
|
148
|
+
"warn",
|
|
149
149
|
"property",
|
|
150
150
|
],
|
|
151
151
|
/*
|
|
@@ -153,14 +153,14 @@ export const stylisticPlugin = [
|
|
|
153
153
|
*
|
|
154
154
|
* https://eslint.style/rules/default/eol-last
|
|
155
155
|
*/
|
|
156
|
-
"@stylistic/eol-last": "
|
|
156
|
+
"@stylistic/eol-last": "warn",
|
|
157
157
|
/*
|
|
158
158
|
* Enforce consistent spacing and line break styles inside brackets.
|
|
159
159
|
*
|
|
160
160
|
* https://eslint.style/rules/default/exp-list-style
|
|
161
161
|
*/
|
|
162
162
|
"@stylistic/exp-list-style": [
|
|
163
|
-
"
|
|
163
|
+
"warn",
|
|
164
164
|
{
|
|
165
165
|
multiLine: {
|
|
166
166
|
minItems: 0,
|
|
@@ -186,7 +186,7 @@ export const stylisticPlugin = [
|
|
|
186
186
|
* https://eslint.style/rules/default/function-call-argument-newline
|
|
187
187
|
*/
|
|
188
188
|
"@stylistic/function-call-argument-newline": [
|
|
189
|
-
"
|
|
189
|
+
"warn",
|
|
190
190
|
"consistent",
|
|
191
191
|
],
|
|
192
192
|
/*
|
|
@@ -195,32 +195,32 @@ export const stylisticPlugin = [
|
|
|
195
195
|
*
|
|
196
196
|
* https://eslint.style/rules/default/function-call-spacing
|
|
197
197
|
*/
|
|
198
|
-
"@stylistic/function-call-spacing": "
|
|
198
|
+
"@stylistic/function-call-spacing": "warn",
|
|
199
199
|
/*
|
|
200
200
|
* Enforce consistent line breaks inside function parentheses
|
|
201
201
|
*
|
|
202
202
|
* https://eslint.style/rules/default/function-paren-newline
|
|
203
203
|
*/
|
|
204
|
-
"@stylistic/function-paren-newline": ["
|
|
204
|
+
"@stylistic/function-paren-newline": ["warn", "consistent"],
|
|
205
205
|
/*
|
|
206
206
|
* Enforce consistent spacing around * operators in generator functions
|
|
207
207
|
*
|
|
208
208
|
* https://eslint.style/rules/default/generator-star-spacing
|
|
209
209
|
*/
|
|
210
|
-
"@stylistic/generator-star-spacing": "
|
|
210
|
+
"@stylistic/generator-star-spacing": "warn",
|
|
211
211
|
/*
|
|
212
212
|
* Enforce the location of arrow function bodies
|
|
213
213
|
*
|
|
214
214
|
* https://eslint.style/rules/default/implicit-arrow-linebreak
|
|
215
215
|
*/
|
|
216
|
-
"@stylistic/implicit-arrow-linebreak": "
|
|
216
|
+
"@stylistic/implicit-arrow-linebreak": "warn",
|
|
217
217
|
/*
|
|
218
218
|
* Enforce consistent indentation
|
|
219
219
|
*
|
|
220
220
|
* https://eslint.style/rules/default/indent
|
|
221
221
|
*/
|
|
222
222
|
"@stylistic/indent": [
|
|
223
|
-
"
|
|
223
|
+
"warn",
|
|
224
224
|
INDENT_SPACES,
|
|
225
225
|
{
|
|
226
226
|
MemberExpression: 0,
|
|
@@ -233,7 +233,7 @@ export const stylisticPlugin = [
|
|
|
233
233
|
* https://eslint.style/rules/default/indent-binary-ops
|
|
234
234
|
*/
|
|
235
235
|
"@stylistic/indent-binary-ops": [
|
|
236
|
-
"
|
|
236
|
+
"warn",
|
|
237
237
|
INDENT_SPACES,
|
|
238
238
|
],
|
|
239
239
|
/*
|
|
@@ -241,19 +241,19 @@ export const stylisticPlugin = [
|
|
|
241
241
|
*
|
|
242
242
|
* https://eslint.style/rules/default/jsx-child-element-spacing
|
|
243
243
|
*/
|
|
244
|
-
"@stylistic/jsx-child-element-spacing": "
|
|
244
|
+
"@stylistic/jsx-child-element-spacing": "warn",
|
|
245
245
|
/*
|
|
246
246
|
* Validate closing bracket location in JSX (fixable)
|
|
247
247
|
*
|
|
248
248
|
* https://eslint.style/rules/default/jsx-closing-bracket-location
|
|
249
249
|
*/
|
|
250
|
-
"@stylistic/jsx-closing-bracket-location": "
|
|
250
|
+
"@stylistic/jsx-closing-bracket-location": "warn",
|
|
251
251
|
/*
|
|
252
252
|
* Validate closing tag location in JSX (fixable)
|
|
253
253
|
*
|
|
254
254
|
* https://eslint.style/rules/default/jsx-closing-tag-location
|
|
255
255
|
*/
|
|
256
|
-
"@stylistic/jsx-closing-tag-location": "
|
|
256
|
+
"@stylistic/jsx-closing-tag-location": "warn",
|
|
257
257
|
/*
|
|
258
258
|
* Enforce curly braces or disallow unnecessary curly braces in JSX
|
|
259
259
|
*
|
|
@@ -267,14 +267,14 @@ export const stylisticPlugin = [
|
|
|
267
267
|
*
|
|
268
268
|
* https://eslint.style/rules/default/jsx-curly-newline
|
|
269
269
|
*/
|
|
270
|
-
"@stylistic/jsx-curly-newline": ["
|
|
270
|
+
"@stylistic/jsx-curly-newline": ["warn", "consistent"],
|
|
271
271
|
/*
|
|
272
272
|
* Enforce or disallow spaces inside of curly braces in JSX attributes and expressions (fixable)
|
|
273
273
|
*
|
|
274
274
|
* https://eslint.style/rules/default/jsx-curly-spacing
|
|
275
275
|
*/
|
|
276
276
|
"@stylistic/jsx-curly-spacing": [
|
|
277
|
-
"
|
|
277
|
+
"warn",
|
|
278
278
|
{
|
|
279
279
|
children: { when: "always" },
|
|
280
280
|
when: "always",
|
|
@@ -285,25 +285,25 @@ export const stylisticPlugin = [
|
|
|
285
285
|
*
|
|
286
286
|
* https://eslint.style/rules/default/jsx-equals-spacing
|
|
287
287
|
*/
|
|
288
|
-
"@stylistic/jsx-equals-spacing": "
|
|
288
|
+
"@stylistic/jsx-equals-spacing": "warn",
|
|
289
289
|
/*
|
|
290
290
|
* Enforce position of the first prop in JSX (fixable)
|
|
291
291
|
*
|
|
292
292
|
* https://eslint.style/rules/default/jsx-first-prop-new-line
|
|
293
293
|
*/
|
|
294
|
-
"@stylistic/jsx-first-prop-new-line": "
|
|
294
|
+
"@stylistic/jsx-first-prop-new-line": "warn",
|
|
295
295
|
/*
|
|
296
296
|
* Enforce line breaks before and after JSX elements when they are used as arguments to a function.
|
|
297
297
|
*
|
|
298
298
|
* https://eslint.style/rules/default/jsx-function-call-newline
|
|
299
299
|
*/
|
|
300
|
-
"@stylistic/jsx-function-call-newline": ["
|
|
300
|
+
"@stylistic/jsx-function-call-newline": ["warn", "multiline"],
|
|
301
301
|
/*
|
|
302
302
|
* Validate props indentation in JSX (fixable)
|
|
303
303
|
*
|
|
304
304
|
* https://eslint.style/rules/default/jsx-indent-props
|
|
305
305
|
*/
|
|
306
|
-
"@stylistic/jsx-indent-props": "
|
|
306
|
+
"@stylistic/jsx-indent-props": "warn",
|
|
307
307
|
/*
|
|
308
308
|
* Limit maximum of props on a single line in JSX (fixable)
|
|
309
309
|
*
|
|
@@ -313,7 +313,7 @@ export const stylisticPlugin = [
|
|
|
313
313
|
* https://eslint.style/rules/default/jsx-max-props-per-line
|
|
314
314
|
*/
|
|
315
315
|
"@stylistic/jsx-max-props-per-line": [
|
|
316
|
-
"
|
|
316
|
+
"warn",
|
|
317
317
|
{ maximum: 1 },
|
|
318
318
|
],
|
|
319
319
|
/*
|
|
@@ -329,25 +329,25 @@ export const stylisticPlugin = [
|
|
|
329
329
|
*
|
|
330
330
|
* https://eslint.style/rules/default/jsx-one-expression-per-line
|
|
331
331
|
*/
|
|
332
|
-
"@stylistic/jsx-one-expression-per-line": "
|
|
332
|
+
"@stylistic/jsx-one-expression-per-line": "warn",
|
|
333
333
|
/*
|
|
334
334
|
* Enforces coding style that user-defined JSX components are defined and referenced in PascalCase.
|
|
335
335
|
*
|
|
336
336
|
* https://eslint.style/rules/default/jsx-pascal-case
|
|
337
337
|
*/
|
|
338
|
-
"@stylistic/jsx-pascal-case": "
|
|
338
|
+
"@stylistic/jsx-pascal-case": "warn",
|
|
339
339
|
/*
|
|
340
340
|
* Enforce the consistent use of either double or single quotes in JSX attributes
|
|
341
341
|
*
|
|
342
342
|
* https://eslint.style/rules/default/jsx-quotes
|
|
343
343
|
*/
|
|
344
|
-
"@stylistic/jsx-quotes": "
|
|
344
|
+
"@stylistic/jsx-quotes": "warn",
|
|
345
345
|
/*
|
|
346
346
|
* Prevent extra closing tags for components without children (fixable)
|
|
347
347
|
*
|
|
348
348
|
* https://eslint.style/rules/default/self-closing-comp
|
|
349
349
|
*/
|
|
350
|
-
"@stylistic/jsx-self-closing-comp": "
|
|
350
|
+
"@stylistic/jsx-self-closing-comp": "warn",
|
|
351
351
|
/*
|
|
352
352
|
* Enforce props alphabetical sorting (fixable)
|
|
353
353
|
*
|
|
@@ -366,20 +366,20 @@ export const stylisticPlugin = [
|
|
|
366
366
|
*
|
|
367
367
|
* https://eslint.style/rules/default/jsx-tag-spacing
|
|
368
368
|
*/
|
|
369
|
-
"@stylistic/jsx-tag-spacing": "
|
|
369
|
+
"@stylistic/jsx-tag-spacing": "warn",
|
|
370
370
|
/*
|
|
371
371
|
* Prevent missing parentheses around multilines JSX (fixable)
|
|
372
372
|
*
|
|
373
373
|
* https://eslint.style/rules/default/jsx-wrap-multilines
|
|
374
374
|
*/
|
|
375
|
-
"@stylistic/jsx-wrap-multilines": "
|
|
375
|
+
"@stylistic/jsx-wrap-multilines": "warn",
|
|
376
376
|
/*
|
|
377
377
|
* Enforce consistent spacing between keys and values in object literal properties
|
|
378
378
|
*
|
|
379
379
|
* https://eslint.style/rules/default/key-spacing
|
|
380
380
|
*/
|
|
381
381
|
"@stylistic/key-spacing": [
|
|
382
|
-
"
|
|
382
|
+
"warn",
|
|
383
383
|
{
|
|
384
384
|
afterColon: true,
|
|
385
385
|
beforeColon: false,
|
|
@@ -392,7 +392,7 @@ export const stylisticPlugin = [
|
|
|
392
392
|
* https://eslint.style/rules/default/keyword-spacing
|
|
393
393
|
*/
|
|
394
394
|
"@stylistic/keyword-spacing": [
|
|
395
|
-
"
|
|
395
|
+
"warn",
|
|
396
396
|
{
|
|
397
397
|
after: true,
|
|
398
398
|
before: true,
|
|
@@ -457,26 +457,26 @@ export const stylisticPlugin = [
|
|
|
457
457
|
*
|
|
458
458
|
* https://eslint.style/rules/default/line-comment-position
|
|
459
459
|
*/
|
|
460
|
-
"@stylistic/line-comment-position": "
|
|
460
|
+
"@stylistic/line-comment-position": "warn",
|
|
461
461
|
/*
|
|
462
462
|
* Enforce consistent linebreak style
|
|
463
463
|
*
|
|
464
464
|
* https://eslint.style/rules/default/linebreak-style
|
|
465
465
|
*/
|
|
466
|
-
"@stylistic/linebreak-style": "
|
|
466
|
+
"@stylistic/linebreak-style": "warn",
|
|
467
467
|
/*
|
|
468
468
|
* Require empty lines around comments
|
|
469
469
|
*
|
|
470
470
|
* https://eslint.style/rules/default/lines-around-comment
|
|
471
471
|
*/
|
|
472
|
-
"@stylistic/lines-around-comment": "
|
|
472
|
+
"@stylistic/lines-around-comment": "warn",
|
|
473
473
|
/*
|
|
474
474
|
* Require or disallow an empty line between class members
|
|
475
475
|
*
|
|
476
476
|
* https://eslint.style/rules/default/lines-between-class-members
|
|
477
477
|
*/
|
|
478
478
|
"@stylistic/lines-between-class-members": [
|
|
479
|
-
"
|
|
479
|
+
"warn",
|
|
480
480
|
"always",
|
|
481
481
|
{
|
|
482
482
|
exceptAfterSingleLine: true,
|
|
@@ -488,7 +488,7 @@ export const stylisticPlugin = [
|
|
|
488
488
|
* https://eslint.style/rules/default/max-len
|
|
489
489
|
*/
|
|
490
490
|
"@stylistic/max-len": [
|
|
491
|
-
"
|
|
491
|
+
"warn",
|
|
492
492
|
{
|
|
493
493
|
code: MAXIMUM_LINE_LENGTH,
|
|
494
494
|
ignoreComments: true,
|
|
@@ -500,7 +500,7 @@ export const stylisticPlugin = [
|
|
|
500
500
|
* https://eslint.style/rules/default/max-statements-per-line
|
|
501
501
|
*/
|
|
502
502
|
"@stylistic/max-statements-per-line": [
|
|
503
|
-
"
|
|
503
|
+
"warn",
|
|
504
504
|
{
|
|
505
505
|
max: 1,
|
|
506
506
|
},
|
|
@@ -510,7 +510,7 @@ export const stylisticPlugin = [
|
|
|
510
510
|
*
|
|
511
511
|
* https://eslint.style/rules/default/member-delimiter-style
|
|
512
512
|
*/
|
|
513
|
-
"@stylistic/member-delimiter-style": "
|
|
513
|
+
"@stylistic/member-delimiter-style": "warn",
|
|
514
514
|
/*
|
|
515
515
|
* Many style guides require a particular style for comments that span multiple lines.
|
|
516
516
|
* For example, some style guides prefer the use of a single block comment for multiline
|
|
@@ -526,20 +526,20 @@ export const stylisticPlugin = [
|
|
|
526
526
|
*
|
|
527
527
|
* https://eslint.style/rules/default/multiline-ternary
|
|
528
528
|
*/
|
|
529
|
-
"@stylistic/multiline-ternary": ["
|
|
529
|
+
"@stylistic/multiline-ternary": ["warn", "always-multiline"],
|
|
530
530
|
/*
|
|
531
531
|
* Require parentheses when invoking a constructor with no arguments
|
|
532
532
|
*
|
|
533
533
|
* https://eslint.style/rules/default/new-parens
|
|
534
534
|
*/
|
|
535
|
-
"@stylistic/new-parens": "
|
|
535
|
+
"@stylistic/new-parens": "warn",
|
|
536
536
|
/*
|
|
537
537
|
* Require a newline after each call in a method chain
|
|
538
538
|
*
|
|
539
539
|
* https://eslint.style/rules/default/newline-per-chained-call
|
|
540
540
|
*/
|
|
541
541
|
"@stylistic/newline-per-chained-call": [
|
|
542
|
-
"
|
|
542
|
+
"warn",
|
|
543
543
|
{
|
|
544
544
|
ignoreChainWithDepth: 3,
|
|
545
545
|
},
|
|
@@ -558,7 +558,7 @@ export const stylisticPlugin = [
|
|
|
558
558
|
* https://eslint.style/rules/default/no-extra-parens
|
|
559
559
|
*/
|
|
560
560
|
"@stylistic/no-extra-parens": [
|
|
561
|
-
"
|
|
561
|
+
"warn",
|
|
562
562
|
"all",
|
|
563
563
|
{
|
|
564
564
|
ignoreJSX: "multi-line",
|
|
@@ -571,13 +571,13 @@ export const stylisticPlugin = [
|
|
|
571
571
|
*
|
|
572
572
|
* https://eslint.style/rules/default/no-extra-semi
|
|
573
573
|
*/
|
|
574
|
-
"@stylistic/no-extra-semi": "
|
|
574
|
+
"@stylistic/no-extra-semi": "warn",
|
|
575
575
|
/*
|
|
576
576
|
* Disallow leading or trailing decimal points in numeric literals
|
|
577
577
|
*
|
|
578
578
|
* https://eslint.style/rules/default/no-floating-decimal
|
|
579
579
|
*/
|
|
580
|
-
"@stylistic/no-floating-decimal": "
|
|
580
|
+
"@stylistic/no-floating-decimal": "warn",
|
|
581
581
|
/*
|
|
582
582
|
* Disallow mixed binary operators
|
|
583
583
|
*
|
|
@@ -591,50 +591,50 @@ export const stylisticPlugin = [
|
|
|
591
591
|
*
|
|
592
592
|
* https://eslint.style/rules/default/no-mixed-spaces-and-tabs
|
|
593
593
|
*/
|
|
594
|
-
"@stylistic/no-mixed-spaces-and-tabs": "
|
|
594
|
+
"@stylistic/no-mixed-spaces-and-tabs": "warn",
|
|
595
595
|
/*
|
|
596
596
|
* Disallow multiple spaces
|
|
597
597
|
*
|
|
598
598
|
* https://eslint.style/rules/default/no-multi-spaces
|
|
599
599
|
*/
|
|
600
|
-
"@stylistic/no-multi-spaces": "
|
|
600
|
+
"@stylistic/no-multi-spaces": "warn",
|
|
601
601
|
/*
|
|
602
602
|
* Disallow multiple empty lines
|
|
603
603
|
*
|
|
604
604
|
* https://eslint.style/rules/default/no-multiple-empty-lines
|
|
605
605
|
*/
|
|
606
|
-
"@stylistic/no-multiple-empty-lines": "
|
|
606
|
+
"@stylistic/no-multiple-empty-lines": "warn",
|
|
607
607
|
/*
|
|
608
608
|
* Disallow all tabs
|
|
609
609
|
*
|
|
610
610
|
* https://eslint.style/rules/default/no-tabs
|
|
611
611
|
*/
|
|
612
|
-
"@stylistic/no-tabs": "
|
|
612
|
+
"@stylistic/no-tabs": "warn",
|
|
613
613
|
/*
|
|
614
614
|
* Disallow trailing whitespace at the end of lines
|
|
615
615
|
*
|
|
616
616
|
* https://eslint.style/rules/default/no-trailing-spaces
|
|
617
617
|
*/
|
|
618
|
-
"@stylistic/no-trailing-spaces": "
|
|
618
|
+
"@stylistic/no-trailing-spaces": "warn",
|
|
619
619
|
/*
|
|
620
620
|
* Disallow whitespace before properties
|
|
621
621
|
*
|
|
622
622
|
* https://eslint.style/rules/default/no-whitespace-before-property
|
|
623
623
|
*/
|
|
624
|
-
"@stylistic/no-whitespace-before-property": "
|
|
624
|
+
"@stylistic/no-whitespace-before-property": "warn",
|
|
625
625
|
/*
|
|
626
626
|
* Enforce the location of single-line statements
|
|
627
627
|
*
|
|
628
628
|
* https://eslint.style/rules/default/nonblock-statement-body-position
|
|
629
629
|
*/
|
|
630
|
-
"@stylistic/nonblock-statement-body-position": "
|
|
630
|
+
"@stylistic/nonblock-statement-body-position": "warn",
|
|
631
631
|
/*
|
|
632
632
|
* Enforce consistent line breaks inside braces
|
|
633
633
|
*
|
|
634
634
|
* https://eslint.style/rules/default/object-curly-newline
|
|
635
635
|
*/
|
|
636
636
|
"@stylistic/object-curly-newline": [
|
|
637
|
-
"
|
|
637
|
+
"warn",
|
|
638
638
|
{
|
|
639
639
|
ExportDeclaration: {
|
|
640
640
|
consistent: true,
|
|
@@ -663,14 +663,14 @@ export const stylisticPlugin = [
|
|
|
663
663
|
*
|
|
664
664
|
* https://eslint.style/rules/default/object-curly-spacing
|
|
665
665
|
*/
|
|
666
|
-
"@stylistic/object-curly-spacing": ["
|
|
666
|
+
"@stylistic/object-curly-spacing": ["warn", "always"],
|
|
667
667
|
/*
|
|
668
668
|
* Enforce placing object properties on separate lines
|
|
669
669
|
*
|
|
670
670
|
* https://eslint.style/rules/default/object-property-newline
|
|
671
671
|
*/
|
|
672
672
|
"@stylistic/object-property-newline": [
|
|
673
|
-
"
|
|
673
|
+
"warn",
|
|
674
674
|
{
|
|
675
675
|
allowAllPropertiesOnSameLine: false,
|
|
676
676
|
},
|
|
@@ -680,14 +680,14 @@ export const stylisticPlugin = [
|
|
|
680
680
|
*
|
|
681
681
|
* https://eslint.style/rules/default/one-var-declaration-per-line
|
|
682
682
|
*/
|
|
683
|
-
"@stylistic/one-var-declaration-per-line": "
|
|
683
|
+
"@stylistic/one-var-declaration-per-line": "warn",
|
|
684
684
|
/*
|
|
685
685
|
* Enforce consistent linebreak style for operators
|
|
686
686
|
*
|
|
687
687
|
* https://eslint.style/rules/default/operator-linebreak
|
|
688
688
|
*/
|
|
689
689
|
"@stylistic/operator-linebreak": [
|
|
690
|
-
"
|
|
690
|
+
"warn",
|
|
691
691
|
"before",
|
|
692
692
|
{
|
|
693
693
|
overrides: { "=": "after" },
|
|
@@ -699,11 +699,15 @@ export const stylisticPlugin = [
|
|
|
699
699
|
* https://eslint.style/rules/default/padded-blocks
|
|
700
700
|
*/
|
|
701
701
|
"@stylistic/padded-blocks": [
|
|
702
|
-
"
|
|
702
|
+
"warn",
|
|
703
703
|
{
|
|
704
|
+
blocks: "always",
|
|
704
705
|
classes: "always",
|
|
705
706
|
switches: "always",
|
|
706
707
|
},
|
|
708
|
+
{
|
|
709
|
+
allowSingleLineBlocks: true,
|
|
710
|
+
},
|
|
707
711
|
],
|
|
708
712
|
/*
|
|
709
713
|
* Require or disallow padding lines between statements
|
|
@@ -711,7 +715,7 @@ export const stylisticPlugin = [
|
|
|
711
715
|
* https://eslint.style/rules/default/padding-line-between-statements
|
|
712
716
|
*/
|
|
713
717
|
"@stylistic/padding-line-between-statements": [
|
|
714
|
-
"
|
|
718
|
+
"warn",
|
|
715
719
|
{
|
|
716
720
|
blankLine: "always",
|
|
717
721
|
next: [
|
|
@@ -729,44 +733,54 @@ export const stylisticPlugin = [
|
|
|
729
733
|
"return",
|
|
730
734
|
],
|
|
731
735
|
},
|
|
736
|
+
{
|
|
737
|
+
blankLine: "always",
|
|
738
|
+
next: "if",
|
|
739
|
+
prev: "*",
|
|
740
|
+
},
|
|
741
|
+
{
|
|
742
|
+
blankLine: "always",
|
|
743
|
+
next: "return",
|
|
744
|
+
prev: "*",
|
|
745
|
+
},
|
|
732
746
|
],
|
|
733
747
|
/*
|
|
734
748
|
* Require quotes around object literal property names
|
|
735
749
|
*
|
|
736
750
|
* https://eslint.style/rules/default/quote-props
|
|
737
751
|
*/
|
|
738
|
-
"@stylistic/quote-props": ["
|
|
752
|
+
"@stylistic/quote-props": ["warn", "as-needed"],
|
|
739
753
|
/*
|
|
740
754
|
* Enforce the consistent use of either backticks, double, or single quotes
|
|
741
755
|
*
|
|
742
756
|
* https://eslint.style/rules/default/quotes
|
|
743
757
|
*/
|
|
744
|
-
"@stylistic/quotes": "
|
|
758
|
+
"@stylistic/quotes": "warn",
|
|
745
759
|
/*
|
|
746
760
|
* Enforce spacing between rest and spread operators and their expressions
|
|
747
761
|
*
|
|
748
762
|
* https://eslint.style/rules/default/rest-spread-spacing
|
|
749
763
|
*/
|
|
750
|
-
"@stylistic/rest-spread-spacing": "
|
|
764
|
+
"@stylistic/rest-spread-spacing": "warn",
|
|
751
765
|
/*
|
|
752
766
|
* Require or disallow semicolons instead of ASI
|
|
753
767
|
*
|
|
754
768
|
* https://eslint.style/rules/default/semi
|
|
755
769
|
*/
|
|
756
|
-
"@stylistic/semi": "
|
|
770
|
+
"@stylistic/semi": "warn",
|
|
757
771
|
/*
|
|
758
772
|
* Enforce consistent spacing before and after semicolons
|
|
759
773
|
*
|
|
760
774
|
* https://eslint.style/rules/default/semi-spacing
|
|
761
775
|
*/
|
|
762
|
-
"@stylistic/semi-spacing": "
|
|
776
|
+
"@stylistic/semi-spacing": "warn",
|
|
763
777
|
/*
|
|
764
778
|
* Enforce location of semicolons
|
|
765
779
|
*
|
|
766
780
|
* https://eslint.style/rules/default/semi-style
|
|
767
781
|
*/
|
|
768
782
|
"@stylistic/semi-style": [
|
|
769
|
-
"
|
|
783
|
+
"warn",
|
|
770
784
|
"last",
|
|
771
785
|
],
|
|
772
786
|
/*
|
|
@@ -775,7 +789,7 @@ export const stylisticPlugin = [
|
|
|
775
789
|
* https://eslint.style/rules/default/space-before-blocks
|
|
776
790
|
*/
|
|
777
791
|
"@stylistic/space-before-blocks": [
|
|
778
|
-
"
|
|
792
|
+
"warn",
|
|
779
793
|
{
|
|
780
794
|
classes: "never",
|
|
781
795
|
functions: "never",
|
|
@@ -788,7 +802,7 @@ export const stylisticPlugin = [
|
|
|
788
802
|
* https://eslint.style/rules/default/space-before-function-paren
|
|
789
803
|
*/
|
|
790
804
|
"@stylistic/space-before-function-paren": [
|
|
791
|
-
"
|
|
805
|
+
"warn",
|
|
792
806
|
{
|
|
793
807
|
anonymous: "never",
|
|
794
808
|
asyncArrow: "always",
|
|
@@ -800,32 +814,32 @@ export const stylisticPlugin = [
|
|
|
800
814
|
*
|
|
801
815
|
* https://eslint.style/rules/default/space-in-parens
|
|
802
816
|
*/
|
|
803
|
-
"@stylistic/space-in-parens": ["
|
|
817
|
+
"@stylistic/space-in-parens": ["warn", "never"],
|
|
804
818
|
/*
|
|
805
819
|
* Require spacing around infix operators
|
|
806
820
|
*
|
|
807
821
|
* https://eslint.style/rules/default/space-infix-ops
|
|
808
822
|
*/
|
|
809
|
-
"@stylistic/space-infix-ops": "
|
|
823
|
+
"@stylistic/space-infix-ops": "warn",
|
|
810
824
|
/*
|
|
811
825
|
* Enforce consistent spacing before or after unary operators
|
|
812
826
|
*
|
|
813
827
|
* https://eslint.style/rules/default/space-unary-ops
|
|
814
828
|
*/
|
|
815
|
-
"@stylistic/space-unary-ops": "
|
|
829
|
+
"@stylistic/space-unary-ops": "warn",
|
|
816
830
|
/*
|
|
817
831
|
* Enforce consistent spacing after the // or /* in a comment
|
|
818
832
|
*
|
|
819
833
|
* https://eslint.style/rules/default/spaced-comment
|
|
820
834
|
*/
|
|
821
|
-
"@stylistic/spaced-comment": "
|
|
835
|
+
"@stylistic/spaced-comment": "warn",
|
|
822
836
|
/*
|
|
823
837
|
* Enforce spacing around colons of switch statements
|
|
824
838
|
*
|
|
825
839
|
* https://eslint.style/rules/default/switch-colon-spacing
|
|
826
840
|
*/
|
|
827
841
|
"@stylistic/switch-colon-spacing": [
|
|
828
|
-
"
|
|
842
|
+
"warn",
|
|
829
843
|
{
|
|
830
844
|
after: false,
|
|
831
845
|
before: true,
|
|
@@ -837,7 +851,7 @@ export const stylisticPlugin = [
|
|
|
837
851
|
* https://eslint.style/rules/default/template-curly-spacing
|
|
838
852
|
*/
|
|
839
853
|
"@stylistic/template-curly-spacing": [
|
|
840
|
-
"
|
|
854
|
+
"warn",
|
|
841
855
|
"always",
|
|
842
856
|
],
|
|
843
857
|
/*
|
|
@@ -845,43 +859,43 @@ export const stylisticPlugin = [
|
|
|
845
859
|
*
|
|
846
860
|
* https://eslint.style/rules/default/template-tag-spacing
|
|
847
861
|
*/
|
|
848
|
-
"@stylistic/template-tag-spacing": "
|
|
862
|
+
"@stylistic/template-tag-spacing": "warn",
|
|
849
863
|
/*
|
|
850
864
|
* Require consistent spacing around type annotations
|
|
851
865
|
*
|
|
852
866
|
* https://eslint.style/rules/default/type-annotation-spacing
|
|
853
867
|
*/
|
|
854
|
-
"@stylistic/type-annotation-spacing": "
|
|
868
|
+
"@stylistic/type-annotation-spacing": "warn",
|
|
855
869
|
/*
|
|
856
870
|
* Enforces consistent spacing inside TypeScript type generics.
|
|
857
871
|
*
|
|
858
872
|
* https://eslint.style/rules/default/type-generic-spacing
|
|
859
873
|
*/
|
|
860
|
-
"@stylistic/type-generic-spacing": "
|
|
874
|
+
"@stylistic/type-generic-spacing": "warn",
|
|
861
875
|
/*
|
|
862
876
|
* Expect space before the type declaration in the named tuple.
|
|
863
877
|
*
|
|
864
878
|
* https://eslint.style/rules/default/type-named-tuple-spacing
|
|
865
879
|
*/
|
|
866
|
-
"@stylistic/type-named-tuple-spacing": "
|
|
880
|
+
"@stylistic/type-named-tuple-spacing": "warn",
|
|
867
881
|
/*
|
|
868
882
|
* Require parentheses around immediate function invocations
|
|
869
883
|
*
|
|
870
884
|
* https://eslint.style/rules/default/wrap-iife
|
|
871
885
|
*/
|
|
872
|
-
"@stylistic/wrap-iife": "
|
|
886
|
+
"@stylistic/wrap-iife": "warn",
|
|
873
887
|
/*
|
|
874
888
|
* Require parenthesis around regex literals
|
|
875
889
|
*
|
|
876
890
|
* https://eslint.style/rules/default/wrap-regex
|
|
877
891
|
*/
|
|
878
|
-
"@stylistic/wrap-regex": "
|
|
892
|
+
"@stylistic/wrap-regex": "warn",
|
|
879
893
|
/*
|
|
880
894
|
* Require or disallow spacing around the * in yield* Expressions
|
|
881
895
|
*
|
|
882
896
|
* https://eslint.style/rules/default/yield-star-spacing
|
|
883
897
|
*/
|
|
884
|
-
"@stylistic/yield-star-spacing": "
|
|
898
|
+
"@stylistic/yield-star-spacing": "warn",
|
|
885
899
|
},
|
|
886
900
|
},
|
|
887
901
|
];
|