linted 19.4.3-rc.8 → 19.4.3-rc.9

Sign up to get free protection for your applications and to get access to all the features.
Files changed (62) hide show
  1. package/.github/workflows/RELEASE.yml +36 -36
  2. package/.github/workflows/rc.yml +36 -36
  3. package/.markdownlint.jsonc +122 -122
  4. package/LICENSE +21 -21
  5. package/README.md +387 -387
  6. package/SECURITY.md +9 -9
  7. package/dist/imports/index.d.ts.map +1 -1
  8. package/dist/imports/plugins.d.ts.map +1 -1
  9. package/eslint.config.js +3 -3
  10. package/package.json +144 -144
  11. package/src/_strings/id.ts +8 -8
  12. package/src/_strings/index.ts +6 -6
  13. package/src/_strings/level.spec.ts +31 -31
  14. package/src/_strings/level.ts +4 -4
  15. package/src/_strings/state.ts +28 -28
  16. package/src/files/html.ts +1 -1
  17. package/src/files/index.ts +19 -19
  18. package/src/files/js.ts +4 -4
  19. package/src/files/json.ts +1 -1
  20. package/src/files/jsonc.ts +4 -4
  21. package/src/files/mocha.ts +4 -4
  22. package/src/files/mochaJs.ts +4 -4
  23. package/src/files/svelte.ts +1 -1
  24. package/src/files/ts.ts +1 -1
  25. package/src/files/yml.ts +1 -1
  26. package/src/imports/index.ts +7 -7
  27. package/src/imports/parsers.ts +13 -13
  28. package/src/imports/plugins.ts +17 -17
  29. package/src/index.spec.ts +11 -11
  30. package/src/index.ts +22 -22
  31. package/src/rules/html/enable.ts +120 -120
  32. package/src/rules/html/index.ts +3 -3
  33. package/src/rules/index.ts +19 -19
  34. package/src/rules/js/enable.ts +524 -524
  35. package/src/rules/js/index.ts +4 -4
  36. package/src/rules/js/stylistic.ts +611 -611
  37. package/src/rules/json/enable.ts +33 -33
  38. package/src/rules/json/enable_x.ts +95 -95
  39. package/src/rules/json/index.ts +4 -4
  40. package/src/rules/jsonc/index.ts +4 -4
  41. package/src/rules/jsonc/override.ts +16 -16
  42. package/src/rules/mocha/base.ts +7 -7
  43. package/src/rules/mocha/disable.ts +8 -8
  44. package/src/rules/mocha/enable.ts +53 -53
  45. package/src/rules/mocha/index.ts +7 -7
  46. package/src/rules/mochaJs/index.ts +7 -7
  47. package/src/rules/svelte/disable.ts +9 -9
  48. package/src/rules/svelte/disable_js.ts +11 -11
  49. package/src/rules/svelte/disable_ts.ts +9 -9
  50. package/src/rules/svelte/enable.ts +230 -230
  51. package/src/rules/svelte/enable_x.ts +20 -20
  52. package/src/rules/svelte/index.ts +15 -15
  53. package/src/rules/ts/disable.ts +22 -22
  54. package/src/rules/ts/disable_x.ts +32 -32
  55. package/src/rules/ts/enable.ts +550 -550
  56. package/src/rules/ts/enable_x.ts +115 -115
  57. package/src/rules/ts/index.ts +13 -13
  58. package/src/rules/yml/enable.ts +64 -64
  59. package/src/rules/yml/enable_x.ts +68 -68
  60. package/src/rules/yml/index.ts +4 -4
  61. package/tsconfig.json +163 -163
  62. package/typings/mocha.d.ts +3 -3
