@eslinted/defaults 9.3.0 → 10.0.0-rc.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.
@@ -2,21 +2,20 @@ import {
2
2
  ID,
3
3
  ERROR,
4
4
  OFF,
5
- never,
6
- always,
5
+ all,
7
6
  always_multiline,
8
- consistent,
7
+ always,
9
8
  as_needed,
10
- strict,
11
- all,
12
- star,
13
- last,
14
9
  before,
15
- after,
16
10
  below,
17
11
  beside,
18
- inside,
12
+ consistent,
19
13
  double,
14
+ inside,
15
+ last,
16
+ never,
17
+ wildcard,
18
+ strict,
20
19
  } from "../../strings";
21
20
 
22
21
  export const EnableStylistic = {
@@ -45,12 +44,12 @@ export const EnableStylistic = {
45
44
  ArrayExpression: {
46
45
  consistent: true,
47
46
  multiline: true,
48
- minItems: 4,
47
+ minItems: 3,
49
48
  },
50
49
  ArrayPattern: {
51
50
  consistent: true,
52
51
  multiline: true,
53
- minItems: 4,
52
+ minItems: 3,
54
53
  },
55
54
  },
56
55
  ],
@@ -220,7 +219,7 @@ export const EnableStylistic = {
220
219
  enforce: [
221
220
  { prev: "field", next: "field", blankLine: never },
222
221
  { prev: "field", next: "method", blankLine: always },
223
- { prev: "method", next: star, blankLine: always },
222
+ { prev: "method", next: wildcard, blankLine: always },
224
223
  ],
225
224
  },