@@ -1,611 +1,611 @@
1
- import { stylistic, level, state } from "../../_strings";
2
-
3
- const
4
- { ERROR, OFF } = level,
5
- {
6
- Never,
7
- Always,
8
- AlwaysMultiline,
9
- Consistent,
10
- AsNeeded,
11
- Strict,
12
- All,
13
- Star,
14
- Last,
15
- Before,
16
- After,
17
- Below,
18
- Beside,
19
- Inside,
20
- Double,
21
- } = state;
22
-
23
- export default [
24
- stylistic,
25
- {
26
- // https://eslint.style/rules
27
- "@stylistic/array-bracket-newline": [
28
- ERROR,
29
- {
30
- multiline: true,
31
- minItems: null,
32
- },
33
- ],
34
- "@stylistic/array-bracket-spacing": [
35
- ERROR,
36
- Never,
37
- {
38
- singleValue: false,
39
- objectsInArrays: false,
40
- arraysInArrays: false,
41
- },
42
- ],
43
- "@stylistic/array-element-newline": [
44
- ERROR,
45
- {
46
- ArrayExpression: {
47
- consistent: true,
48
- multiline: true,
49
- minItems: 4,
50
- },
51
- ArrayPattern: {
52
- consistent: true,
53
- multiline: true,
54
- minItems: 4,
55
- },
56
- },
57
- ],
58
- "@stylistic/arrow-parens": [
59
- ERROR,
60
- AsNeeded,
61
- {
62
- requireForBlockBody: false,
63
- },
64
- ],
65
- "@stylistic/arrow-spacing": [
66
- ERROR,
67
- {
68
- before: true,
69
- after: true,
70
- },
71
- ],
72
- "@stylistic/block-spacing": [ERROR, Always],
73
- "@stylistic/brace-style": [
74
- ERROR,
75
- "stroustrup",
76
- {
77
- allowSingleLine: true,
78
- },
79
- ],
80
- "@stylistic/comma-dangle": [ERROR, AlwaysMultiline],
81
- "@stylistic/comma-spacing": [
82
- ERROR,
83
- {
84
- before: false,
85
- after: true,
86
- },
87
- ],
88
- "@stylistic/comma-style": [
89
- ERROR,
90
- Last,
91
- {
92
- exceptions: {
93
- ArrayExpression: false,
94
- ArrayPattern: false,
95
- ArrowFunctionExpression: false,
96
- CallExpression: false,
97
- FunctionDeclaration: false,
98
- FunctionExpression: false,
99
- ImportDeclaration: false,
100
- ObjectExpression: false,
101
- ObjectPattern: false,
102
- VariableDeclaration: false,
103
- NewExpression: false,
104
- },
105
- },
106
- ],
107
- "@stylistic/computed-property-spacing": [
108
- ERROR,
109
- Never,
110
- {
111
- enforceForClassMembers: true,
112
- },
113
- ],
114
- "@stylistic/dot-location": [ERROR, "property"],
115
- "@stylistic/eol-last": [ERROR, Always],
116
- "@stylistic/function-call-argument-newline": [ERROR, Consistent],
117
- "@stylistic/function-call-spacing": [ERROR, Never],
118
-
119
- "@stylistic/function-paren-newline": [ERROR, "multiline-arguments"] /* BUG: https://github.com/eslint-stylistic/eslint-stylistic/issues/290 */,
120
- "@stylistic/generator-star-spacing": [
121
- ERROR,
122
- {
123
- before: true,
124
- after: false,
125
- },
126
- ],
127
- "@stylistic/implicit-arrow-linebreak": [ERROR, Beside],
128
- "@stylistic/indent": [
129
- ERROR,
130
- 2,
131
- {
132
- ignoredNodes: [],
133
- SwitchCase: 1,
134
- VariableDeclarator: { "var": 0, let: 0, "const": 0 },
135
- outerIIFEBody: 0,
136
- MemberExpression: 1,
137
- FunctionDeclaration: { parameters: 1, body: 1 },
138
- FunctionExpression: { parameters: 1, body: 1 },
139
- StaticBlock: { body: 1 },
140
- CallExpression: { arguments: 1 },
141
- ArrayExpression: 1,
142
- ObjectExpression: 1,
143
- ImportDeclaration: 1,
144
- flatTernaryExpressions: false,
145
- offsetTernaryExpressions: true,
146
- ignoreComments: false,
147
- },
148
- ],
149
- "@stylistic/indent-binary-ops": [ERROR, 2],
150
- "@stylistic/key-spacing": [
151
- ERROR,
152
- {
153
- beforeColon: false,
154
- afterColon: true,
155
- mode: Strict,
156
- },
157
- ],
158
- "@stylistic/keyword-spacing": [
159
- ERROR,
160
- {
161
- before: true,
162
- after: true,
163
- overrides: {},
164
- },
165
- ],
166
- "@stylistic/line-comment-position": OFF,
167
- "@stylistic/lines-around-comment": [
168
- ERROR,
169
- {
170
- beforeBlockComment: false,
171
- afterBlockComment: false,
172
- beforeLineComment: true,
173
- afterLineComment: false,
174
- allowBlockStart: true,
175
- allowBlockEnd: true,
176
- allowObjectStart: true,
177
- allowObjectEnd: true,
178
- allowArrayStart: true,
179
- allowArrayEnd: true,
180
- allowClassStart: true,
181
- allowClassEnd: true,
182
- applyDefaultIgnorePatterns: true,
183
- afterHashbangComment: false,
184
-
185
- // TS-only
186
- allowEnumEnd: true,
187
- allowEnumStart: true,
188
- allowInterfaceEnd: true,
189
- allowInterfaceStart: true,
190
- allowModuleEnd: true,
191
- allowModuleStart: true,
192
- allowTypeEnd: true,
193
- allowTypeStart: true,
194
- },
195
- ],
196
- "@stylistic/lines-between-class-members": [
197
- ERROR,
198
- {
199
- enforce: [
200
- { prev: "field", next: "field", blankLine: Never },
201
- { prev: "field", next: "method", blankLine: Always },
202
- { prev: "method", next: Star, blankLine: Always },
203
- ],
204
- },
205
- {
206
- exceptAfterSingleLine: false,
207
- exceptAfterOverload: true /* TS-only */,
208
- },
209
- ],
210
- "@stylistic/max-len": [
211
- ERROR,
212
- {
213
- code: 150,
214
- tabWidth: 2,
215
- ignoreComments: true,
216
- ignoreTrailingComments: true,
217
- ignoreUrls: true,
218
- ignoreStrings: true,
219
- ignoreTemplateLiterals: true,
220
- ignoreRegExpLiterals: true,
221
- },
222
- ],
223
- "@stylistic/max-statements-per-line": [
224
- ERROR,
225
- {
226
- max: 1,
227
- },
228
- ],
229
- "@stylistic/member-delimiter-style": [
230
- ERROR,
231
- {
232
- multiline: {
233
- delimiter: "semi",
234
- requireLast: true,
235
- },
236
- singleline: {
237
- delimiter: "semi",
238
- requireLast: false,
239
- },
240
- multilineDetection: "brackets",
241
- },
242
- ],
243
- "@stylistic/multiline-comment-style": OFF,
244
- "@stylistic/multiline-ternary": [ERROR, AlwaysMultiline],
245
- "@stylistic/new-parens": [OFF, Never],
246
- "@stylistic/newline-per-chained-call": [
247
- ERROR,
248
- {
249
- ignoreChainWithDepth: 2,
250
- },
251
- ],
252
- "@stylistic/no-confusing-arrow": OFF,
253
- "@stylistic/no-extra-parens": [
254
- ERROR,
255
- All,
256
- {
257
- conditionalAssign: true,
258
- returnAssign: true,
259
- nestedBinaryExpressions: true,
260
- ternaryOperandBinaryExpressions: true,
261
- enforceForArrowConditionals: true,
262
- enforceForSequenceExpressions: true,
263
- enforceForNewInMemberExpressions: true,
264
- enforceForFunctionPrototypeMethods: true,
265
- },
266
- ],
267
- "@stylistic/no-extra-semi": ERROR,
268
- "@stylistic/no-floating-decimal": ERROR,
269
- "@stylistic/no-mixed-operators": OFF,
270
- "@stylistic/no-mixed-spaces-and-tabs": ERROR,
271
- "@stylistic/no-multi-spaces": [
272
- ERROR,
273
- {
274
- ignoreEOLComments: false,
275
- exceptions: {
276
- Property: false,
277
- ImportAttributes: false,
278
- },
279
- includeTabs: true,
280
- },
281
- ],
282
- "@stylistic/no-multiple-empty-lines": [
283
- ERROR,
284
- {
285
- max: 1,
286
- maxEOF: 1,
287
- maxBOF: 0,
288
- },
289
- ],
290
- "@stylistic/no-tabs": [
291
- ERROR,
292
- {
293
- allowIndentationTabs: false,
294
- },
295
- ],
296
- "@stylistic/no-trailing-spaces": [
297
- ERROR,
298
- {
299
- skipBlankLines: false,
300
- ignoreComments: false,
301
- },
302
- ],
303
- "@stylistic/no-whitespace-before-property": ERROR,
304
- "@stylistic/nonblock-statement-body-position": [
305
- ERROR,
306
- Below,
307
- {
308
- overrides: {
309
- "if": Below,
310
- "else": Below,
311
- "while": Below,
312
- "do": Below,
313
- "for": Below,
314
- },
315
- },
316
- ],
317
- "@stylistic/object-curly-newline": [
318
- ERROR,
319
- {
320
- ObjectExpression: {
321
- consistent: true,
322
- multiline: true,
323
- minProperties: 4,
324
- },
325
- ObjectPattern: {
326
- consistent: true,
327
- multiline: true,
328
- minProperties: 4,
329
- },
330
- ImportDeclaration: {
331
- consistent: true,
332
- multiline: true,
333
- minProperties: 4,
334
- },
335
- ExportDeclaration: {
336
- consistent: true,
337
- multiline: true,
338
- minProperties: 4,
339
- },
340
- },
341
- ],
342
- "@stylistic/object-curly-spacing": [
343
- ERROR,
344
- Always,
345
- {
346
- arraysInObjects: true,
347
- objectsInObjects: true,
348
- },
349
- ],
350
- "@stylistic/object-property-newline": [
351
- ERROR,
352
- {
353
- allowAllPropertiesOnSameLine: true,
354
- },
355
- ],
356
- "@stylistic/one-var-declaration-per-line": [ERROR, Always],
357
- "@stylistic/operator-linebreak": [
358
- ERROR,
359
- Before,
360
- {
361
- overrides: {
362
- "=": After,
363
- },
364
- },
365
- ],
366
- "@stylistic/padded-blocks": [
367
- ERROR,
368
- {
369
- blocks: Never,
370
- classes: Never,
371
- switches: Never,
372
- },
373
- {
374
- allowSingleLineBlocks: true,
375
- },
376
- ],
377
- "@stylistic/padding-line-between-statements": [
378
- ERROR,
379
- {
380
- prev: "directive",
381
- next: Star,
382
- blankLine: Always,
383
- },
384
- {
385
- prev: "directive",
386
- next: "directive",
387
- blankLine: Never,
388
- },
389
- {
390
- prev: ["import", "cjs-import"],
391
- next: Star,
392
- blankLine: Always,
393
- },
394
- {
395
- prev: ["import", "cjs-import"],
396
- next: ["import", "cjs-import"],
397
- blankLine: Never,
398
- },
399
- {
400
- prev: [
401
- "class",
402
- "interface",
403
- "try",
404
- "for",
405
- "if",
406
- "do",
407
- "while",
408
- "switch",
409
- "block",
410
- "block-like",
411
- "iife",
412
- "empty",
413
- "debugger",
414
- "with",
415
- ],
416
- next: Star,
417
- blankLine: Always,
418
- },
419
- {
420
- prev: "case",
421
- next: Star,
422
- blankLine: Always,
423
- },
424
- {
425
- prev: "case",
426
- next: ["case", "default"],
427
- blankLine: Always,
428
- },
429
- {
430
- prev: "default",
431
- next: Star,
432
- blankLine: Always,
433
- },
434
- {
435
- prev: "type",
436
- next: Star,
437
- blankLine: Always,
438
- },
439
- {
440
- prev: "type",
441
- next: "type",
442
- blankLine: Never,
443
- },
444
- {
445
- prev: "function",
446
- next: Star,
447
- blankLine: Always,
448
- },
449
- {
450
- prev: "function-overload",
451
- next: Star,
452
- blankLine: Always,
453
- },
454
- {
455
- prev: "function-overload",
456
- next: "function-overload",
457
- blankLine: Never,
458
- },
459
- {
460
- prev: "function-overload",
461
- next: "function",
462
- blankLine: Never,
463
- },
464
- {
465
- prev: ["const", "let", "var"],
466
- next: Star,
467
- blankLine: Always,
468
- },
469
- {
470
- prev: ["const", "let", "var"],
471
- next: ["const", "let", "var"],
472
- blankLine: Never,
473
- },
474
- {
475
- prev: "expression",
476
- next: Star,
477
- blankLine: Always,
478
- },
479
- {
480
- prev: "expression",
481
- next: "expression",
482
- blankLine: Never,
483
- },
484
- {
485
- prev: Star,
486
- next: [
487
- "throw",
488
- "return",
489
- "break",
490
- "continue",
491
- ],
492
- blankLine: Always,
493
- },
494
- {
495
- prev: Star,
496
- next: ["export", "cjs-export"],
497
- blankLine: Always,
498
- },
499
- {
500
- prev: ["export", "cjs-export"],
501
- next: ["export", "cjs-export"],
502
- blankLine: Never,
503
- },
504
- ],
505
- "@stylistic/quote-props": [
506
- ERROR,
507
- AsNeeded,
508
- {
509
- keywords: true,
510
- unnecessary: true,
511
- numbers: false,
512
- },
513
- ],
514
- "@stylistic/quotes": [
515
- ERROR,
516
- Double,
517
- {
518
- avoidEscape: true,
519
- allowTemplateLiterals: true,
520
- },
521
- ],
522
- "@stylistic/rest-spread-spacing": [ERROR, Never],
523
- "@stylistic/semi": [
524
- ERROR,
525
- Always,
526
- {
527
- omitLastInOneLineBlock: false,
528
- omitLastInOneLineClassBody: false,
529
- },
530
- ],
531
- "@stylistic/semi-spacing": [
532
- ERROR,
533
- {
534
- before: false,
535
- after: true,
536
- },
537
- ],
538
- "@stylistic/semi-style": [ERROR, Last],
539
- "@stylistic/space-before-blocks": [
540
- ERROR,
541
- {
542
- functions: Always,
543
- keywords: Always,
544
- classes: Always,
545
- },
546
- ],
547
- "@stylistic/space-before-function-paren": [
548
- ERROR,
549
- {
550
- anonymous: Always,
551
- named: Never,
552
- asyncArrow: Always,
553
- },
554
- ],
555
- "@stylistic/space-in-parens": [ERROR, Never],
556
- "@stylistic/space-infix-ops": [
557
- ERROR,
558
- {
559
- int32Hint: true,
560
- },
561
- ],
562
- "@stylistic/space-unary-ops": [
563
- ERROR,
564
- {
565
- words: true,
566
- nonwords: false,
567
- overrides: {},
568
- },
569
- ],
570
- "@stylistic/spaced-comment": [ERROR, Always],
571
- "@stylistic/switch-colon-spacing": [
572
- ERROR,
573
- {
574
- after: true,
575
- before: false,
576
- },
577
- ],
578
- "@stylistic/template-curly-spacing": [ERROR, Never],
579
- "@stylistic/template-tag-spacing": [ERROR, Never],
580
- "@stylistic/type-annotation-spacing": [
581
- ERROR,
582
- {
583
- before: true,
584
- after: true,
585
- overrides: {
586
- colon: {
587
- before: false,
588
- after: true,
589
- },
590
- },
591
- } /* non-overriden rule affects all type annotations (arrows, "as" keyword, "satisfies" keyword) except colons */,
592
- ],
593
- "@stylistic/type-generic-spacing": ERROR,
594
- "@stylistic/type-named-tuple-spacing": ERROR,
595
- "@stylistic/wrap-iife": [
596
- ERROR,
597
- Inside,
598
- {
599
- functionPrototypeMethods: true,
600
- },
601
- ],
602
- "@stylistic/wrap-regex": ERROR,
603
- "@stylistic/yield-star-spacing": [
604
- ERROR,
605
- {
606
- before: false,
607
- after: true,
608
- },
609
- ],
610
- },
611
- ] as const;
1
+ import { stylistic, level, state } from "../../_strings";
2
+
3
+ const
4
+ { ERROR, OFF } = level,
5
+ {
6
+ Never,
7
+ Always,
8
+ AlwaysMultiline,
9
+ Consistent,
10
+ AsNeeded,
11
+ Strict,
12
+ All,
13
+ Star,
14
+ Last,
15
+ Before,
16
+ After,
17
+ Below,
18
+ Beside,
19
+ Inside,
20
+ Double,
21
+ } = state;
22
+
23
+ export default [
24
+ stylistic,
25
+ {
26
+ // https://eslint.style/rules
27
+ "@stylistic/array-bracket-newline": [
28
+ ERROR,
29
+ {
30
+ multiline: true,
31
+ minItems: null,
32
+ },
33
+ ],
34
+ "@stylistic/array-bracket-spacing": [
35
+ ERROR,
36
+ Never,
37
+ {
38
+ singleValue: false,
39
+ objectsInArrays: false,
40
+ arraysInArrays: false,
41
+ },
42
+ ],
43
+ "@stylistic/array-element-newline": [
44
+ ERROR,
45
+ {
46
+ ArrayExpression: {
47
+ consistent: true,
48
+ multiline: true,
49
+ minItems: 4,
50
+ },
51
+ ArrayPattern: {
52
+ consistent: true,
53
+ multiline: true,
54
+ minItems: 4,
55
+ },
56
+ },
57
+ ],
58
+ "@stylistic/arrow-parens": [
59
+ ERROR,
60
+ AsNeeded,
61
+ {
62
+ requireForBlockBody: false,
63
+ },
64
+ ],
65
+ "@stylistic/arrow-spacing": [
66
+ ERROR,
67
+ {
68
+ before: true,
69
+ after: true,
70
+ },
71
+ ],
72
+ "@stylistic/block-spacing": [ERROR, Always],
73
+ "@stylistic/brace-style": [
74
+ ERROR,
75
+ "stroustrup",
76
+ {
77
+ allowSingleLine: true,
78
+ },
79
+ ],
80
+ "@stylistic/comma-dangle": [ERROR, AlwaysMultiline],
81
+ "@stylistic/comma-spacing": [
82
+ ERROR,
83
+ {
84
+ before: false,
85
+ after: true,
86
+ },
87
+ ],
88
+ "@stylistic/comma-style": [
89
+ ERROR,
90
+ Last,
91
+ {
92
+ exceptions: {
93
+ ArrayExpression: false,
94
+ ArrayPattern: false,
95
+ ArrowFunctionExpression: false,
96
+ CallExpression: false,
97
+ FunctionDeclaration: false,
98
+ FunctionExpression: false,
99
+ ImportDeclaration: false,
100
+ ObjectExpression: false,
101
+ ObjectPattern: false,
102
+ VariableDeclaration: false,
103
+ NewExpression: false,
104
+ },
105
+ },
106
+ ],
107
+ "@stylistic/computed-property-spacing": [
108
+ ERROR,
109
+ Never,
110
+ {
111
+ enforceForClassMembers: true,
112
+ },
113
+ ],
114
+ "@stylistic/dot-location": [ERROR, "property"],
115
+ "@stylistic/eol-last": [ERROR, Always],
116
+ "@stylistic/function-call-argument-newline": [ERROR, Consistent],
117
+ "@stylistic/function-call-spacing": [ERROR, Never],
118
+
119
+ "@stylistic/function-paren-newline": [ERROR, "multiline-arguments"] /* BUG: https://github.com/eslint-stylistic/eslint-stylistic/issues/290 */,
120
+ "@stylistic/generator-star-spacing": [
121
+ ERROR,
122
+ {
123
+ before: true,
124
+ after: false,
125
+ },
126
+ ],
127
+ "@stylistic/implicit-arrow-linebreak": [ERROR, Beside],
128
+ "@stylistic/indent": [
129
+ ERROR,
130
+ 2,
131
+ {
132
+ ignoredNodes: [],
133
+ SwitchCase: 1,
134
+ VariableDeclarator: { "var": 0, let: 0, "const": 0 },
135
+ outerIIFEBody: 0,
136
+ MemberExpression: 1,
137
+ FunctionDeclaration: { parameters: 1, body: 1 },
138
+ FunctionExpression: { parameters: 1, body: 1 },
139
+ StaticBlock: { body: 1 },
140
+ CallExpression: { arguments: 1 },
141
+ ArrayExpression: 1,
142
+ ObjectExpression: 1,
143
+ ImportDeclaration: 1,
144
+ flatTernaryExpressions: false,
145
+ offsetTernaryExpressions: true,
146
+ ignoreComments: false,
147
+ },
148
+ ],
149
+ "@stylistic/indent-binary-ops": [ERROR, 2],
150
+ "@stylistic/key-spacing": [
151
+ ERROR,
152
+ {
153
+ beforeColon: false,
154
+ afterColon: true,
155
+ mode: Strict,
156
+ },
157
+ ],
158
+ "@stylistic/keyword-spacing": [
159
+ ERROR,
160
+ {
161
+ before: true,
162
+ after: true,
163
+ overrides: {},
164
+ },
165
+ ],
166
+ "@stylistic/line-comment-position": OFF,
167
+ "@stylistic/lines-around-comment": [
168
+ ERROR,
169
+ {
170
+ beforeBlockComment: false,
171
+ afterBlockComment: false,
172
+ beforeLineComment: true,
173
+ afterLineComment: false,
174
+ allowBlockStart: true,
175
+ allowBlockEnd: true,
176
+ allowObjectStart: true,
177
+ allowObjectEnd: true,
178
+ allowArrayStart: true,
179
+ allowArrayEnd: true,
180
+ allowClassStart: true,
181
+ allowClassEnd: true,
182
+ applyDefaultIgnorePatterns: true,
183
+ afterHashbangComment: false,
184
+
185
+ // TS-only
186
+ allowEnumEnd: true,
187
+ allowEnumStart: true,
188
+ allowInterfaceEnd: true,
189
+ allowInterfaceStart: true,
190
+ allowModuleEnd: true,
191
+ allowModuleStart: true,
192
+ allowTypeEnd: true,
193
+ allowTypeStart: true,
194
+ },
195
+ ],
196
+ "@stylistic/lines-between-class-members": [
197
+ ERROR,
198
+ {
199
+ enforce: [
200
+ { prev: "field", next: "field", blankLine: Never },
201
+ { prev: "field", next: "method", blankLine: Always },
202
+ { prev: "method", next: Star, blankLine: Always },
203
+ ],
204
+ },
205
+ {
206
+ exceptAfterSingleLine: false,
207
+ exceptAfterOverload: true /* TS-only */,
208
+ },
209
+ ],
210
+ "@stylistic/max-len": [
211
+ ERROR,
212
+ {
213
+ code: 150,
214
+ tabWidth: 2,
215
+ ignoreComments: true,
216
+ ignoreTrailingComments: true,
217
+ ignoreUrls: true,
218
+ ignoreStrings: true,
219
+ ignoreTemplateLiterals: true,
220
+ ignoreRegExpLiterals: true,
221
+ },
222
+ ],
223
+ "@stylistic/max-statements-per-line": [
224
+ ERROR,
225
+ {
226
+ max: 1,
227
+ },
228
+ ],
229
+ "@stylistic/member-delimiter-style": [
230
+ ERROR,
231
+ {
232
+ multiline: {
233
+ delimiter: "semi",
234
+ requireLast: true,
235
+ },
236
+ singleline: {
237
+ delimiter: "semi",
238
+ requireLast: false,
239
+ },
240
+ multilineDetection: "brackets",
241
+ },
242
+ ],
243
+ "@stylistic/multiline-comment-style": OFF,
244
+ "@stylistic/multiline-ternary": [ERROR, AlwaysMultiline],
245
+ "@stylistic/new-parens": [OFF, Never],
246
+ "@stylistic/newline-per-chained-call": [
247
+ ERROR,
248
+ {
249
+ ignoreChainWithDepth: 2,
250
+ },
251
+ ],
252
+ "@stylistic/no-confusing-arrow": OFF,
253
+ "@stylistic/no-extra-parens": [
254
+ ERROR,
255
+ All,
256
+ {
257
+ conditionalAssign: true,
258
+ returnAssign: true,
259
+ nestedBinaryExpressions: true,
260
+ ternaryOperandBinaryExpressions: true,
261
+ enforceForArrowConditionals: true,
262
+ enforceForSequenceExpressions: true,
263
+ enforceForNewInMemberExpressions: true,
264
+ enforceForFunctionPrototypeMethods: true,
265
+ },
266
+ ],
267
+ "@stylistic/no-extra-semi": ERROR,
268
+ "@stylistic/no-floating-decimal": ERROR,
269
+ "@stylistic/no-mixed-operators": OFF,
270
+ "@stylistic/no-mixed-spaces-and-tabs": ERROR,
271
+ "@stylistic/no-multi-spaces": [
272
+ ERROR,
273
+ {
274
+ ignoreEOLComments: false,
275
+ exceptions: {
276
+ Property: false,
277
+ ImportAttributes: false,
278
+ },
279
+ includeTabs: true,
280
+ },
281
+ ],
282
+ "@stylistic/no-multiple-empty-lines": [
283
+ ERROR,
284
+ {
285
+ max: 1,
286
+ maxEOF: 1,
287
+ maxBOF: 0,
288
+ },
289
+ ],
290
+ "@stylistic/no-tabs": [
291
+ ERROR,
292
+ {
293
+ allowIndentationTabs: false,
294
+ },
295
+ ],
296
+ "@stylistic/no-trailing-spaces": [
297
+ ERROR,
298
+ {
299
+ skipBlankLines: false,
300
+ ignoreComments: false,
301
+ },
302
+ ],
303
+ "@stylistic/no-whitespace-before-property": ERROR,
304
+ "@stylistic/nonblock-statement-body-position": [
305
+ ERROR,
306
+ Below,
307
+ {
308
+ overrides: {
309
+ "if": Below,
310
+ "else": Below,
311
+ "while": Below,
312
+ "do": Below,
313
+ "for": Below,
314
+ },
315
+ },
316
+ ],
317
+ "@stylistic/object-curly-newline": [
318
+ ERROR,
319
+ {
320
+ ObjectExpression: {
321
+ consistent: true,
322
+ multiline: true,
323
+ minProperties: 4,
324
+ },
325
+ ObjectPattern: {
326
+ consistent: true,
327
+ multiline: true,
328
+ minProperties: 4,
329
+ },
330
+ ImportDeclaration: {
331
+ consistent: true,
332
+ multiline: true,
333
+ minProperties: 4,
334
+ },
335
+ ExportDeclaration: {
336
+ consistent: true,
337
+ multiline: true,
338
+ minProperties: 4,
339
+ },
340
+ },
341
+ ],
342
+ "@stylistic/object-curly-spacing": [
343
+ ERROR,
344
+ Always,
345
+ {
346
+ arraysInObjects: true,
347
+ objectsInObjects: true,
348
+ },
349
+ ],
350
+ "@stylistic/object-property-newline": [
351
+ ERROR,
352
+ {
353
+ allowAllPropertiesOnSameLine: true,
354
+ },
355
+ ],
356
+ "@stylistic/one-var-declaration-per-line": [ERROR, Always],
357
+ "@stylistic/operator-linebreak": [
358
+ ERROR,
359
+ Before,
360
+ {
361
+ overrides: {
362
+ "=": After,
363
+ },
364
+ },
365
+ ],
366
+ "@stylistic/padded-blocks": [
367
+ ERROR,
368
+ {
369
+ blocks: Never,
370
+ classes: Never,
371
+ switches: Never,
372
+ },
373
+ {
374
+ allowSingleLineBlocks: true,
375
+ },
376
+ ],
377
+ "@stylistic/padding-line-between-statements": [
378
+ ERROR,
379
+ {
380
+ prev: "directive",
381
+ next: Star,
382
+ blankLine: Always,
383
+ },
384
+ {
385
+ prev: "directive",
386
+ next: "directive",
387
+ blankLine: Never,
388
+ },
389
+ {
390
+ prev: ["import", "cjs-import"],
391
+ next: Star,
392
+ blankLine: Always,
393
+ },
394
+ {
395
+ prev: ["import", "cjs-import"],
396
+ next: ["import", "cjs-import"],
397
+ blankLine: Never,
398
+ },
399
+ {
400
+ prev: [
401
+ "class",
402
+ "interface",
403
+ "try",
404
+ "for",
405
+ "if",
406
+ "do",
407
+ "while",
408
+ "switch",
409
+ "block",
410
+ "block-like",
411
+ "iife",
412
+ "empty",
413
+ "debugger",
414
+ "with",
415
+ ],
416
+ next: Star,
417
+ blankLine: Always,
418
+ },
419
+ {
420
+ prev: "case",
421
+ next: Star,
422
+ blankLine: Always,
423
+ },
424
+ {
425
+ prev: "case",
426
+ next: ["case", "default"],
427
+ blankLine: Always,
428
+ },
429
+ {
430
+ prev: "default",
431
+ next: Star,
432
+ blankLine: Always,
433
+ },
434
+ {
435
+ prev: "type",
436
+ next: Star,
437
+ blankLine: Always,
438
+ },
439
+ {
440
+ prev: "type",
441
+ next: "type",
442
+ blankLine: Never,
443
+ },
444
+ {
445
+ prev: "function",
446
+ next: Star,
447
+ blankLine: Always,
448
+ },
449
+ {
450
+ prev: "function-overload",
451
+ next: Star,
452
+ blankLine: Always,
453
+ },
454
+ {
455
+ prev: "function-overload",
456
+ next: "function-overload",
457
+ blankLine: Never,
458
+ },
459
+ {
460
+ prev: "function-overload",
461
+ next: "function",
462
+ blankLine: Never,
463
+ },
464
+ {
465
+ prev: ["const", "let", "var"],
466
+ next: Star,
467
+ blankLine: Always,
468
+ },
469
+ {
470
+ prev: ["const", "let", "var"],
471
+ next: ["const", "let", "var"],
472
+ blankLine: Never,
473
+ },
474
+ {
475
+ prev: "expression",
476
+ next: Star,
477
+ blankLine: Always,
478
+ },
479
+ {
480
+ prev: "expression",
481
+ next: "expression",
482
+ blankLine: Never,
483
+ },
484
+ {
485
+ prev: Star,
486
+ next: [
487
+ "throw",
488
+ "return",
489
+ "break",
490
+ "continue",
491
+ ],
492
+ blankLine: Always,
493
+ },
494
+ {
495
+ prev: Star,
496
+ next: ["export", "cjs-export"],
497
+ blankLine: Always,
498
+ },
499
+ {
500
+ prev: ["export", "cjs-export"],
501
+ next: ["export", "cjs-export"],
502
+ blankLine: Never,
503
+ },
504
+ ],
505
+ "@stylistic/quote-props": [
506
+ ERROR,
507
+ AsNeeded,
508
+ {
509
+ keywords: true,
510
+ unnecessary: true,
511
+ numbers: false,
512
+ },
513
+ ],
514
+ "@stylistic/quotes": [
515
+ ERROR,
516
+ Double,
517
+ {
518
+ avoidEscape: true,
519
+ allowTemplateLiterals: true,
520
+ },
521
+ ],
522
+ "@stylistic/rest-spread-spacing": [ERROR, Never],
523
+ "@stylistic/semi": [
524
+ ERROR,
525
+ Always,
526
+ {
527
+ omitLastInOneLineBlock: false,
528
+ omitLastInOneLineClassBody: false,
529
+ },
530
+ ],
531
+ "@stylistic/semi-spacing": [
532
+ ERROR,
533
+ {
534
+ before: false,
535
+ after: true,
536
+ },
537
+ ],
538
+ "@stylistic/semi-style": [ERROR, Last],
539
+ "@stylistic/space-before-blocks": [
540
+ ERROR,
541
+ {
542
+ functions: Always,
543
+ keywords: Always,
544
+ classes: Always,
545
+ },
546
+ ],
547
+ "@stylistic/space-before-function-paren": [
548
+ ERROR,
549
+ {
550
+ anonymous: Always,
551
+ named: Never,
552
+ asyncArrow: Always,
553
+ },
554
+ ],
555
+ "@stylistic/space-in-parens": [ERROR, Never],
556
+ "@stylistic/space-infix-ops": [
557
+ ERROR,
558
+ {
559
+ int32Hint: true,
560
+ },
561
+ ],
562
+ "@stylistic/space-unary-ops": [
563
+ ERROR,
564
+ {
565
+ words: true,
566
+ nonwords: false,
567
+ overrides: {},
568
+ },
569
+ ],
570
+ "@stylistic/spaced-comment": [ERROR, Always],
571
+ "@stylistic/switch-colon-spacing": [
572
+ ERROR,
573
+ {
574
+ after: true,
575
+ before: false,
576
+ },
577
+ ],
578
+ "@stylistic/template-curly-spacing": [ERROR, Never],
579
+ "@stylistic/template-tag-spacing": [ERROR, Never],
580
+ "@stylistic/type-annotation-spacing": [
581
+ ERROR,
582
+ {
583
+ before: true,
584
+ after: true,
585
+ overrides: {
586
+ colon: {
587
+ before: false,
588
+ after: true,
589
+ },
590
+ },
591
+ } /* non-overriden rule affects all type annotations (arrows, "as" keyword, "satisfies" keyword) except colons */,
592
+ ],
593
+ "@stylistic/type-generic-spacing": ERROR,
594
+ "@stylistic/type-named-tuple-spacing": ERROR,
595
+ "@stylistic/wrap-iife": [
596
+ ERROR,
597
+ Inside,
598
+ {
599
+ functionPrototypeMethods: true,
600
+ },
601
+ ],
602
+ "@stylistic/wrap-regex": ERROR,
603
+ "@stylistic/yield-star-spacing": [
604
+ ERROR,
605
+ {
606
+ before: false,
607
+ after: true,
608
+ },
609
+ ],
610
+ },
611
+ ] as const;