226
225
  {
@@ -231,7 +230,7 @@ export const EnableStylistic = {
231
230
  "@stylistic/max-len": [
232
231
  ERROR,
233
232
  {
234
- code: 150,
233
+ code: 300,
235
234
  tabWidth: 2,
236
235
  ignoreComments: true,
237
236
  ignoreTrailingComments: true,
@@ -299,12 +298,12 @@ export const EnableStylistic = {
299
298
  "@stylistic/no-multi-spaces": [
300
299
  ERROR,
301
300
  {
302
- ignoreEOLComments: false,
301
+ ignoreEOLComments: false /* @OVERRIDE */,
303
302
  exceptions: {
304
- Property: false,
305
- ImportAttributes: false,
303
+ Property: false /* @OVERRIDE */,
304
+ ImportAttributes: false /* @OVERRIDE */,
306
305
  },
307
- includeTabs: true,
306
+ includeTabs: true /* @OVERRIDE */,
308
307
  },
309
308
  ],
310
309
  "@stylistic/no-multiple-empty-lines": [
@@ -334,12 +333,7 @@ export const EnableStylistic = {
334
333
  below,
335
334
  {
336
335
  overrides: {
337
- "if": below,
338
- "else": below,
339
- "while": below,
340
- "do": below,
341
- "for": below,
342
- },
336
+ } /* if | else | while | do | for */,
343
337
  },
344
338
  ],
345
339
  "@stylistic/object-curly-newline": [
@@ -348,22 +342,22 @@ export const EnableStylistic = {
348
342
  ObjectExpression: {
349
343
  consistent: true,
350
344
  multiline: true,
351
- minProperties: 4,
345
+ minProperties: 3,
352
346
  },
353
347
  ObjectPattern: {
354
348
  consistent: true,
355
349
  multiline: true,
356
- minProperties: 4,
350
+ minProperties: 3,
357
351
  },
358
352
  ImportDeclaration: {
359
353
  consistent: true,
360
354
  multiline: true,
361
- minProperties: 4,
355
+ minProperties: 3,
362
356
  },
363
357
  ExportDeclaration: {
364
358
  consistent: true,
365
359
  multiline: true,
366
- minProperties: 4,
360
+ minProperties: 3,
367
361
  },
368
362
  },
369
363
  ],
@@ -390,148 +384,171 @@ export const EnableStylistic = {
390
384
  before,
391
385
  {
392
386
  overrides: {
393
- "=": after,
394
- },
387
+ } /* e.g., = | ? | : | @default: { "?": "before", ":": "before" } */,
395
388
  },
396
389
  ],
397
390
  "@stylistic/padded-blocks": [
398
391
  ERROR,
399
- {
400
- blocks: never,
401
- classes: never,
402
- switches: never,
403
- },
392
+ never /* @OVERRIDE || { blocks, classes, switches } */,
404
393
  {
405
394
  allowSingleLineBlocks: true,
406
395
  },
407
396
  ],
408
397
  "@stylistic/padding-line-between-statements": [
409
398
  ERROR,
399
+ // #region * No Line
410
400
  {
411
- prev: "directive",
412
- next: star,
413
- blankLine: always,
414
- },
415
- {
416
- prev: "directive",
417
- next: "directive",
418
- blankLine: never,
419
- },
420
- {
421
- prev: ["import", "cjs-import"],
422
- next: star,
423
- blankLine: always,
424
- },
425
- {
426
- prev: ["import", "cjs-import"],
427
- next: ["import", "cjs-import"],
428
401
  blankLine: never,
429
- },
430
- {
431
402
  prev: [
403
+ "block-like",
404
+ "block",
405
+ "break",
406
+ "case",
407
+ "cjs-export",
408
+ "cjs-import",
432
409
  "class",
433
- "interface",
434
- "try",
410
+ "const",
411
+ "continue",
412
+ "debugger",
413
+ "default",
414
+ "directive",
415
+ "do",
416
+ "empty",
417
+ "enum",
418
+ "export",
419
+ // "expression" /* aren't most of these expressions? */,
435
420
  "for",
421
+ "function-overload",
422
+ "function",
436
423
  "if",
437
- "do",
438
- "while",
439
- "switch",
440
- "block",
441
- "block-like",
442
424
  "iife",
443
- "empty",
444
- "debugger",
425
+ "import",
426
+ "interface",
427
+ "let",
428
+ "multiline-block-like",
429
+ "multiline-const",
430
+ "multiline-export",
431
+ // "multiline-expression" /* aren't most of these expressions? */,
432
+ "multiline-let",
433
+ "multiline-var",
434
+ "return",
435
+ "singleline-const",
436
+ "singleline-export",
437
+ "singleline-let",
438
+ "singleline-var",
439
+ "switch",
440
+ "throw",
441
+ "try",
442
+ "type",
443
+ "var",
444
+ "while",
445
445
  "with",
446
446
  ],
447
- next: star,
448
- blankLine: always,
449
- },
450
- {
451
- prev: "case",
452
- next: star,
453
- blankLine: always,
454
- },
455
- {
456
- prev: "case",
457
- next: ["case", "default"],
458
- blankLine: always,
447
+ next: wildcard,
459
448
  },
449
+ // #endregion
450
+ // #region Block >
460
451
  {
461
- prev: "default",
462
- next: star,
463
- blankLine: always,
464
- },
465
- {
466
- prev: "type",
467
- next: star,
468
452
  blankLine: always,
453
+ prev: [
454
+ "block-like",
455
+ "block",
456
+ "class",
457
+ "debugger",
458
+ "directive",
459
+ "do",
460
+ "empty",
461
+ "for",
462
+ "function-overload",
463
+ "function",
464
+ "if",
465
+ "interface",
466
+ "multiline-block-like",
467
+ "switch",
468
+ "try",
469
+ "while",
470
+ "with",
471
+ ],
472
+ next: wildcard,
469
473
  },
474
+ // #endregion
475
+ // #region >Function >
470
476
  {
471
- prev: "type",
472
- next: "type",
473
477
  blankLine: never,
478
+ prev: "interface",
479
+ next: [
480
+ "class",
481
+ "function-overload",
482
+ "function",
483
+ ],
474
484
  },
475
485
  {
476
- prev: "function",
477
- next: star,
478
- blankLine: always,
479
- },
480
- {
481
- prev: "function-overload",
482
- next: star,
483
- blankLine: always,
484
- },
485
- {
486
- prev: "function-overload",
487
- next: "function-overload",
488
486
  blankLine: never,
489
- },
490
- {
491
487
  prev: "function-overload",
492
- next: "function",
493
- blankLine: never,
488
+ next: [
489
+ "function-overload",
490
+ "function",
491
+ ],
494
492
  },
493
+ // #endregion
494
+ // #region >Module<
495
495
  {
496
- prev: ["const", "let", "var"],
497
- next: star,
498
496
  blankLine: always,
497
+ prev: [
498
+ "cjs-import",
499
+ "import",
500
+ ],
501
+ next: wildcard,
499
502
  },
500
503
  {
501
- prev: ["const", "let", "var"],
502
- next: ["const", "let", "var"],
503
504
  blankLine: never,
505
+ prev: [
506
+ "cjs-import",
507
+ "import",
508
+ ],
509
+ next: [
510
+ "cjs-import",
511
+ "import",
512
+ ],
504
513
  },
505
514
  {
506
- prev: "expression",
507
- next: star,
508
515
  blankLine: always,
516
+ prev: wildcard,
517
+ next: [
518
+ "cjs-export",
519
+ "export",
520
+ "multiline-export",
521
+ "singleline-export",
522
+ ],
509
523
  },
510
524
  {
511
- prev: "expression",
512
- next: "expression",
513
525
  blankLine: never,
526
+ prev: [
527
+ "cjs-export",
528
+ "export",
529
+ "multiline-export",
530
+ "singleline-export",
531
+ ],
532
+ next: [
533
+ "cjs-export",
534
+ "export",
535
+ "multiline-export",
536
+ "singleline-export",
537
+ ],
514
538
  },
539
+ // #endregion
540
+ // #region < Return
515
541
  {
516
- prev: star,
542
+ blankLine: always,
543
+ prev: wildcard,
517
544
  next: [
518
- "throw",
519
- "return",
520
545
  "break",
521
546
  "continue",
547
+ "return",
548
+ "throw",
522
549
  ],
523
- blankLine: always,
524
- },
525
- {
526
- prev: star,
527
- next: ["export", "cjs-export"],
528
- blankLine: always,
529
- },
530
- {
531
- prev: ["export", "cjs-export"],
532
- next: ["export", "cjs-export"],
533
- blankLine: never,
534
550
  },
551
+ // #endregion
535
552
  ],
536
553
  "@stylistic/quote-props": [
537
554
  ERROR,
@@ -61,7 +61,7 @@ export const JsonEnableExtension = {
61
61
  {
62
62
  consistent: true,
63
63
  multiline: true,
64
- minProperties: 4,
64
+ minProperties: 3,
65
65
  },
66
66
  ] /* MUST match CHILD of ../js/stylistic.ts */,
67
67
  "jsonc/object-curly-spacing": [
@@ -24,6 +24,6 @@ multiline = "multiline",
24
24
  never = "never",
25
25
  outside = "outside",
26
26
  single = "single",
27
- star = "*",
27
+ wildcard = "*",
28
28
  strict = "strict",
29
29
  zebra = "zebra";