@2digits/eslint-config 4.6.5 → 4.6.7

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.mts CHANGED
@@ -5317,483 +5317,478 @@ interface RuleOptions {
5317
5317
  'strict'?: Linter.RuleEntry<Strict>;
5318
5318
  /**
5319
5319
  * Enforce linebreaks after opening and before closing array brackets
5320
- * @see https://eslint.style/rules/js/array-bracket-newline
5320
+ * @see https://eslint.style/rules/array-bracket-newline
5321
5321
  */
5322
5322
  'stylistic/array-bracket-newline'?: Linter.RuleEntry<StylisticArrayBracketNewline>;
5323
5323
  /**
5324
5324
  * Enforce consistent spacing inside array brackets
5325
- * @see https://eslint.style/rules/js/array-bracket-spacing
5325
+ * @see https://eslint.style/rules/array-bracket-spacing
5326
5326
  */
5327
5327
  'stylistic/array-bracket-spacing'?: Linter.RuleEntry<StylisticArrayBracketSpacing>;
5328
5328
  /**
5329
5329
  * Enforce line breaks after each array element
5330
- * @see https://eslint.style/rules/js/array-element-newline
5330
+ * @see https://eslint.style/rules/array-element-newline
5331
5331
  */
5332
5332
  'stylistic/array-element-newline'?: Linter.RuleEntry<StylisticArrayElementNewline>;
5333
5333
  /**
5334
5334
  * Require parentheses around arrow function arguments
5335
- * @see https://eslint.style/rules/js/arrow-parens
5335
+ * @see https://eslint.style/rules/arrow-parens
5336
5336
  */
5337
5337
  'stylistic/arrow-parens'?: Linter.RuleEntry<StylisticArrowParens>;
5338
5338
  /**
5339
5339
  * Enforce consistent spacing before and after the arrow in arrow functions
5340
- * @see https://eslint.style/rules/js/arrow-spacing
5340
+ * @see https://eslint.style/rules/arrow-spacing
5341
5341
  */
5342
5342
  'stylistic/arrow-spacing'?: Linter.RuleEntry<StylisticArrowSpacing>;
5343
5343
  /**
5344
5344
  * Disallow or enforce spaces inside of blocks after opening block and before closing block
5345
- * @see https://eslint.style/rules/ts/block-spacing
5345
+ * @see https://eslint.style/rules/block-spacing
5346
5346
  */
5347
5347
  'stylistic/block-spacing'?: Linter.RuleEntry<StylisticBlockSpacing>;
5348
5348
  /**
5349
5349
  * Enforce consistent brace style for blocks
5350
- * @see https://eslint.style/rules/ts/brace-style
5350
+ * @see https://eslint.style/rules/brace-style
5351
5351
  */
5352
5352
  'stylistic/brace-style'?: Linter.RuleEntry<StylisticBraceStyle>;
5353
5353
  /**
5354
5354
  * Require or disallow trailing commas
5355
- * @see https://eslint.style/rules/ts/comma-dangle
5355
+ * @see https://eslint.style/rules/comma-dangle
5356
5356
  */
5357
5357
  'stylistic/comma-dangle'?: Linter.RuleEntry<StylisticCommaDangle>;
5358
5358
  /**
5359
5359
  * Enforce consistent spacing before and after commas
5360
- * @see https://eslint.style/rules/ts/comma-spacing
5360
+ * @see https://eslint.style/rules/comma-spacing
5361
5361
  */
5362
5362
  'stylistic/comma-spacing'?: Linter.RuleEntry<StylisticCommaSpacing>;
5363
5363
  /**
5364
5364
  * Enforce consistent comma style
5365
- * @see https://eslint.style/rules/js/comma-style
5365
+ * @see https://eslint.style/rules/comma-style
5366
5366
  */
5367
5367
  'stylistic/comma-style'?: Linter.RuleEntry<StylisticCommaStyle>;
5368
5368
  /**
5369
5369
  * Enforce consistent spacing inside computed property brackets
5370
- * @see https://eslint.style/rules/js/computed-property-spacing
5370
+ * @see https://eslint.style/rules/computed-property-spacing
5371
5371
  */
5372
5372
  'stylistic/computed-property-spacing'?: Linter.RuleEntry<StylisticComputedPropertySpacing>;
5373
5373
  /**
5374
5374
  * Enforce consistent line breaks after opening and before closing braces
5375
- * @see https://eslint.style/rules/plus/curly-newline
5375
+ * @see https://eslint.style/rules/curly-newline
5376
5376
  */
5377
5377
  'stylistic/curly-newline'?: Linter.RuleEntry<StylisticCurlyNewline>;
5378
5378
  /**
5379
5379
  * Enforce consistent newlines before and after dots
5380
- * @see https://eslint.style/rules/js/dot-location
5380
+ * @see https://eslint.style/rules/dot-location
5381
5381
  */
5382
5382
  'stylistic/dot-location'?: Linter.RuleEntry<StylisticDotLocation>;
5383
5383
  /**
5384
5384
  * Require or disallow newline at the end of files
5385
- * @see https://eslint.style/rules/js/eol-last
5385
+ * @see https://eslint.style/rules/eol-last
5386
5386
  */
5387
5387
  'stylistic/eol-last'?: Linter.RuleEntry<StylisticEolLast>;
5388
- /**
5389
- * Require or disallow spacing between function identifiers and their invocations
5390
- * @see https://eslint.style/rules/ts/function-call-spacing
5391
- */
5392
- 'stylistic/func-call-spacing'?: Linter.RuleEntry<StylisticFuncCallSpacing>;
5393
5388
  /**
5394
5389
  * Enforce line breaks between arguments of a function call
5395
- * @see https://eslint.style/rules/js/function-call-argument-newline
5390
+ * @see https://eslint.style/rules/function-call-argument-newline
5396
5391
  */
5397
5392
  'stylistic/function-call-argument-newline'?: Linter.RuleEntry<StylisticFunctionCallArgumentNewline>;
5398
5393
  /**
5399
5394
  * Require or disallow spacing between function identifiers and their invocations
5400
- * @see https://eslint.style/rules/ts/function-call-spacing
5395
+ * @see https://eslint.style/rules/function-call-spacing
5401
5396
  */
5402
5397
  'stylistic/function-call-spacing'?: Linter.RuleEntry<StylisticFunctionCallSpacing>;
5403
5398
  /**
5404
5399
  * Enforce consistent line breaks inside function parentheses
5405
- * @see https://eslint.style/rules/js/function-paren-newline
5400
+ * @see https://eslint.style/rules/function-paren-newline
5406
5401
  */
5407
5402
  'stylistic/function-paren-newline'?: Linter.RuleEntry<StylisticFunctionParenNewline>;
5408
5403
  /**
5409
5404
  * Enforce consistent spacing around `*` operators in generator functions
5410
- * @see https://eslint.style/rules/js/generator-star-spacing
5405
+ * @see https://eslint.style/rules/generator-star-spacing
5411
5406
  */
5412
5407
  'stylistic/generator-star-spacing'?: Linter.RuleEntry<StylisticGeneratorStarSpacing>;
5413
5408
  /**
5414
5409
  * Enforce the location of arrow function bodies
5415
- * @see https://eslint.style/rules/js/implicit-arrow-linebreak
5410
+ * @see https://eslint.style/rules/implicit-arrow-linebreak
5416
5411
  */
5417
5412
  'stylistic/implicit-arrow-linebreak'?: Linter.RuleEntry<StylisticImplicitArrowLinebreak>;
5418
5413
  /**
5419
5414
  * Enforce consistent indentation
5420
- * @see https://eslint.style/rules/ts/indent
5415
+ * @see https://eslint.style/rules/indent
5421
5416
  */
5422
5417
  'stylistic/indent'?: Linter.RuleEntry<StylisticIndent>;
5423
5418
  /**
5424
5419
  * Indentation for binary operators
5425
- * @see https://eslint.style/rules/plus/indent-binary-ops
5420
+ * @see https://eslint.style/rules/indent-binary-ops
5426
5421
  */
5427
5422
  'stylistic/indent-binary-ops'?: Linter.RuleEntry<StylisticIndentBinaryOps>;
5428
5423
  /**
5429
5424
  * Enforce or disallow spaces inside of curly braces in JSX attributes and expressions
5430
- * @see https://eslint.style/rules/jsx/jsx-child-element-spacing
5425
+ * @see https://eslint.style/rules/jsx-child-element-spacing
5431
5426
  */
5432
5427
  'stylistic/jsx-child-element-spacing'?: Linter.RuleEntry<[]>;
5433
5428
  /**
5434
5429
  * Enforce closing bracket location in JSX
5435
- * @see https://eslint.style/rules/jsx/jsx-closing-bracket-location
5430
+ * @see https://eslint.style/rules/jsx-closing-bracket-location
5436
5431
  */
5437
5432
  'stylistic/jsx-closing-bracket-location'?: Linter.RuleEntry<StylisticJsxClosingBracketLocation>;
5438
5433
  /**
5439
5434
  * Enforce closing tag location for multiline JSX
5440
- * @see https://eslint.style/rules/jsx/jsx-closing-tag-location
5435
+ * @see https://eslint.style/rules/jsx-closing-tag-location
5441
5436
  */
5442
5437
  'stylistic/jsx-closing-tag-location'?: Linter.RuleEntry<StylisticJsxClosingTagLocation>;
5443
5438
  /**
5444
5439
  * Disallow unnecessary JSX expressions when literals alone are sufficient or enforce JSX expressions on literals in JSX children or attributes
5445
- * @see https://eslint.style/rules/jsx/jsx-curly-brace-presence
5440
+ * @see https://eslint.style/rules/jsx-curly-brace-presence
5446
5441
  */
5447
5442
  'stylistic/jsx-curly-brace-presence'?: Linter.RuleEntry<StylisticJsxCurlyBracePresence>;
5448
5443
  /**
5449
5444
  * Enforce consistent linebreaks in curly braces in JSX attributes and expressions
5450
- * @see https://eslint.style/rules/jsx/jsx-curly-newline
5445
+ * @see https://eslint.style/rules/jsx-curly-newline
5451
5446
  */
5452
5447
  'stylistic/jsx-curly-newline'?: Linter.RuleEntry<StylisticJsxCurlyNewline>;
5453
5448
  /**
5454
5449
  * Enforce or disallow spaces inside of curly braces in JSX attributes and expressions
5455
- * @see https://eslint.style/rules/jsx/jsx-curly-spacing
5450
+ * @see https://eslint.style/rules/jsx-curly-spacing
5456
5451
  */
5457
5452
  'stylistic/jsx-curly-spacing'?: Linter.RuleEntry<StylisticJsxCurlySpacing>;
5458
5453
  /**
5459
5454
  * Enforce or disallow spaces around equal signs in JSX attributes
5460
- * @see https://eslint.style/rules/jsx/jsx-equals-spacing
5455
+ * @see https://eslint.style/rules/jsx-equals-spacing
5461
5456
  */
5462
5457
  'stylistic/jsx-equals-spacing'?: Linter.RuleEntry<StylisticJsxEqualsSpacing>;
5463
5458
  /**
5464
5459
  * Enforce proper position of the first property in JSX
5465
- * @see https://eslint.style/rules/jsx/jsx-first-prop-new-line
5460
+ * @see https://eslint.style/rules/jsx-first-prop-new-line
5466
5461
  */
5467
5462
  'stylistic/jsx-first-prop-new-line'?: Linter.RuleEntry<StylisticJsxFirstPropNewLine>;
5468
5463
  /**
5469
5464
  * Enforce line breaks before and after JSX elements when they are used as arguments to a function.
5470
- * @see https://eslint.style/rules/jsx/jsx-function-call-newline
5465
+ * @see https://eslint.style/rules/jsx-function-call-newline
5471
5466
  */
5472
5467
  'stylistic/jsx-function-call-newline'?: Linter.RuleEntry<StylisticJsxFunctionCallNewline>;
5473
5468
  /**
5474
5469
  * Enforce JSX indentation. Deprecated, use `indent` rule instead.
5475
- * @see https://eslint.style/rules/jsx/jsx-indent
5470
+ * @see https://eslint.style/rules/jsx-indent
5476
5471
  * @deprecated
5477
5472
  */
5478
5473
  'stylistic/jsx-indent'?: Linter.RuleEntry<StylisticJsxIndent>;
5479
5474
  /**
5480
5475
  * Enforce props indentation in JSX
5481
- * @see https://eslint.style/rules/jsx/jsx-indent-props
5476
+ * @see https://eslint.style/rules/jsx-indent-props
5482
5477
  */
5483
5478
  'stylistic/jsx-indent-props'?: Linter.RuleEntry<StylisticJsxIndentProps>;
5484
5479
  /**
5485
5480
  * Enforce maximum of props on a single line in JSX
5486
- * @see https://eslint.style/rules/jsx/jsx-max-props-per-line
5481
+ * @see https://eslint.style/rules/jsx-max-props-per-line
5487
5482
  */
5488
5483
  'stylistic/jsx-max-props-per-line'?: Linter.RuleEntry<StylisticJsxMaxPropsPerLine>;
5489
5484
  /**
5490
5485
  * Require or prevent a new line after jsx elements and expressions.
5491
- * @see https://eslint.style/rules/jsx/jsx-newline
5486
+ * @see https://eslint.style/rules/jsx-newline
5492
5487
  */
5493
5488
  'stylistic/jsx-newline'?: Linter.RuleEntry<StylisticJsxNewline>;
5494
5489
  /**
5495
5490
  * Require one JSX element per line
5496
- * @see https://eslint.style/rules/jsx/jsx-one-expression-per-line
5491
+ * @see https://eslint.style/rules/jsx-one-expression-per-line
5497
5492
  */
5498
5493
  'stylistic/jsx-one-expression-per-line'?: Linter.RuleEntry<StylisticJsxOneExpressionPerLine>;
5499
5494
  /**
5500
5495
  * Enforce PascalCase for user-defined JSX components
5501
- * @see https://eslint.style/rules/jsx/jsx-pascal-case
5496
+ * @see https://eslint.style/rules/jsx-pascal-case
5502
5497
  */
5503
5498
  'stylistic/jsx-pascal-case'?: Linter.RuleEntry<StylisticJsxPascalCase>;
5504
5499
  /**
5505
5500
  * Disallow multiple spaces between inline JSX props
5506
- * @see https://eslint.style/rules/jsx/jsx-props-no-multi-spaces
5501
+ * @see https://eslint.style/rules/jsx-props-no-multi-spaces
5507
5502
  */
5508
5503
  'stylistic/jsx-props-no-multi-spaces'?: Linter.RuleEntry<[]>;
5509
5504
  /**
5510
5505
  * Enforce the consistent use of either double or single quotes in JSX attributes
5511
- * @see https://eslint.style/rules/js/jsx-quotes
5506
+ * @see https://eslint.style/rules/jsx-quotes
5512
5507
  */
5513
5508
  'stylistic/jsx-quotes'?: Linter.RuleEntry<StylisticJsxQuotes>;
5514
5509
  /**
5515
5510
  * Disallow extra closing tags for components without children
5516
- * @see https://eslint.style/rules/jsx/jsx-self-closing-comp
5511
+ * @see https://eslint.style/rules/jsx-self-closing-comp
5517
5512
  */
5518
5513
  'stylistic/jsx-self-closing-comp'?: Linter.RuleEntry<StylisticJsxSelfClosingComp>;
5519
5514
  /**
5520
5515
  * Enforce props alphabetical sorting
5521
- * @see https://eslint.style/rules/jsx/jsx-sort-props
5516
+ * @see https://eslint.style/rules/jsx-sort-props
5522
5517
  */
5523
5518
  'stylistic/jsx-sort-props'?: Linter.RuleEntry<StylisticJsxSortProps>;
5524
5519
  /**
5525
5520
  * Enforce whitespace in and around the JSX opening and closing brackets
5526
- * @see https://eslint.style/rules/jsx/jsx-tag-spacing
5521
+ * @see https://eslint.style/rules/jsx-tag-spacing
5527
5522
  */
5528
5523
  'stylistic/jsx-tag-spacing'?: Linter.RuleEntry<StylisticJsxTagSpacing>;
5529
5524
  /**
5530
5525
  * Disallow missing parentheses around multiline JSX
5531
- * @see https://eslint.style/rules/jsx/jsx-wrap-multilines
5526
+ * @see https://eslint.style/rules/jsx-wrap-multilines
5532
5527
  */
5533
5528
  'stylistic/jsx-wrap-multilines'?: Linter.RuleEntry<StylisticJsxWrapMultilines>;
5534
5529
  /**
5535
5530
  * Enforce consistent spacing between property names and type annotations in types and interfaces
5536
- * @see https://eslint.style/rules/ts/key-spacing
5531
+ * @see https://eslint.style/rules/key-spacing
5537
5532
  */
5538
5533
  'stylistic/key-spacing'?: Linter.RuleEntry<StylisticKeySpacing>;
5539
5534
  /**
5540
5535
  * Enforce consistent spacing before and after keywords
5541
- * @see https://eslint.style/rules/ts/keyword-spacing
5536
+ * @see https://eslint.style/rules/keyword-spacing
5542
5537
  */
5543
5538
  'stylistic/keyword-spacing'?: Linter.RuleEntry<StylisticKeywordSpacing>;
5544
5539
  /**
5545
5540
  * Enforce position of line comments
5546
- * @see https://eslint.style/rules/js/line-comment-position
5541
+ * @see https://eslint.style/rules/line-comment-position
5547
5542
  */
5548
5543
  'stylistic/line-comment-position'?: Linter.RuleEntry<StylisticLineCommentPosition>;
5549
5544
  /**
5550
5545
  * Enforce consistent linebreak style
5551
- * @see https://eslint.style/rules/js/linebreak-style
5546
+ * @see https://eslint.style/rules/linebreak-style
5552
5547
  */
5553
5548
  'stylistic/linebreak-style'?: Linter.RuleEntry<StylisticLinebreakStyle>;
5554
5549
  /**
5555
5550
  * Require empty lines around comments
5556
- * @see https://eslint.style/rules/ts/lines-around-comment
5551
+ * @see https://eslint.style/rules/lines-around-comment
5557
5552
  */
5558
5553
  'stylistic/lines-around-comment'?: Linter.RuleEntry<StylisticLinesAroundComment>;
5559
5554
  /**
5560
5555
  * Require or disallow an empty line between class members
5561
- * @see https://eslint.style/rules/ts/lines-between-class-members
5556
+ * @see https://eslint.style/rules/lines-between-class-members
5562
5557
  */
5563
5558
  'stylistic/lines-between-class-members'?: Linter.RuleEntry<StylisticLinesBetweenClassMembers>;
5564
5559
  /**
5565
5560
  * Enforce a maximum line length
5566
- * @see https://eslint.style/rules/js/max-len
5561
+ * @see https://eslint.style/rules/max-len
5567
5562
  */
5568
5563
  'stylistic/max-len'?: Linter.RuleEntry<StylisticMaxLen>;
5569
5564
  /**
5570
5565
  * Enforce a maximum number of statements allowed per line
5571
- * @see https://eslint.style/rules/js/max-statements-per-line
5566
+ * @see https://eslint.style/rules/max-statements-per-line
5572
5567
  */
5573
5568
  'stylistic/max-statements-per-line'?: Linter.RuleEntry<StylisticMaxStatementsPerLine>;
5574
5569
  /**
5575
5570
  * Require a specific member delimiter style for interfaces and type literals
5576
- * @see https://eslint.style/rules/ts/member-delimiter-style
5571
+ * @see https://eslint.style/rules/member-delimiter-style
5577
5572
  */
5578
5573
  'stylistic/member-delimiter-style'?: Linter.RuleEntry<StylisticMemberDelimiterStyle>;
5579
5574
  /**
5580
5575
  * Enforce a particular style for multiline comments
5581
- * @see https://eslint.style/rules/js/multiline-comment-style
5576
+ * @see https://eslint.style/rules/multiline-comment-style
5582
5577
  */
5583
5578
  'stylistic/multiline-comment-style'?: Linter.RuleEntry<StylisticMultilineCommentStyle>;
5584
5579
  /**
5585
5580
  * Enforce newlines between operands of ternary expressions
5586
- * @see https://eslint.style/rules/js/multiline-ternary
5581
+ * @see https://eslint.style/rules/multiline-ternary
5587
5582
  */
5588
5583
  'stylistic/multiline-ternary'?: Linter.RuleEntry<StylisticMultilineTernary>;
5589
5584
  /**
5590
5585
  * Enforce or disallow parentheses when invoking a constructor with no arguments
5591
- * @see https://eslint.style/rules/js/new-parens
5586
+ * @see https://eslint.style/rules/new-parens
5592
5587
  */
5593
5588
  'stylistic/new-parens'?: Linter.RuleEntry<StylisticNewParens>;
5594
5589
  /**
5595
5590
  * Require a newline after each call in a method chain
5596
- * @see https://eslint.style/rules/js/newline-per-chained-call
5591
+ * @see https://eslint.style/rules/newline-per-chained-call
5597
5592
  */
5598
5593
  'stylistic/newline-per-chained-call'?: Linter.RuleEntry<StylisticNewlinePerChainedCall>;
5599
5594
  /**
5600
5595
  * Disallow arrow functions where they could be confused with comparisons
5601
- * @see https://eslint.style/rules/js/no-confusing-arrow
5596
+ * @see https://eslint.style/rules/no-confusing-arrow
5602
5597
  */
5603
5598
  'stylistic/no-confusing-arrow'?: Linter.RuleEntry<StylisticNoConfusingArrow>;
5604
5599
  /**
5605
5600
  * Disallow unnecessary parentheses
5606
- * @see https://eslint.style/rules/ts/no-extra-parens
5601
+ * @see https://eslint.style/rules/no-extra-parens
5607
5602
  */
5608
5603
  'stylistic/no-extra-parens'?: Linter.RuleEntry<StylisticNoExtraParens>;
5609
5604
  /**
5610
5605
  * Disallow unnecessary semicolons
5611
- * @see https://eslint.style/rules/ts/no-extra-semi
5606
+ * @see https://eslint.style/rules/no-extra-semi
5612
5607
  */
5613
5608
  'stylistic/no-extra-semi'?: Linter.RuleEntry<[]>;
5614
5609
  /**
5615
5610
  * Disallow leading or trailing decimal points in numeric literals
5616
- * @see https://eslint.style/rules/js/no-floating-decimal
5611
+ * @see https://eslint.style/rules/no-floating-decimal
5617
5612
  */
5618
5613
  'stylistic/no-floating-decimal'?: Linter.RuleEntry<[]>;
5619
5614
  /**
5620
5615
  * Disallow mixed binary operators
5621
- * @see https://eslint.style/rules/js/no-mixed-operators
5616
+ * @see https://eslint.style/rules/no-mixed-operators
5622
5617
  */
5623
5618
  'stylistic/no-mixed-operators'?: Linter.RuleEntry<StylisticNoMixedOperators>;
5624
5619
  /**
5625
5620
  * Disallow mixed spaces and tabs for indentation
5626
- * @see https://eslint.style/rules/js/no-mixed-spaces-and-tabs
5621
+ * @see https://eslint.style/rules/no-mixed-spaces-and-tabs
5627
5622
  */
5628
5623
  'stylistic/no-mixed-spaces-and-tabs'?: Linter.RuleEntry<StylisticNoMixedSpacesAndTabs>;
5629
5624
  /**
5630
5625
  * Disallow multiple spaces
5631
- * @see https://eslint.style/rules/js/no-multi-spaces
5626
+ * @see https://eslint.style/rules/no-multi-spaces
5632
5627
  */
5633
5628
  'stylistic/no-multi-spaces'?: Linter.RuleEntry<StylisticNoMultiSpaces>;
5634
5629
  /**
5635
5630
  * Disallow multiple empty lines
5636
- * @see https://eslint.style/rules/js/no-multiple-empty-lines
5631
+ * @see https://eslint.style/rules/no-multiple-empty-lines
5637
5632
  */
5638
5633
  'stylistic/no-multiple-empty-lines'?: Linter.RuleEntry<StylisticNoMultipleEmptyLines>;
5639
5634
  /**
5640
5635
  * Disallow all tabs
5641
- * @see https://eslint.style/rules/js/no-tabs
5636
+ * @see https://eslint.style/rules/no-tabs
5642
5637
  */
5643
5638
  'stylistic/no-tabs'?: Linter.RuleEntry<StylisticNoTabs>;
5644
5639
  /**
5645
5640
  * Disallow trailing whitespace at the end of lines
5646
- * @see https://eslint.style/rules/js/no-trailing-spaces
5641
+ * @see https://eslint.style/rules/no-trailing-spaces
5647
5642
  */
5648
5643
  'stylistic/no-trailing-spaces'?: Linter.RuleEntry<StylisticNoTrailingSpaces>;
5649
5644
  /**
5650
5645
  * Disallow whitespace before properties
5651
- * @see https://eslint.style/rules/js/no-whitespace-before-property
5646
+ * @see https://eslint.style/rules/no-whitespace-before-property
5652
5647
  */
5653
5648
  'stylistic/no-whitespace-before-property'?: Linter.RuleEntry<[]>;
5654
5649
  /**
5655
5650
  * Enforce the location of single-line statements
5656
- * @see https://eslint.style/rules/js/nonblock-statement-body-position
5651
+ * @see https://eslint.style/rules/nonblock-statement-body-position
5657
5652
  */
5658
5653
  'stylistic/nonblock-statement-body-position'?: Linter.RuleEntry<StylisticNonblockStatementBodyPosition>;
5659
5654
  /**
5660
5655
  * Enforce consistent line breaks after opening and before closing braces
5661
- * @see https://eslint.style/rules/ts/object-curly-newline
5656
+ * @see https://eslint.style/rules/object-curly-newline
5662
5657
  */
5663
5658
  'stylistic/object-curly-newline'?: Linter.RuleEntry<StylisticObjectCurlyNewline>;
5664
5659
  /**
5665
5660
  * Enforce consistent spacing inside braces
5666
- * @see https://eslint.style/rules/ts/object-curly-spacing
5661
+ * @see https://eslint.style/rules/object-curly-spacing
5667
5662
  */
5668
5663
  'stylistic/object-curly-spacing'?: Linter.RuleEntry<StylisticObjectCurlySpacing>;
5669
5664
  /**
5670
5665
  * Enforce placing object properties on separate lines
5671
- * @see https://eslint.style/rules/ts/object-property-newline
5666
+ * @see https://eslint.style/rules/object-property-newline
5672
5667
  */
5673
5668
  'stylistic/object-property-newline'?: Linter.RuleEntry<StylisticObjectPropertyNewline>;
5674
5669
  /**
5675
5670
  * Require or disallow newlines around variable declarations
5676
- * @see https://eslint.style/rules/js/one-var-declaration-per-line
5671
+ * @see https://eslint.style/rules/one-var-declaration-per-line
5677
5672
  */
5678
5673
  'stylistic/one-var-declaration-per-line'?: Linter.RuleEntry<StylisticOneVarDeclarationPerLine>;
5679
5674
  /**
5680
5675
  * Enforce consistent linebreak style for operators
5681
- * @see https://eslint.style/rules/js/operator-linebreak
5676
+ * @see https://eslint.style/rules/operator-linebreak
5682
5677
  */
5683
5678
  'stylistic/operator-linebreak'?: Linter.RuleEntry<StylisticOperatorLinebreak>;
5684
5679
  /**
5685
5680
  * Require or disallow padding within blocks
5686
- * @see https://eslint.style/rules/js/padded-blocks
5681
+ * @see https://eslint.style/rules/padded-blocks
5687
5682
  */
5688
5683
  'stylistic/padded-blocks'?: Linter.RuleEntry<StylisticPaddedBlocks>;
5689
5684
  /**
5690
5685
  * Require or disallow padding lines between statements
5691
- * @see https://eslint.style/rules/ts/padding-line-between-statements
5686
+ * @see https://eslint.style/rules/padding-line-between-statements
5692
5687
  */
5693
5688
  'stylistic/padding-line-between-statements'?: Linter.RuleEntry<StylisticPaddingLineBetweenStatements>;
5694
5689
  /**
5695
5690
  * Require quotes around object literal, type literal, interfaces and enums property names
5696
- * @see https://eslint.style/rules/ts/quote-props
5691
+ * @see https://eslint.style/rules/quote-props
5697
5692
  */
5698
5693
  'stylistic/quote-props'?: Linter.RuleEntry<StylisticQuoteProps>;
5699
5694
  /**
5700
5695
  * Enforce the consistent use of either backticks, double, or single quotes
5701
- * @see https://eslint.style/rules/ts/quotes
5696
+ * @see https://eslint.style/rules/quotes
5702
5697
  */
5703
5698
  'stylistic/quotes'?: Linter.RuleEntry<StylisticQuotes>;
5704
5699
  /**
5705
5700
  * Enforce spacing between rest and spread operators and their expressions
5706
- * @see https://eslint.style/rules/js/rest-spread-spacing
5701
+ * @see https://eslint.style/rules/rest-spread-spacing
5707
5702
  */
5708
5703
  'stylistic/rest-spread-spacing'?: Linter.RuleEntry<StylisticRestSpreadSpacing>;
5709
5704
  /**
5710
5705
  * Require or disallow semicolons instead of ASI
5711
- * @see https://eslint.style/rules/ts/semi
5706
+ * @see https://eslint.style/rules/semi
5712
5707
  */
5713
5708
  'stylistic/semi'?: Linter.RuleEntry<StylisticSemi>;
5714
5709
  /**
5715
5710
  * Enforce consistent spacing before and after semicolons
5716
- * @see https://eslint.style/rules/ts/semi-spacing
5711
+ * @see https://eslint.style/rules/semi-spacing
5717
5712
  */
5718
5713
  'stylistic/semi-spacing'?: Linter.RuleEntry<StylisticSemiSpacing>;
5719
5714
  /**
5720
5715
  * Enforce location of semicolons
5721
- * @see https://eslint.style/rules/js/semi-style
5716
+ * @see https://eslint.style/rules/semi-style
5722
5717
  */
5723
5718
  'stylistic/semi-style'?: Linter.RuleEntry<StylisticSemiStyle>;
5724
5719
  /**
5725
5720
  * Enforce consistent spacing before blocks
5726
- * @see https://eslint.style/rules/ts/space-before-blocks
5721
+ * @see https://eslint.style/rules/space-before-blocks
5727
5722
  */
5728
5723
  'stylistic/space-before-blocks'?: Linter.RuleEntry<StylisticSpaceBeforeBlocks>;
5729
5724
  /**
5730
5725
  * Enforce consistent spacing before function parenthesis
5731
- * @see https://eslint.style/rules/ts/space-before-function-paren
5726
+ * @see https://eslint.style/rules/space-before-function-paren
5732
5727
  */
5733
5728
  'stylistic/space-before-function-paren'?: Linter.RuleEntry<StylisticSpaceBeforeFunctionParen>;
5734
5729
  /**
5735
5730
  * Enforce consistent spacing inside parentheses
5736
- * @see https://eslint.style/rules/js/space-in-parens
5731
+ * @see https://eslint.style/rules/space-in-parens
5737
5732
  */
5738
5733
  'stylistic/space-in-parens'?: Linter.RuleEntry<StylisticSpaceInParens>;
5739
5734
  /**
5740
5735
  * Require spacing around infix operators
5741
- * @see https://eslint.style/rules/ts/space-infix-ops
5736
+ * @see https://eslint.style/rules/space-infix-ops
5742
5737
  */
5743
5738
  'stylistic/space-infix-ops'?: Linter.RuleEntry<StylisticSpaceInfixOps>;
5744
5739
  /**
5745
5740
  * Enforce consistent spacing before or after unary operators
5746
- * @see https://eslint.style/rules/js/space-unary-ops
5741
+ * @see https://eslint.style/rules/space-unary-ops
5747
5742
  */
5748
5743
  'stylistic/space-unary-ops'?: Linter.RuleEntry<StylisticSpaceUnaryOps>;
5749
5744
  /**
5750
5745
  * Enforce consistent spacing after the `//` or `/*` in a comment
5751
- * @see https://eslint.style/rules/js/spaced-comment
5746
+ * @see https://eslint.style/rules/spaced-comment
5752
5747
  */
5753
5748
  'stylistic/spaced-comment'?: Linter.RuleEntry<StylisticSpacedComment>;
5754
5749
  /**
5755
5750
  * Enforce spacing around colons of switch statements
5756
- * @see https://eslint.style/rules/js/switch-colon-spacing
5751
+ * @see https://eslint.style/rules/switch-colon-spacing
5757
5752
  */
5758
5753
  'stylistic/switch-colon-spacing'?: Linter.RuleEntry<StylisticSwitchColonSpacing>;
5759
5754
  /**
5760
5755
  * Require or disallow spacing around embedded expressions of template strings
5761
- * @see https://eslint.style/rules/js/template-curly-spacing
5756
+ * @see https://eslint.style/rules/template-curly-spacing
5762
5757
  */
5763
5758
  'stylistic/template-curly-spacing'?: Linter.RuleEntry<StylisticTemplateCurlySpacing>;
5764
5759
  /**
5765
5760
  * Require or disallow spacing between template tags and their literals
5766
- * @see https://eslint.style/rules/js/template-tag-spacing
5761
+ * @see https://eslint.style/rules/template-tag-spacing
5767
5762
  */
5768
5763
  'stylistic/template-tag-spacing'?: Linter.RuleEntry<StylisticTemplateTagSpacing>;
5769
5764
  /**
5770
5765
  * Require consistent spacing around type annotations
5771
- * @see https://eslint.style/rules/ts/type-annotation-spacing
5766
+ * @see https://eslint.style/rules/type-annotation-spacing
5772
5767
  */
5773
5768
  'stylistic/type-annotation-spacing'?: Linter.RuleEntry<StylisticTypeAnnotationSpacing>;
5774
5769
  /**
5775
5770
  * Enforces consistent spacing inside TypeScript type generics
5776
- * @see https://eslint.style/rules/plus/type-generic-spacing
5771
+ * @see https://eslint.style/rules/type-generic-spacing
5777
5772
  */
5778
5773
  'stylistic/type-generic-spacing'?: Linter.RuleEntry<[]>;
5779
5774
  /**
5780
5775
  * Expect space before the type declaration in the named tuple
5781
- * @see https://eslint.style/rules/plus/type-named-tuple-spacing
5776
+ * @see https://eslint.style/rules/type-named-tuple-spacing
5782
5777
  */
5783
5778
  'stylistic/type-named-tuple-spacing'?: Linter.RuleEntry<[]>;
5784
5779
  /**
5785
5780
  * Require parentheses around immediate `function` invocations
5786
- * @see https://eslint.style/rules/js/wrap-iife
5781
+ * @see https://eslint.style/rules/wrap-iife
5787
5782
  */
5788
5783
  'stylistic/wrap-iife'?: Linter.RuleEntry<StylisticWrapIife>;
5789
5784
  /**
5790
5785
  * Require parenthesis around regex literals
5791
- * @see https://eslint.style/rules/js/wrap-regex
5786
+ * @see https://eslint.style/rules/wrap-regex
5792
5787
  */
5793
5788
  'stylistic/wrap-regex'?: Linter.RuleEntry<[]>;
5794
5789
  /**
5795
5790
  * Require or disallow spacing around the `*` in `yield*` expressions
5796
- * @see https://eslint.style/rules/js/yield-star-spacing
5791
+ * @see https://eslint.style/rules/yield-star-spacing
5797
5792
  */
5798
5793
  'stylistic/yield-star-spacing'?: Linter.RuleEntry<StylisticYieldStarSpacing>;
5799
5794
  /**
@@ -10550,16 +10545,6 @@ type StylisticCurlyNewline = [] | [(("always" | "never") | {
10550
10545
  minElements?: number;
10551
10546
  consistent?: boolean;
10552
10547
  });
10553
- TSEnumBody?: (("always" | "never") | {
10554
- multiline?: boolean;
10555
- minElements?: number;
10556
- consistent?: boolean;
10557
- });
10558
- TSInterfaceBody?: (("always" | "never") | {
10559
- multiline?: boolean;
10560
- minElements?: number;
10561
- consistent?: boolean;
10562
- });
10563
10548
  TSModuleBlock?: (("always" | "never") | {
10564
10549
  multiline?: boolean;
10565
10550
  minElements?: number;
@@ -10573,14 +10558,6 @@ type StylisticCurlyNewline = [] | [(("always" | "never") | {
10573
10558
  type StylisticDotLocation = [] | [("object" | "property")];
10574
10559
  // ----- stylistic/eol-last -----
10575
10560
  type StylisticEolLast = [] | [("always" | "never" | "unix" | "windows")];
10576
- // ----- stylistic/func-call-spacing -----
10577
- type StylisticFuncCallSpacing = ([] | ["never"] | [] | ["always"] | ["always", {
10578
- allowNewlines?: boolean;
10579
- optionalChain?: {
10580
- before?: boolean;
10581
- after?: boolean;
10582
- };
10583
- }]);
10584
10561
  // ----- stylistic/function-call-argument-newline -----
10585
10562
  type StylisticFunctionCallArgumentNewline = [] | [("always" | "never" | "consistent")];
10586
10563
  // ----- stylistic/function-call-spacing -----
@@ -10621,6 +10598,7 @@ type StylisticIndent = [] | [("tab" | number)] | [("tab" | number), {
10621
10598
  var?: (number | ("first" | "off"));
10622
10599
  let?: (number | ("first" | "off"));
10623
10600
  const?: (number | ("first" | "off"));
10601
+ using?: (number | ("first" | "off"));
10624
10602
  });
10625
10603
  outerIIFEBody?: (number | "off");
10626
10604
  MemberExpression?: (number | "off");
@@ -10755,8 +10733,8 @@ type StylisticJsxSortProps = [] | [{
10755
10733
  multiline?: ("ignore" | "first" | "last");
10756
10734
  ignoreCase?: boolean;
10757
10735
  noSortAlphabetically?: boolean;
10758
- reservedFirst?: (unknown[] | boolean);
10759
- reservedLast?: unknown[];
10736
+ reservedFirst?: (string[] | boolean);
10737
+ reservedLast?: string[];
10760
10738
  locale?: string;
10761
10739
  }];
10762
10740
  // ----- stylistic/jsx-tag-spacing -----
@@ -11101,6 +11079,10 @@ type StylisticKeywordSpacing = [] | [{
11101
11079
  before?: boolean;
11102
11080
  after?: boolean;
11103
11081
  };
11082
+ using?: {
11083
+ before?: boolean;
11084
+ after?: boolean;
11085
+ };
11104
11086
  yield?: {
11105
11087
  before?: boolean;
11106
11088
  after?: boolean;
@@ -11303,6 +11285,11 @@ type StylisticNoExtraParens = ([] | ["functions"] | [] | ["all"] | ["all", {
11303
11285
  enforceForFunctionPrototypeMethods?: boolean;
11304
11286
  allowParensAfterCommentPattern?: string;
11305
11287
  nestedConditionalExpressions?: boolean;
11288
+ allowNodesInSpreadElement?: {
11289
+ ConditionalExpression?: boolean;
11290
+ LogicalExpression?: boolean;
11291
+ AwaitExpression?: boolean;
11292
+ };
11306
11293
  }]);
11307
11294
  // ----- stylistic/no-mixed-operators -----
11308
11295
  type StylisticNoMixedOperators = [] | [{
@@ -11380,6 +11367,11 @@ type StylisticObjectCurlyNewline = [] | [((("always" | "never") | {
11380
11367
  minProperties?: number;
11381
11368
  consistent?: boolean;
11382
11369
  });
11370
+ TSEnumBody?: (("always" | "never") | {
11371
+ multiline?: boolean;
11372
+ minProperties?: number;
11373
+ consistent?: boolean;
11374
+ });
11383
11375
  })];
11384
11376
  // ----- stylistic/object-curly-spacing -----
11385
11377
  type StylisticObjectCurlySpacing = [] | [("always" | "never")] | [("always" | "never"), {
@@ -11389,7 +11381,6 @@ type StylisticObjectCurlySpacing = [] | [("always" | "never")] | [("always" | "n
11389
11381
  // ----- stylistic/object-property-newline -----
11390
11382
  type StylisticObjectPropertyNewline = [] | [{
11391
11383
  allowAllPropertiesOnSameLine?: boolean;
11392
- allowMultiplePropertiesPerLine?: boolean;
11393
11384
  }];
11394
11385
  // ----- stylistic/one-var-declaration-per-line -----
11395
11386
  type StylisticOneVarDeclarationPerLine = [] | [("always" | "initializations")];
@@ -11413,7 +11404,7 @@ type StylisticPaddedBlocks = [] | [(("always" | "never" | "start" | "end") | {
11413
11404
  }];
11414
11405
  // ----- stylistic/padding-line-between-statements -----
11415
11406
  type _StylisticPaddingLineBetweenStatementsPaddingType = ("any" | "never" | "always");
11416
- type _StylisticPaddingLineBetweenStatementsStatementType = (("*" | "block-like" | "exports" | "require" | "directive" | "expression" | "iife" | "multiline-block-like" | "multiline-expression" | "multiline-const" | "multiline-export" | "multiline-let" | "multiline-var" | "singleline-const" | "singleline-export" | "singleline-let" | "singleline-var" | "block" | "empty" | "function" | "ts-method" | "break" | "case" | "class" | "const" | "continue" | "debugger" | "default" | "do" | "export" | "for" | "if" | "import" | "let" | "return" | "switch" | "throw" | "try" | "var" | "while" | "with" | "cjs-export" | "cjs-import" | "enum" | "interface" | "type" | "function-overload") | [("*" | "block-like" | "exports" | "require" | "directive" | "expression" | "iife" | "multiline-block-like" | "multiline-expression" | "multiline-const" | "multiline-export" | "multiline-let" | "multiline-var" | "singleline-const" | "singleline-export" | "singleline-let" | "singleline-var" | "block" | "empty" | "function" | "ts-method" | "break" | "case" | "class" | "const" | "continue" | "debugger" | "default" | "do" | "export" | "for" | "if" | "import" | "let" | "return" | "switch" | "throw" | "try" | "var" | "while" | "with" | "cjs-export" | "cjs-import" | "enum" | "interface" | "type" | "function-overload"), ...(("*" | "block-like" | "exports" | "require" | "directive" | "expression" | "iife" | "multiline-block-like" | "multiline-expression" | "multiline-const" | "multiline-export" | "multiline-let" | "multiline-var" | "singleline-const" | "singleline-export" | "singleline-let" | "singleline-var" | "block" | "empty" | "function" | "ts-method" | "break" | "case" | "class" | "const" | "continue" | "debugger" | "default" | "do" | "export" | "for" | "if" | "import" | "let" | "return" | "switch" | "throw" | "try" | "var" | "while" | "with" | "cjs-export" | "cjs-import" | "enum" | "interface" | "type" | "function-overload"))[]]);
11407
+ type _StylisticPaddingLineBetweenStatementsStatementType = (("*" | "block-like" | "exports" | "require" | "directive" | "expression" | "iife" | "multiline-block-like" | "multiline-expression" | "multiline-const" | "multiline-export" | "multiline-let" | "multiline-using" | "multiline-var" | "singleline-const" | "singleline-export" | "singleline-let" | "singleline-using" | "singleline-var" | "block" | "empty" | "function" | "ts-method" | "break" | "case" | "class" | "const" | "continue" | "debugger" | "default" | "do" | "export" | "for" | "if" | "import" | "let" | "return" | "switch" | "throw" | "try" | "using" | "var" | "while" | "with" | "cjs-export" | "cjs-import" | "enum" | "interface" | "type" | "function-overload") | [("*" | "block-like" | "exports" | "require" | "directive" | "expression" | "iife" | "multiline-block-like" | "multiline-expression" | "multiline-const" | "multiline-export" | "multiline-let" | "multiline-using" | "multiline-var" | "singleline-const" | "singleline-export" | "singleline-let" | "singleline-using" | "singleline-var" | "block" | "empty" | "function" | "ts-method" | "break" | "case" | "class" | "const" | "continue" | "debugger" | "default" | "do" | "export" | "for" | "if" | "import" | "let" | "return" | "switch" | "throw" | "try" | "using" | "var" | "while" | "with" | "cjs-export" | "cjs-import" | "enum" | "interface" | "type" | "function-overload"), ...(("*" | "block-like" | "exports" | "require" | "directive" | "expression" | "iife" | "multiline-block-like" | "multiline-expression" | "multiline-const" | "multiline-export" | "multiline-let" | "multiline-using" | "multiline-var" | "singleline-const" | "singleline-export" | "singleline-let" | "singleline-using" | "singleline-var" | "block" | "empty" | "function" | "ts-method" | "break" | "case" | "class" | "const" | "continue" | "debugger" | "default" | "do" | "export" | "for" | "if" | "import" | "let" | "return" | "switch" | "throw" | "try" | "using" | "var" | "while" | "with" | "cjs-export" | "cjs-import" | "enum" | "interface" | "type" | "function-overload"))[]]);
11417
11408
  type StylisticPaddingLineBetweenStatements = {
11418
11409
  blankLine: _StylisticPaddingLineBetweenStatementsPaddingType;
11419
11410
  prev: _StylisticPaddingLineBetweenStatementsStatementType;
@@ -11452,12 +11443,14 @@ type StylisticSpaceBeforeBlocks = [] | [(("always" | "never") | {
11452
11443
  keywords?: ("always" | "never" | "off");
11453
11444
  functions?: ("always" | "never" | "off");
11454
11445
  classes?: ("always" | "never" | "off");
11446
+ modules?: ("always" | "never" | "off");
11455
11447
  })];
11456
11448
  // ----- stylistic/space-before-function-paren -----
11457
11449
  type StylisticSpaceBeforeFunctionParen = [] | [(("always" | "never") | {
11458
11450
  anonymous?: ("always" | "never" | "ignore");
11459
11451
  named?: ("always" | "never" | "ignore");
11460
11452
  asyncArrow?: ("always" | "never" | "ignore");
11453
+ catch?: ("always" | "never" | "ignore");
11461
11454
  })];
11462
11455
  // ----- stylistic/space-in-parens -----
11463
11456
  type StylisticSpaceInParens = [] | [("always" | "never")] | [("always" | "never"), {
@@ -12077,6 +12070,7 @@ interface _TsNamingConvention_MatchRegexConfig {
12077
12070
  }
12078
12071
  // ----- ts/no-base-to-string -----
12079
12072
  type TsNoBaseToString = [] | [{
12073
+ checkUnknown?: boolean;
12080
12074
  ignoredTypeNames?: string[];
12081
12075
  }];
12082
12076
  // ----- ts/no-confusing-void-expression -----
@@ -13012,7 +13006,7 @@ type Yoda = [] | [("always" | "never")] | [("always" | "never"), {
13012
13006
  onlyEquality?: boolean;
13013
13007
  }];
13014
13008
  // Names of all the configs
13015
- type ConfigNames = '2digits:antfu' | '2digits:boolean' | '2digits:comments' | '2digits:css' | '2digits:drizzle' | '2digits:graphql' | '2digits:ignores' | '2digits:gitignore' | '2digits:javascript' | '2digits:jsdoc' | '2digits:jsonc/base' | '2digits:jsonc/base' | '2digits:jsonc/json' | '2digits:jsonc/jsonc' | '2digits:jsonc/json5' | '2digits:jsonc/package.json' | '2digits:jsonc/tsconfig.json' | '2digits:jsonc/prettier' | '2digits:jsonc/prettier' | '2digits:jsonc/prettier' | '2digits:markdown/setup' | '2digits:markdown/processor' | '2digits:markdown/parser' | '2digits:markdown/rules' | '2digits:markdown/disables' | '2digits:next/setup' | '2digits:next/rules' | '2digits:node' | '2digits:pnpm/package-json' | '2digits:pnpm/pnpm-workspace-yaml' | '2digits:prettier' | '2digits:react/setup' | '2digits:react/rules' | '2digits:regexp' | '2digits:sonar' | '2digits:storybook/setup' | '2digits:storybook/rules' | '2digits:storybook/disables' | '2digits:storybook/config' | '2digits:tailwind' | '2digits:tanstack' | '2digits:turbo' | '2digits:typescript/setup' | '2digits:typescript/rules' | '2digits:typescript/disables/dts' | '2digits:typescript/disables/test' | '2digits:typescript/disables/cjs' | '2digits:unicorn' | '2digits:yaml/setup' | '2digits:yaml/base' | '2digits:yaml/recommended' | '2digits:yaml/standard' | '2digits:yaml/pnpm-workspace' | '2digits:yaml/prettier';
13009
+ type ConfigNames = '2digits:antfu' | '2digits:boolean' | '2digits:comments' | '2digits:css' | '2digits:drizzle' | '2digits:graphql' | '2digits:ignores' | '2digits:gitignore' | '2digits:javascript' | '2digits:jsdoc' | '2digits:jsonc/base' | '2digits:jsonc/base' | '2digits:jsonc/json' | '2digits:jsonc/jsonc' | '2digits:jsonc/json5' | '2digits:jsonc/package.json' | '2digits:jsonc/tsconfig.json' | '2digits:jsonc/prettier' | '2digits:jsonc/prettier' | '2digits:jsonc/prettier' | '2digits:markdown/setup' | '2digits:markdown/processor' | '2digits:markdown/parser' | '2digits:markdown/rules' | '2digits:markdown/disables' | '2digits:next/setup' | '2digits:next/rules' | '2digits:node' | '2digits:pnpm/package-json' | '2digits:pnpm/pnpm-workspace-yaml' | '2digits:prettier' | '2digits:react/setup' | '2digits:react/rules' | '2digits:regexp' | '2digits:sonar' | '2digits:storybook/setup' | '2digits:storybook/rules' | '2digits:storybook/disables' | '2digits:storybook/config' | '2digits:tailwind' | '2digits:tanstack' | '2digits:turbo' | '2digits:typescript/setup' | '2digits:typescript/rules' | '2digits:typescript/disables/dts' | '2digits:typescript/disables/test' | '2digits:typescript/disables/cjs' | '2digits:unicorn' | '2digits:yaml/setup' | '2digits:yaml/base' | '2digits:yaml/recommended' | '2digits:yaml/standard' | '2digits:yaml/prettier';
13016
13010
  //#endregion
13017
13011
  //#region src/types.d.ts
13018
13012
  type Rules = RuleOptions;
package/dist/index.mjs CHANGED
@@ -1 +1 @@
1
- import{FlatConfigComposer as e,renamePluginsInConfigs as t,renamePluginsInRules as n}from"eslint-flat-config-utils";import{findUp as r}from"find-up";import{isPackageExists as i}from"local-pkg";import a from"eslint-plugin-antfu";import o from"eslint-plugin-de-morgan";import s from"@eslint-community/eslint-plugin-eslint-comments";import c from"@eslint-community/eslint-plugin-eslint-comments/configs";import l from"@eslint/css";import{tailwindSyntax as u}from"@eslint/css/syntax";import{fixupPluginRules as d}from"@eslint/compat";import f from"eslint-config-flat-gitignore";import p from"@eslint/js";import ee from"@stylistic/eslint-plugin";import m from"globals";import te from"eslint-plugin-jsdoc";import h,{configs as g}from"eslint-plugin-jsonc";import ne from"jsonc-eslint-parser";import _ from"@eslint/markdown";import{mergeProcessors as re,processorPassThrough as v}from"eslint-merge-processors";import y from"eslint-plugin-n";import b from"eslint-plugin-regexp";import x from"eslint-plugin-sonarjs";import S from"eslint-plugin-unicorn";import ie from"eslint-plugin-yml";import ae from"yaml-eslint-parser";const C=`**/*.?([cm])[jt]s?(x)`,w=`**/*.?([cm])ts`,T=`**/*.?([cm])tsx`,oe=`**/*.stories.tsx`,se=`**/*.json`,E=`**/*.json5`,D=`**/*.jsonc`,O=`**/*.css`,k=`**/*.y?(a)ml`,A=`**/*.md`,j=`**/*.md/*.md`,M=`${A}/${C}`,N=`**/node_modules,**/dist,**/package-lock.json,**/yarn.lock,**/pnpm-lock.yaml,**/bun.lockb,**/bun.lock,**/output,**/coverage,**/temp,**/.temp,**/tmp,**/.tmp,**/.history,**/.vitepress/cache,**/.nuxt,**/.next,**/.vercel,**/.changeset,**/.idea,**/.cache,**/.output,**/.vite-inspect,**/.yarn,**/CHANGELOG*.md,**/*.min.*,**/LICENSE*,**/__snapshots__,**/auto-import?(s).d.ts,**/components.d.ts`.split(`,`);function P(){return[{files:[C],name:`2digits:antfu`,plugins:{antfu:a},rules:{"antfu/if-newline":`error`,"antfu/top-level-function":`error`}}]}function F(){return[{files:[C],name:`2digits:boolean`,plugins:{boolean:o},rules:{...o.configs.recommended.rules}}]}const I={"@next/next":`next`,"@eslint-react/naming-convention":`react-naming-convention`,"@eslint-react/hooks-extra":`react-hooks-extra`,"@eslint-react/dom":`react-dom`,"@eslint-react/web-api":`react-web-api`,"@eslint-react":`react-extra`,"react-hooks":`react-hooks`,"react-compiler":`react-compiler`,"@stylistic/eslint-plugin":`stylistic`,"@typescript-eslint":`ts`,node:`node`,"@eslint-community/eslint-comments":`comments`,storybook:`storybook`,turbo:`turbo`,jsdoc:`jsdoc`,unicorn:`unicorn`,tailwindcss:`tailwindcss`,"@tanstack/query":`tanstack`,"@2digits":`@2digits`,"@graphql-eslint":`gql`,sonarjs:`sonar`,drizzle:`drizzle`,"de-morgan":`boolean`},L=n(c.recommended.rules,I);function R(){return[{files:[C],name:`2digits:comments`,plugins:{comments:s},rules:{...L,"comments/no-unused-disable":`error`,"comments/disable-enable-pair":[`error`,{allowWholeFile:!0}]}}]}function z(){return[{name:`2digits:css`,files:[O],language:`css/css`,plugins:{css:l},languageOptions:{tolerant:!0,customSyntax:u},rules:{...l.configs.recommended.rules}}]}async function B(e){let t=await e;return t.default||t}async function V(e={}){let{overrides:t={},drizzleObjectName:n=[`drizzle`,`db`]}=e,r=await B(import(`eslint-plugin-drizzle`));return[{files:[C],name:`2digits:drizzle`,plugins:{drizzle:d(r)},rules:{"drizzle/enforce-update-with-where":[`error`,{drizzleObjectName:n}],"drizzle/enforce-delete-with-where":[`error`,{drizzleObjectName:n}],...t}}]}async function H(e={}){let{overrides:t={},files:r=[`**/*.graphql`,`**/*.gql`]}=e,[i,a]=await Promise.all([B(import(`@graphql-eslint/eslint-plugin`)),import(`graphql-config`).then(({loadConfig:e})=>e({throwOnEmpty:!1,throwOnMissing:!1}).then(e=>e?.getDefault().schema))]),o=i.configs[`flat/operations-recommended`].rules,s={};if(a)s=o;else for(let e of Object.keys(o)){let t=e.replace(`@graphql-eslint/`,``);if(t in i.rules&&(i.rules[t].meta.docs?.requiresSchema||i.rules[t].meta.docs?.requiresSiblings))continue;s[e]=o[e]}let c=n(s,I);return[{name:`2digits:graphql`,plugins:{gql:i},languageOptions:{parser:i.parser},files:r,rules:{...c,"gql/naming-convention":[`error`,{allowLeadingUnderscore:!0}],...t}}]}function U(e={}){let{gitIgnore:t,ignores:n=[]}=e;return[{ignores:[N,n].flat(),name:`2digits:ignores`},f({strict:!1,...t,name:`2digits:gitignore`})]}function W(e={}){let{overrides:t={}}=e;return[{files:[C],name:`2digits:javascript`,plugins:{stylistic:ee},languageOptions:{ecmaVersion:2022,globals:{...m.browser,...m.es2021,...m.node,document:`readonly`,navigator:`readonly`,window:`readonly`},parserOptions:{ecmaFeatures:{jsx:!0},ecmaVersion:2022,sourceType:`module`},sourceType:`module`},linterOptions:{reportUnusedDisableDirectives:!0},rules:{...p.configs.recommended.rules,"accessor-pairs":[`error`,{enforceForClassMembers:!0,setWithoutGet:!0}],"array-callback-return":`error`,"block-scoped-var":`error`,"constructor-super":`error`,"default-case-last":`error`,"dot-notation":[`error`,{allowKeywords:!0}],eqeqeq:[`error`,`smart`],"new-cap":[`error`,{capIsNew:!1,newIsCap:!0,properties:!0}],"no-alert":`error`,"no-array-constructor":`error`,"no-async-promise-executor":`error`,"no-caller":`error`,"no-case-declarations":`error`,"no-class-assign":`error`,"no-compare-neg-zero":`error`,"no-cond-assign":[`error`,`always`],"no-const-assign":`error`,"no-control-regex":`error`,"no-debugger":`error`,"no-delete-var":`error`,"no-dupe-args":`error`,"no-dupe-class-members":`error`,"no-dupe-keys":`error`,"no-duplicate-case":`error`,"no-empty":[`error`,{allowEmptyCatch:!0}],"no-empty-character-class":`error`,"no-empty-pattern":`error`,"no-eval":`error`,"no-ex-assign":`error`,"no-extend-native":`error`,"no-extra-bind":`error`,"no-extra-boolean-cast":`error`,"no-fallthrough":`error`,"no-func-assign":`error`,"no-global-assign":`error`,"no-implied-eval":`error`,"no-import-assign":`error`,"no-invalid-regexp":`error`,"no-irregular-whitespace":`error`,"no-iterator":`error`,"no-labels":[`error`,{allowLoop:!1,allowSwitch:!1}],"no-lone-blocks":`error`,"no-loss-of-precision":`error`,"no-misleading-character-class":`error`,"no-multi-str":`error`,"no-new":`error`,"no-new-func":`error`,"no-new-native-nonconstructor":`error`,"no-new-wrappers":`error`,"no-obj-calls":`error`,"no-octal":`error`,"no-octal-escape":`error`,"no-proto":`error`,"no-prototype-builtins":`error`,"no-redeclare":[`error`,{builtinGlobals:!1}],"no-regex-spaces":`error`,"no-restricted-globals":[`error`,{message:"Use `globalThis` instead.",name:`global`},{message:"Use `globalThis` instead.",name:`self`}],"no-restricted-properties":[`error`,{message:"Use `Object.getPrototypeOf` or `Object.setPrototypeOf` instead.",property:`__proto__`},{message:"Use `Object.defineProperty` instead.",property:`__defineGetter__`},{message:"Use `Object.defineProperty` instead.",property:`__defineSetter__`},{message:"Use `Object.getOwnPropertyDescriptor` instead.",property:`__lookupGetter__`},{message:"Use `Object.getOwnPropertyDescriptor` instead.",property:`__lookupSetter__`}],"no-restricted-syntax":[`error`,`DebuggerStatement`,`LabeledStatement`,`WithStatement`,`TSEnumDeclaration`,`TSExportAssignment`],"no-self-assign":[`error`,{props:!0}],"no-self-compare":`error`,"no-sequences":`error`,"no-shadow-restricted-names":`error`,"no-sparse-arrays":`error`,"no-template-curly-in-string":`error`,"no-this-before-super":`error`,"no-throw-literal":`error`,"no-undef":`error`,"no-undef-init":`error`,"no-unexpected-multiline":`error`,"no-unmodified-loop-condition":`error`,"no-unneeded-ternary":[`error`,{defaultAssignment:!1}],"no-unreachable":`error`,"no-unreachable-loop":`error`,"no-unsafe-finally":`error`,"no-unsafe-negation":`error`,"no-unused-expressions":[`error`,{allowShortCircuit:!0,allowTaggedTemplates:!0,allowTernary:!0}],"no-unused-vars":[`error`,{args:`none`,caughtErrors:`none`,ignoreRestSiblings:!0,vars:`all`}],"no-useless-backreference":`error`,"no-useless-call":`error`,"no-useless-catch":`error`,"no-useless-computed-key":`error`,"no-useless-constructor":`error`,"no-useless-rename":`error`,"no-var":`error`,"no-with":`error`,"object-shorthand":[`error`,`always`,{avoidQuotes:!0,ignoreConstructors:!1}],"one-var":[`error`,{initialized:`never`}],"prefer-arrow-callback":[`error`,{allowNamedFunctions:!0,allowUnboundThis:!0}],"prefer-const":[`error`,{destructuring:`all`,ignoreReadBeforeAssign:!0}],"prefer-exponentiation-operator":`error`,"prefer-promise-reject-errors":`error`,"prefer-regex-literals":[`error`,{disallowRedundantWrapping:!0}],"prefer-rest-params":`error`,"prefer-spread":`error`,"prefer-template":`error`,"symbol-description":`error`,"unicode-bom":[`error`,`never`],"use-isnan":[`error`,{enforceForIndexOf:!0,enforceForSwitchCase:!0}],"valid-typeof":[`error`,{requireStringLiterals:!0}],"vars-on-top":`error`,yoda:[`error`,`never`],"stylistic/padding-line-between-statements":[`error`,{blankLine:`always`,prev:[`const`,`let`],next:`*`},{blankLine:`any`,prev:[`const`,`let`],next:[`const`,`let`]},{blankLine:`always`,prev:`*`,next:`return`}],...t}}]}function G(){return[{files:[C],name:`2digits:jsdoc`,plugins:{jsdoc:te},rules:{"jsdoc/check-access":`error`,"jsdoc/check-param-names":`error`,"jsdoc/check-property-names":`error`,"jsdoc/check-types":`error`,"jsdoc/empty-tags":`error`,"jsdoc/implements-on-classes":`error`,"jsdoc/no-defaults":`error`,"jsdoc/no-multi-asterisks":`error`,"jsdoc/require-param-name":`error`,"jsdoc/require-property":`error`,"jsdoc/require-property-description":`error`,"jsdoc/require-property-name":`error`,"jsdoc/require-returns-check":`error`,"jsdoc/require-returns-description":`error`,"jsdoc/require-yields-check":`error`}}]}function ce(){return[...g[`flat/base`].map(e=>({...e,name:`2digits:jsonc/base`})),{name:`2digits:jsonc/json`,files:[se],...K,rules:{...q(g[`flat/recommended-with-json`])}},{name:`2digits:jsonc/jsonc`,files:[D],...K,rules:{...q(g[`flat/recommended-with-jsonc`])}},{name:`2digits:jsonc/json5`,files:[E],...K,rules:{...q(g[`flat/recommended-with-json5`])}},{name:`2digits:jsonc/package.json`,...K,files:[`**/package.json`],rules:{"jsonc/sort-array-values":[`error`,{order:{type:`asc`},pathPattern:`^files$`}],"jsonc/sort-keys":[`error`,{order:`$schema.publisher.name.displayName.version.private.description.funding.homepage.repository.bugs.categories.type.main.module.types.typesVersions.bin.files.exports.icon.unpkg.jsdelivr.sideEffects.activationEvents.contributes.scripts.keywords.author.license.workspaces.dependencies.devDependencies.peerDependencies.peerDependenciesMeta.optionalDependencies.packageManager.engines.pnpm.overrides.resolutions.husky.simple-git-hooks.lint-staged.eslintConfig.prettier`.split(`.`),pathPattern:`^$`},{order:{type:`asc`},pathPattern:`^(?:dev|peer|optional|bundled)?[Dd]ependencies(Meta)?$`},{order:[`types`,`import`,`module`,`require`,`default`],pathPattern:`^exports.*$`}]}},{name:`2digits:jsonc/tsconfig.json`,...K,files:[`**/tsconfig.json`,`**/tsconfig.*.json`,`**/tsconfig-*.json`,`**/jsconfig.json`,`**/jsconfig.*.json`,`**/jsconfig-*.json`],rules:{"jsonc/sort-keys":[`error`,{order:[`$schema`,`extends`,`compilerOptions`,`references`,`files`,`include`,`exclude`],pathPattern:`^$`},{order:`incremental.composite.tsBuildInfoFile.disableSourceOfProjectReferenceRedirect.disableSolutionSearching.disableReferencedProjectLoad.target.lib.jsx.experimentalDecorators.emitDecoratorMetadata.jsxFactory.jsxFragmentFactory.jsxImportSource.reactNamespace.noLib.useDefineForClassFields.moduleDetection.module.rootDir.moduleResolution.baseUrl.paths.rootDirs.typeRoots.types.allowUmdGlobalAccess.moduleSuffixes.allowImportingTsExtensions.resolvePackageJsonExports.resolvePackageJsonImports.customConditions.resolveJsonModule.allowArbitraryExtensions.noResolve.allowJs.checkJs.maxNodeModuleJsDepth.declaration.declarationMap.emitDeclarationOnly.sourceMap.inlineSourceMap.outFile.outDir.removeComments.noEmit.importHelpers.importsNotUsedAsValues.downlevelIteration.sourceRoot.mapRoot.inlineSources.emitBOM.newLine.stripInternal.noEmitHelpers.noEmitOnError.preserveConstEnums.declarationDir.preserveValueImports.isolatedModules.verbatimModuleSyntax.allowSyntheticDefaultImports.esModuleInterop.preserveSymlinks.forceConsistentCasingInFileNames.strict.strictBindCallApply.strictFunctionTypes.strictNullChecks.strictPropertyInitialization.allowUnreachableCode.allowUnusedLabels.alwaysStrict.exactOptionalPropertyTypes.noFallthroughCasesInSwitch.noImplicitAny.noImplicitOverride.noImplicitReturns.noImplicitThis.noPropertyAccessFromIndexSignature.noUncheckedIndexedAccess.noUnusedLocals.noUnusedParameters.useUnknownInCatchVariables.skipDefaultLibCheck.skipLibCheck`.split(`.`),pathPattern:`^compilerOptions$`}]}},...g[`flat/prettier`].map(e=>({...e,name:`2digits:jsonc/prettier`}))]}const K={languageOptions:{parser:ne},plugins:{jsonc:h}};function q(e){return Object.fromEntries(e.flatMap(({rules:e})=>Object.entries(e??{})))}const J=[A];function le(){return[{name:`2digits:markdown/setup`,plugins:{markdown:_}},{name:`2digits:markdown/processor`,files:J,language:`markdown/gfm`,ignores:[j],processor:re([_.processors.markdown,v])},{name:`2digits:markdown/parser`,files:J,language:`markdown/gfm`,languageOptions:{parser:ue}},{name:`2digits:markdown/rules`,files:J,language:`markdown/gfm`,rules:{"markdown/fenced-code-language":`error`,"markdown/heading-increment":`error`,"markdown/no-empty-links":`error`,"markdown/no-invalid-label-refs":`error`,"markdown/no-missing-label-refs":`error`}},{name:`2digits:markdown/disables`,files:[M],languageOptions:{parserOptions:{ecmaFeatures:{impliedStrict:!0}}},rules:{"no-alert":`off`,"no-console":`off`,"no-labels":`off`,"no-lone-blocks":`off`,"no-restricted-syntax":`off`,"no-undef":`off`,"no-unused-expressions":`off`,"no-unused-labels":`off`,"no-unused-vars":`off`,"node/prefer-global/process":`off`,"ts/consistent-type-imports":`off`,"ts/explicit-function-return-type":`off`,"ts/no-namespace":`off`,"ts/no-redeclare":`off`,"ts/no-require-imports":`off`,"ts/no-unused-expressions":`off`,"ts/no-unused-vars":`off`,"ts/no-use-before-define":`off`,"unicode-bom":`off`}}]}const ue={meta:{name:`parser-plain`},parseForESLint:e=>({ast:{body:[],comments:[],loc:{end:e.length,start:0},range:[0,e.length],tokens:[],type:`Program`},scopeManager:null,services:{isPlain:!0},visitorKeys:{Program:[]}})};async function de(e={}){let{files:t=[w,T],overrides:r={},parserOptions:i}=e,[a,o]=await Promise.all([B(import(`@next/eslint-plugin-next`)),B(import(`@typescript-eslint/parser`))]),s=n({...a.configs.recommended.rules,...a.configs[`core-web-vitals`].rules},I);return[{name:`2digits:next/setup`,plugins:{next:d(a)}},{name:`2digits:next/rules`,files:t,languageOptions:{parser:o,parserOptions:{ecmaFeatures:{jsx:!0},projectService:!0,...i},sourceType:`module`},rules:{...s,"next/no-html-link-for-pages":`off`,...r}}]}function fe(){return[{files:[C],name:`2digits:node`,settings:{node:{version:`>= 22.0.0`}},plugins:{node:y},rules:{"node/handle-callback-err":[`error`,`^(err|error)$`],"node/no-deprecated-api":`error`,"node/no-exports-assign":`error`,"node/no-new-require":`error`,"node/no-path-concat":`error`,"node/no-unsupported-features/node-builtins":[`error`,{allowExperimental:!0}],"node/prefer-global/buffer":`error`,"node/prefer-global/process":`error`,"node/prefer-global/text-encoder":`error`,"node/prefer-global/url":`error`,"node/prefer-global/console":`error`,"node/prefer-global/url-search-params":`error`,"node/prefer-global/text-decoder":`error`,"node/process-exit-as-throw":`error`}}]}async function pe(){let e=await B(import(`eslint-plugin-pnpm`));return[{name:`2digits:pnpm/package-json`,files:[`**/package.json`],languageOptions:{parser:await B(import(`jsonc-eslint-parser`))},plugins:{pnpm:e},rules:{"pnpm/json-enforce-catalog":`error`,"pnpm/json-prefer-workspace-settings":`error`,"pnpm/json-valid-catalog":`error`}},{name:`2digits:pnpm/pnpm-workspace-yaml`,files:[`pnpm-workspace.yaml`],languageOptions:{parser:await B(import(`yaml-eslint-parser`))},plugins:{pnpm:e},rules:{"pnpm/yaml-no-duplicate-catalog-item":`error`,"pnpm/yaml-no-unused-catalog-item":`error`}}]}async function me(){let[e,t]=await Promise.all([B(import(`eslint-config-prettier`)),B(import(`@stylistic/eslint-plugin`))]);return[{name:`2digits:prettier`,plugins:{stylistic:t},rules:{...e.rules,"tailwindcss/classnames-order":`off`,"stylistic/jsx-newline":[`error`,{prevent:!1}]}}]}async function he(e={}){let{files:t=[w,T],overrides:r={},parserOptions:i,tsconfigRootDir:a,reactCompiler:o=!0}=e,[s,c,l,u,d]=await Promise.all([B(import(`@eslint-react/eslint-plugin`)),B(import(`eslint-plugin-react-hooks`)),B(import(`@typescript-eslint/parser`)),o?B(import(`eslint-plugin-react-compiler`)):void 0,B(import(`@stylistic/eslint-plugin`))]),f=s.configs.all.plugins,p=n({...c.configs[`recommended-latest`].rules,...s.configs[`recommended-type-checked`].rules},I);return[{name:`2digits:react/setup`,plugins:{stylistic:d,"react-dom":f[`@eslint-react/dom`],"react-web-api":f[`@eslint-react/web-api`],"react-extra":f[`@eslint-react`],"react-hooks":c,"react-hooks-extra":f[`@eslint-react/hooks-extra`],"react-naming-convention":f[`@eslint-react/naming-convention`],...o?{"react-compiler":u}:{}},settings:{react:{version:`detect`}}},{name:`2digits:react/rules`,files:t,languageOptions:{parser:l,parserOptions:{ecmaFeatures:{jsx:!0},tsconfigRootDir:a,projectService:!0,...i},sourceType:`module`},rules:{...p,...o?{"react-compiler/react-compiler":`error`}:{},"react-hooks-extra/no-unnecessary-use-callback":`error`,"react-hooks-extra/prefer-use-state-lazy-initialization":`error`,"react-hooks-extra/no-redundant-custom-hook":`error`,"react-hooks-extra/no-unnecessary-use-memo":`error`,"react-extra/no-useless-fragment":`off`,"react-extra/prefer-read-only-props":`off`,"react-extra/prefer-shorthand-boolean":`error`,"react-extra/prefer-shorthand-fragment":`error`,"react-extra/prefer-react-namespace-import":`error`,"react-naming-convention/use-state":`error`,"stylistic/jsx-curly-newline":`off`,"stylistic/jsx-newline":[`error`,{prevent:!1}],"stylistic/jsx-self-closing-comp":`error`,...r}}]}function ge(){return[{files:[C],name:`2digits:regexp`,plugins:{regexp:b},rules:{...b.configs[`flat/recommended`].rules}}]}function _e(){return[{files:[C],name:`2digits:sonar`,plugins:{sonar:x},rules:{"sonar/code-eval":`error`,"sonar/cognitive-complexity":`error`,"sonar/comma-or-logical-or-case":`error`,"sonar/concise-regex":`error`,"sonar/confidential-information-logging":`error`,"sonar/constructor-for-side-effects":`error`,"sonar/content-length":`error`,"sonar/content-security-policy":`error`,"sonar/cookie-no-httponly":`error`,"sonar/cors":`error`,"sonar/csrf":`error`,"sonar/max-switch-cases":`error`,"sonar/no-all-duplicated-branches":`error`,"sonar/no-collapsible-if":`error`,"sonar/no-collection-size-mischeck":`error`,"sonar/no-duplicate-string":[`error`,{threshold:5}],"sonar/no-duplicated-branches":`error`,"sonar/no-element-overwrite":`error`,"sonar/no-empty-collection":`error`,"sonar/no-extra-arguments":`error`,"sonar/no-for-in-iterable":`error`,"sonar/no-gratuitous-expressions":`error`,"sonar/no-identical-conditions":`error`,"sonar/no-identical-expressions":`error`,"sonar/no-identical-functions":`error`,"sonar/no-ignored-return":`error`,"sonar/no-inverted-boolean-check":`error`,"sonar/no-nested-switch":`error`,"sonar/no-nested-template-literals":`error`,"sonar/no-one-iteration-loop":`error`,"sonar/no-redundant-boolean":`error`,"sonar/no-same-line-conditional":`error`,"sonar/no-small-switch":`error`,"sonar/no-unused-collection":`error`,"sonar/no-use-of-empty-return-value":`error`,"sonar/no-useless-catch":`error`,"sonar/non-existent-operator":`error`,"sonar/prefer-immediate-return":`error`,"sonar/prefer-object-literal":`error`,"sonar/prefer-single-boolean-return":`error`,"sonar/prefer-while":`error`,"sonar/elseif-without-else":`off`,"sonar/no-redundant-jump":`off`}}]}async function Y(e={}){let{files:t=[oe],overrides:n={},parserOptions:r,storybookDirectory:i=`.storybook`}=e,[a,o]=await Promise.all([B(import(`eslint-plugin-storybook`)),B(import(`@typescript-eslint/parser`))]),s={parser:o,parserOptions:{ecmaFeatures:{jsx:!0},projectService:!0,...r},sourceType:`module`};return[{name:`2digits:storybook/setup`,plugins:{storybook:d(a)}},{name:`2digits:storybook/rules`,files:t,languageOptions:s,rules:{"storybook/await-interactions":`error`,"storybook/context-in-play-function":`error`,"storybook/csf-component":`error`,"storybook/default-exports":`error`,"storybook/hierarchy-separator":`error`,"storybook/meta-inline-properties":`error`,"storybook/no-redundant-story-name":`error`,"storybook/no-stories-of":`error`,"storybook/no-title-property-in-meta":`error`,"storybook/no-uninstalled-addons":`error`,"storybook/prefer-pascal-case":`error`,"storybook/story-exports":`error`,"storybook/use-storybook-expect":`error`,"storybook/use-storybook-testing-library":`error`,"storybook/meta-satisfies-type":`error`,...n}},{name:`2digits:storybook/disables`,files:t,rules:{"react-hooks/rules-of-hooks":`off`,"react/display-name":`off`,"sonar/no-duplicate-string":`off`}},{name:`2digits:storybook/config`,files:[`${i}/main.@(js|cjs|mjs|ts)`],languageOptions:s,rules:{"storybook/no-uninstalled-addons":`error`}}]}async function ve(e={}){let{overrides:t={}}=e,[n,{tailwindFunctions:i},a]=await Promise.all([B(import(`eslint-plugin-tailwindcss`)),B(import(`@2digits/constants`)),r([`tailwind.config.ts`,`tailwind.config.js`])]);return[{files:[C],name:`2digits:tailwind`,plugins:{tailwindcss:n},settings:{tailwindcss:{callees:i,config:a}},rules:{...n.configs.recommended.rules,...t}}]}async function ye(e={}){let{overrides:t={}}=e,r=await B(import(`@tanstack/eslint-plugin-query`)),i=n(r.configs[`flat/recommended`].at(0)?.rules??{},I);return[{files:[C],name:`2digits:tanstack`,plugins:{tanstack:r},rules:{...i,...t}}]}async function be(e={}){let{overrides:t={}}=e,n=await B(import(`eslint-plugin-turbo`));return[{files:[C],name:`2digits:turbo`,plugins:{turbo:n},rules:{"turbo/no-undeclared-env-vars":`error`,...t}}]}async function xe(e={}){let{overrides:n={},parserOptions:r={}}=e,[{plugin:i,configs:a,parser:o},s]=await Promise.all([B(import(`typescript-eslint`)),B(import(`@2digits/eslint-plugin`))]),c=t(a.strictTypeChecked,I),l=Object.fromEntries(c.flatMap(({rules:e})=>Object.entries(e??{})));return[{name:`2digits:typescript/setup`,plugins:{ts:i,"@2digits":s}},{name:`2digits:typescript/rules`,files:[C],ignores:[M],languageOptions:{parser:o,parserOptions:{tsconfigRootDir:process.cwd(),projectService:!0,warnOnUnsupportedTypeScriptVersion:!1,...r},sourceType:`module`},rules:{...l,"ts/array-type":[`error`,{default:`generic`,readonly:`generic`}],"ts/restrict-template-expressions":[`error`,{allowNumber:!0}],"ts/ban-ts-comment":[`error`,{"ts-ignore":`allow-with-description`}],"ts/consistent-type-exports":[`error`],"ts/consistent-type-imports":[`error`,{prefer:`type-imports`,disallowTypeAnnotations:!1,fixStyle:`inline-type-imports`}],"ts/no-empty-object-type":[`error`,{allowInterfaces:`with-single-extends`,allowObjectTypes:`never`}],"ts/no-explicit-any":[`error`],"ts/no-import-type-side-effects":[`error`],"ts/no-misused-promises":`off`,"ts/no-confusing-void-expression":`off`,"ts/no-unused-vars":[`error`,{ignoreRestSiblings:!0,argsIgnorePattern:`^_`,varsIgnorePattern:`^_`}],"ts/unbound-method":`off`,...s.configs.recommended.rules,...n}},{name:`2digits:typescript/disables/dts`,files:[`**/*.d.ts`],ignores:[M],rules:{"unicorn/no-abusive-eslint-disable":`off`,"no-duplicate-imports":`off`,"no-restricted-syntax":`off`,"ts/no-unused-vars":`off`}},{name:`2digits:typescript/disables/test`,files:[`**/*.{test,spec}.ts?(x)`],ignores:[M],rules:{"no-unused-expressions":`off`}},{name:`2digits:typescript/disables/cjs`,files:[`**/*.js`,`**/*.cjs`,`**/*.cts`],ignores:[M],rules:{"ts/no-require-imports":`off`,"ts/no-var-requires":`off`}}]}function Se(){return[{files:[C],name:`2digits:unicorn`,plugins:{unicorn:S},rules:{...S.configs.recommended.rules,"unicorn/filename-case":[`off`],"unicorn/prefer-module":[`off`],"unicorn/prevent-abbreviations":[`off`],"unicorn/prefer-ternary":[`error`,`only-single-line`],"unicorn/no-useless-undefined":[`error`,{checkArguments:!1,checkArrowFunctionBody:!1}],"unicorn/prefer-top-level-await":[`off`]}}]}function Ce(){return[{name:`2digits:yaml/setup`,plugins:{yml:ie}},{name:`2digits:yaml/base`,...X,rules:{"no-irregular-whitespace":`off`,"no-unused-vars":`off`,"spaced-comment":`off`}},{name:`2digits:yaml/recommended`,...X,rules:{"yml/no-empty-document":`error`,"yml/no-empty-key":`error`,"yml/no-empty-mapping-value":`error`,"yml/no-empty-sequence-entry":`error`,"yml/no-irregular-whitespace":`error`,"yml/no-tab-indent":`error`,"yml/vue-custom-block/no-parsing-error":`error`}},{name:`2digits:yaml/standard`,...X,rules:{"yml/block-mapping":`error`,"yml/block-sequence":`error`,"yml/plain-scalar":`error`,"yml/spaced-comment":`error`}},{name:`2digits:yaml/pnpm-workspace`,...X,files:[`pnpm-workspace.yaml`],rules:{"yml/sort-keys":[`error`,{order:[`packages`,`overrides`,`patchedDependencies`,`hoistPattern`,`catalog`,`catalogs`,`allowedDeprecatedVersions`,`allowNonAppliedPatches`,`configDependencies`,`ignoredBuiltDependencies`,`ignoredOptionalDependencies`,`neverBuiltDependencies`,`onlyBuiltDependencies`,`onlyBuiltDependenciesFile`,`packageExtensions`,`peerDependencyRules`,`supportedArchitectures`],pathPattern:`^$`},{order:{type:`asc`},pathPattern:`.*`}]}},{name:`2digits:yaml/prettier`,...X,rules:{"yml/block-mapping-colon-indicator-newline":`off`,"yml/block-mapping-question-indicator-newline":`off`,"yml/block-sequence-hyphen-indicator-newline":`off`,"yml/flow-mapping-curly-newline":`off`,"yml/flow-mapping-curly-spacing":`off`,"yml/flow-sequence-bracket-newline":`off`,"yml/flow-sequence-bracket-spacing":`off`,"yml/indent":`off`,"yml/key-spacing":`off`,"yml/no-multiple-empty-lines":`off`,"yml/no-trailing-zeros":`off`,"yml/quotes":`off`}}]}const X={files:[k],languageOptions:{parser:ae}};function Z(e,t){return typeof e==`boolean`?e:e?.enable??t??!1}function Q(e){if(typeof e==`boolean`||e===void 0)return{};let{enable:t,...n}=e;return n}async function $(t={},...n){let a;t.pnpm===void 0&&(a=r(`pnpm-workspace.yaml`));let o=new e(U(t.ignores),W(t.js),F(),fe(),R(),G(),Se(),_e(),ge(),P(),ce(),z(),Ce(),le());Z(t.turbo,i(`turbo`))&&(o=o.append(be(Q(t.turbo))));let{overrides:s,...c}=Q(t.ts);return Z(t.ts,i(`typescript`))&&(o=o.append(xe(Q(t.ts)))),Z(t.react,i(`react`))&&(o=o.append(he({...Q(t.react),...c}))),Z(t.next,i(`next`))&&(o=o.append(de({...Q(t.next),...c}))),Z(t.storybook,i(`storybook`))&&(o=o.append(Y({...Q(t.storybook),...c}))),Z(t.tailwind,i(`tailwindcss`))&&(o=o.append(ve(Q(t.tailwind)))),Z(t.tanstack,i(`react-query`)||i(`@tanstack/react-query`)||i(`@tanstack/react-query-devtools`))&&(o=o.append(ye(Q(t.tanstack)))),Z(t.drizzle,i(`drizzle-kit`)||i(`drizzle-orm`))&&(o=o.append(V(Q(t.drizzle)))),Z(t.graphql,i(`graphql`))&&(o=o.append(H(Q(t.graphql)))),Z(t.pnpm,!!await a)&&(o=o.append(pe())),o=o.append(...n),i(`prettier`)&&(o=o.append(me())),o.renamePlugins(I).toConfigs()}export{$ as default,$ as twoDigits};
1
+ import{FlatConfigComposer as e,renamePluginsInConfigs as t,renamePluginsInRules as n}from"eslint-flat-config-utils";import{findUp as r}from"find-up";import{isPackageExists as i}from"local-pkg";import a from"eslint-plugin-antfu";import o from"eslint-plugin-de-morgan";import s from"@eslint-community/eslint-plugin-eslint-comments";import c from"@eslint-community/eslint-plugin-eslint-comments/configs";import l from"@eslint/css";import{tailwindSyntax as u}from"@eslint/css/syntax";import{fixupPluginRules as d}from"@eslint/compat";import f from"eslint-config-flat-gitignore";import p from"@eslint/js";import ee from"@stylistic/eslint-plugin";import m from"globals";import te from"eslint-plugin-jsdoc";import h,{configs as g}from"eslint-plugin-jsonc";import ne from"jsonc-eslint-parser";import _ from"@eslint/markdown";import{mergeProcessors as re,processorPassThrough as v}from"eslint-merge-processors";import y from"eslint-plugin-n";import b from"eslint-plugin-regexp";import x from"eslint-plugin-sonarjs";import S from"eslint-plugin-unicorn";import ie from"eslint-plugin-yml";import ae from"yaml-eslint-parser";const C=`**/*.?([cm])[jt]s?(x)`,w=`**/*.?([cm])ts`,T=`**/*.?([cm])tsx`,oe=`**/*.stories.tsx`,se=`**/*.json`,E=`**/*.json5`,D=`**/*.jsonc`,O=`**/*.css`,k=`**/*.y?(a)ml`,A=`**/*.md`,j=`**/*.md/*.md`,M=`${A}/${C}`,N=`**/node_modules,**/dist,**/package-lock.json,**/yarn.lock,**/pnpm-lock.yaml,**/bun.lockb,**/bun.lock,**/output,**/coverage,**/temp,**/.temp,**/tmp,**/.tmp,**/.history,**/.vitepress/cache,**/.nuxt,**/.next,**/.vercel,**/.changeset,**/.idea,**/.cache,**/.output,**/.vite-inspect,**/.yarn,**/CHANGELOG*.md,**/*.min.*,**/LICENSE*,**/__snapshots__,**/auto-import?(s).d.ts,**/components.d.ts`.split(`,`);function P(){return[{files:[C],name:`2digits:antfu`,plugins:{antfu:a},rules:{"antfu/if-newline":`error`,"antfu/top-level-function":`error`}}]}function F(){return[{files:[C],name:`2digits:boolean`,plugins:{boolean:o},rules:{...o.configs.recommended.rules}}]}const I={"@next/next":`next`,"@eslint-react/naming-convention":`react-naming-convention`,"@eslint-react/hooks-extra":`react-hooks-extra`,"@eslint-react/dom":`react-dom`,"@eslint-react/web-api":`react-web-api`,"@eslint-react":`react-extra`,"react-hooks":`react-hooks`,"react-compiler":`react-compiler`,"@stylistic/eslint-plugin":`stylistic`,"@typescript-eslint":`ts`,node:`node`,"@eslint-community/eslint-comments":`comments`,storybook:`storybook`,turbo:`turbo`,jsdoc:`jsdoc`,unicorn:`unicorn`,tailwindcss:`tailwindcss`,"@tanstack/query":`tanstack`,"@2digits":`@2digits`,"@graphql-eslint":`gql`,sonarjs:`sonar`,drizzle:`drizzle`,"de-morgan":`boolean`},L=n(c.recommended.rules,I);function R(){return[{files:[C],name:`2digits:comments`,plugins:{comments:s},rules:{...L,"comments/no-unused-disable":`error`,"comments/disable-enable-pair":[`error`,{allowWholeFile:!0}]}}]}function z(){return[{name:`2digits:css`,files:[O],language:`css/css`,plugins:{css:l},languageOptions:{tolerant:!0,customSyntax:u},rules:{...l.configs.recommended.rules}}]}async function B(e){let t=await e;return t.default||t}async function V(e={}){let{overrides:t={},drizzleObjectName:n=[`drizzle`,`db`]}=e,r=await B(import(`eslint-plugin-drizzle`));return[{files:[C],name:`2digits:drizzle`,plugins:{drizzle:d(r)},rules:{"drizzle/enforce-update-with-where":[`error`,{drizzleObjectName:n}],"drizzle/enforce-delete-with-where":[`error`,{drizzleObjectName:n}],...t}}]}async function H(e={}){let{overrides:t={},files:r=[`**/*.graphql`,`**/*.gql`]}=e,[i,a]=await Promise.all([B(import(`@graphql-eslint/eslint-plugin`)),import(`graphql-config`).then(({loadConfig:e})=>e({throwOnEmpty:!1,throwOnMissing:!1}).then(e=>e?.getDefault().schema))]),o=i.configs[`flat/operations-recommended`].rules,s={};if(a)s=o;else for(let e of Object.keys(o)){let t=e.replace(`@graphql-eslint/`,``);if(t in i.rules&&(i.rules[t].meta.docs?.requiresSchema||i.rules[t].meta.docs?.requiresSiblings))continue;s[e]=o[e]}let c=n(s,I);return[{name:`2digits:graphql`,plugins:{gql:i},languageOptions:{parser:i.parser},files:r,rules:{...c,"gql/naming-convention":[`error`,{allowLeadingUnderscore:!0}],...t}}]}function U(e={}){let{gitIgnore:t,ignores:n=[]}=e;return[{ignores:[N,n].flat(),name:`2digits:ignores`},f({strict:!1,...t,name:`2digits:gitignore`})]}function W(e={}){let{overrides:t={}}=e;return[{files:[C],name:`2digits:javascript`,plugins:{stylistic:ee},languageOptions:{ecmaVersion:2022,globals:{...m.browser,...m.es2021,...m.node,document:`readonly`,navigator:`readonly`,window:`readonly`},parserOptions:{ecmaFeatures:{jsx:!0},ecmaVersion:2022,sourceType:`module`},sourceType:`module`},linterOptions:{reportUnusedDisableDirectives:!0},rules:{...p.configs.recommended.rules,"accessor-pairs":[`error`,{enforceForClassMembers:!0,setWithoutGet:!0}],"array-callback-return":`error`,"block-scoped-var":`error`,"constructor-super":`error`,"default-case-last":`error`,"dot-notation":[`error`,{allowKeywords:!0}],eqeqeq:[`error`,`smart`],"new-cap":[`error`,{capIsNew:!1,newIsCap:!0,properties:!0}],"no-alert":`error`,"no-array-constructor":`error`,"no-async-promise-executor":`error`,"no-caller":`error`,"no-case-declarations":`error`,"no-class-assign":`error`,"no-compare-neg-zero":`error`,"no-cond-assign":[`error`,`always`],"no-const-assign":`error`,"no-control-regex":`error`,"no-debugger":`error`,"no-delete-var":`error`,"no-dupe-args":`error`,"no-dupe-class-members":`error`,"no-dupe-keys":`error`,"no-duplicate-case":`error`,"no-empty":[`error`,{allowEmptyCatch:!0}],"no-empty-character-class":`error`,"no-empty-pattern":`error`,"no-eval":`error`,"no-ex-assign":`error`,"no-extend-native":`error`,"no-extra-bind":`error`,"no-extra-boolean-cast":`error`,"no-fallthrough":`error`,"no-func-assign":`error`,"no-global-assign":`error`,"no-implied-eval":`error`,"no-import-assign":`error`,"no-invalid-regexp":`error`,"no-irregular-whitespace":`error`,"no-iterator":`error`,"no-labels":[`error`,{allowLoop:!1,allowSwitch:!1}],"no-lone-blocks":`error`,"no-loss-of-precision":`error`,"no-misleading-character-class":`error`,"no-multi-str":`error`,"no-new":`error`,"no-new-func":`error`,"no-new-native-nonconstructor":`error`,"no-new-wrappers":`error`,"no-obj-calls":`error`,"no-octal":`error`,"no-octal-escape":`error`,"no-proto":`error`,"no-prototype-builtins":`error`,"no-redeclare":[`error`,{builtinGlobals:!1}],"no-regex-spaces":`error`,"no-restricted-globals":[`error`,{message:"Use `globalThis` instead.",name:`global`},{message:"Use `globalThis` instead.",name:`self`}],"no-restricted-properties":[`error`,{message:"Use `Object.getPrototypeOf` or `Object.setPrototypeOf` instead.",property:`__proto__`},{message:"Use `Object.defineProperty` instead.",property:`__defineGetter__`},{message:"Use `Object.defineProperty` instead.",property:`__defineSetter__`},{message:"Use `Object.getOwnPropertyDescriptor` instead.",property:`__lookupGetter__`},{message:"Use `Object.getOwnPropertyDescriptor` instead.",property:`__lookupSetter__`}],"no-restricted-syntax":[`error`,`DebuggerStatement`,`LabeledStatement`,`WithStatement`,`TSEnumDeclaration`,`TSExportAssignment`],"no-self-assign":[`error`,{props:!0}],"no-self-compare":`error`,"no-sequences":`error`,"no-shadow-restricted-names":`error`,"no-sparse-arrays":`error`,"no-template-curly-in-string":`error`,"no-this-before-super":`error`,"no-throw-literal":`error`,"no-undef":`error`,"no-undef-init":`error`,"no-unexpected-multiline":`error`,"no-unmodified-loop-condition":`error`,"no-unneeded-ternary":[`error`,{defaultAssignment:!1}],"no-unreachable":`error`,"no-unreachable-loop":`error`,"no-unsafe-finally":`error`,"no-unsafe-negation":`error`,"no-unused-expressions":[`error`,{allowShortCircuit:!0,allowTaggedTemplates:!0,allowTernary:!0}],"no-unused-vars":[`error`,{args:`none`,caughtErrors:`none`,ignoreRestSiblings:!0,vars:`all`}],"no-useless-backreference":`error`,"no-useless-call":`error`,"no-useless-catch":`error`,"no-useless-computed-key":`error`,"no-useless-constructor":`error`,"no-useless-rename":`error`,"no-var":`error`,"no-with":`error`,"object-shorthand":[`error`,`always`,{avoidQuotes:!0,ignoreConstructors:!1}],"one-var":[`error`,{initialized:`never`}],"prefer-arrow-callback":[`error`,{allowNamedFunctions:!0,allowUnboundThis:!0}],"prefer-const":[`error`,{destructuring:`all`,ignoreReadBeforeAssign:!0}],"prefer-exponentiation-operator":`error`,"prefer-promise-reject-errors":`error`,"prefer-regex-literals":[`error`,{disallowRedundantWrapping:!0}],"prefer-rest-params":`error`,"prefer-spread":`error`,"prefer-template":`error`,"symbol-description":`error`,"unicode-bom":[`error`,`never`],"use-isnan":[`error`,{enforceForIndexOf:!0,enforceForSwitchCase:!0}],"valid-typeof":[`error`,{requireStringLiterals:!0}],"vars-on-top":`error`,yoda:[`error`,`never`],"stylistic/padding-line-between-statements":[`error`,{blankLine:`always`,prev:[`const`,`let`],next:`*`},{blankLine:`any`,prev:[`const`,`let`],next:[`const`,`let`]},{blankLine:`always`,prev:`*`,next:`return`}],...t}}]}function G(){return[{files:[C],name:`2digits:jsdoc`,plugins:{jsdoc:te},rules:{"jsdoc/check-access":`error`,"jsdoc/check-param-names":`error`,"jsdoc/check-property-names":`error`,"jsdoc/check-types":`error`,"jsdoc/empty-tags":`error`,"jsdoc/implements-on-classes":`error`,"jsdoc/no-defaults":`error`,"jsdoc/no-multi-asterisks":`error`,"jsdoc/require-param-name":`error`,"jsdoc/require-property":`error`,"jsdoc/require-property-description":`error`,"jsdoc/require-property-name":`error`,"jsdoc/require-returns-check":`error`,"jsdoc/require-returns-description":`error`,"jsdoc/require-yields-check":`error`}}]}function ce(){return[...g[`flat/base`].map(e=>({...e,name:`2digits:jsonc/base`})),{name:`2digits:jsonc/json`,files:[se],...K,rules:{...q(g[`flat/recommended-with-json`])}},{name:`2digits:jsonc/jsonc`,files:[D],...K,rules:{...q(g[`flat/recommended-with-jsonc`])}},{name:`2digits:jsonc/json5`,files:[E],...K,rules:{...q(g[`flat/recommended-with-json5`])}},{name:`2digits:jsonc/package.json`,...K,files:[`**/package.json`],rules:{"jsonc/sort-array-values":[`error`,{order:{type:`asc`},pathPattern:`^files$`}],"jsonc/sort-keys":[`error`,{order:`$schema.publisher.name.displayName.version.private.description.funding.homepage.repository.bugs.categories.type.main.module.types.typesVersions.bin.files.exports.icon.unpkg.jsdelivr.sideEffects.activationEvents.contributes.scripts.keywords.author.license.workspaces.dependencies.devDependencies.peerDependencies.peerDependenciesMeta.optionalDependencies.packageManager.engines.pnpm.overrides.resolutions.husky.simple-git-hooks.lint-staged.eslintConfig.prettier`.split(`.`),pathPattern:`^$`},{order:{type:`asc`},pathPattern:`^(?:dev|peer|optional|bundled)?[Dd]ependencies(Meta)?$`},{order:[`types`,`import`,`module`,`require`,`default`],pathPattern:`^exports.*$`}]}},{name:`2digits:jsonc/tsconfig.json`,...K,files:[`**/tsconfig.json`,`**/tsconfig.*.json`,`**/tsconfig-*.json`,`**/jsconfig.json`,`**/jsconfig.*.json`,`**/jsconfig-*.json`],rules:{"jsonc/sort-keys":[`error`,{order:[`$schema`,`extends`,`compilerOptions`,`references`,`files`,`include`,`exclude`],pathPattern:`^$`},{order:`incremental.composite.tsBuildInfoFile.disableSourceOfProjectReferenceRedirect.disableSolutionSearching.disableReferencedProjectLoad.target.lib.jsx.experimentalDecorators.emitDecoratorMetadata.jsxFactory.jsxFragmentFactory.jsxImportSource.reactNamespace.noLib.useDefineForClassFields.moduleDetection.module.rootDir.moduleResolution.baseUrl.paths.rootDirs.typeRoots.types.allowUmdGlobalAccess.moduleSuffixes.allowImportingTsExtensions.resolvePackageJsonExports.resolvePackageJsonImports.customConditions.resolveJsonModule.allowArbitraryExtensions.noResolve.allowJs.checkJs.maxNodeModuleJsDepth.declaration.declarationMap.emitDeclarationOnly.sourceMap.inlineSourceMap.outFile.outDir.removeComments.noEmit.importHelpers.importsNotUsedAsValues.downlevelIteration.sourceRoot.mapRoot.inlineSources.emitBOM.newLine.stripInternal.noEmitHelpers.noEmitOnError.preserveConstEnums.declarationDir.preserveValueImports.isolatedModules.verbatimModuleSyntax.allowSyntheticDefaultImports.esModuleInterop.preserveSymlinks.forceConsistentCasingInFileNames.strict.strictBindCallApply.strictFunctionTypes.strictNullChecks.strictPropertyInitialization.allowUnreachableCode.allowUnusedLabels.alwaysStrict.exactOptionalPropertyTypes.noFallthroughCasesInSwitch.noImplicitAny.noImplicitOverride.noImplicitReturns.noImplicitThis.noPropertyAccessFromIndexSignature.noUncheckedIndexedAccess.noUnusedLocals.noUnusedParameters.useUnknownInCatchVariables.skipDefaultLibCheck.skipLibCheck`.split(`.`),pathPattern:`^compilerOptions$`}]}},...g[`flat/prettier`].map(e=>({...e,name:`2digits:jsonc/prettier`}))]}const K={languageOptions:{parser:ne},plugins:{jsonc:h}};function q(e){return Object.fromEntries(e.flatMap(({rules:e})=>Object.entries(e??{})))}const J=[A];function le(){return[{name:`2digits:markdown/setup`,plugins:{markdown:_}},{name:`2digits:markdown/processor`,files:J,language:`markdown/gfm`,ignores:[j],processor:re([_.processors.markdown,v])},{name:`2digits:markdown/parser`,files:J,language:`markdown/gfm`,languageOptions:{parser:ue}},{name:`2digits:markdown/rules`,files:J,language:`markdown/gfm`,rules:{"markdown/fenced-code-language":`error`,"markdown/heading-increment":`error`,"markdown/no-empty-links":`error`,"markdown/no-invalid-label-refs":`error`,"markdown/no-missing-label-refs":`error`}},{name:`2digits:markdown/disables`,files:[M],languageOptions:{parserOptions:{ecmaFeatures:{impliedStrict:!0}}},rules:{"no-alert":`off`,"no-console":`off`,"no-labels":`off`,"no-lone-blocks":`off`,"no-restricted-syntax":`off`,"no-undef":`off`,"no-unused-expressions":`off`,"no-unused-labels":`off`,"no-unused-vars":`off`,"node/prefer-global/process":`off`,"ts/consistent-type-imports":`off`,"ts/explicit-function-return-type":`off`,"ts/no-namespace":`off`,"ts/no-redeclare":`off`,"ts/no-require-imports":`off`,"ts/no-unused-expressions":`off`,"ts/no-unused-vars":`off`,"ts/no-use-before-define":`off`,"unicode-bom":`off`}}]}const ue={meta:{name:`parser-plain`},parseForESLint:e=>({ast:{body:[],comments:[],loc:{end:e.length,start:0},range:[0,e.length],tokens:[],type:`Program`},scopeManager:null,services:{isPlain:!0},visitorKeys:{Program:[]}})};async function de(e={}){let{files:t=[w,T],overrides:r={},parserOptions:i}=e,[a,o]=await Promise.all([B(import(`@next/eslint-plugin-next`)),B(import(`@typescript-eslint/parser`))]),s=n({...a.configs.recommended.rules,...a.configs[`core-web-vitals`].rules},I);return[{name:`2digits:next/setup`,plugins:{next:d(a)}},{name:`2digits:next/rules`,files:t,languageOptions:{parser:o,parserOptions:{ecmaFeatures:{jsx:!0},projectService:!0,...i},sourceType:`module`},rules:{...s,"next/no-html-link-for-pages":`off`,...r}}]}function fe(){return[{files:[C],name:`2digits:node`,settings:{node:{version:`>= 22.0.0`}},plugins:{node:y},rules:{"node/handle-callback-err":[`error`,`^(err|error)$`],"node/no-deprecated-api":`error`,"node/no-exports-assign":`error`,"node/no-new-require":`error`,"node/no-path-concat":`error`,"node/no-unsupported-features/node-builtins":[`error`,{allowExperimental:!0}],"node/prefer-global/buffer":`error`,"node/prefer-global/process":`error`,"node/prefer-global/text-encoder":`error`,"node/prefer-global/url":`error`,"node/prefer-global/console":`error`,"node/prefer-global/url-search-params":`error`,"node/prefer-global/text-decoder":`error`,"node/process-exit-as-throw":`error`}}]}async function pe(){let e=await B(import(`eslint-plugin-pnpm`));return[{name:`2digits:pnpm/package-json`,files:[`**/package.json`],languageOptions:{parser:await B(import(`jsonc-eslint-parser`))},plugins:{pnpm:e},rules:{"pnpm/json-enforce-catalog":`error`,"pnpm/json-prefer-workspace-settings":`error`,"pnpm/json-valid-catalog":`error`}},{name:`2digits:pnpm/pnpm-workspace-yaml`,files:[`pnpm-workspace.yaml`],languageOptions:{parser:await B(import(`yaml-eslint-parser`))},plugins:{pnpm:e},rules:{"pnpm/yaml-no-duplicate-catalog-item":`error`,"pnpm/yaml-no-unused-catalog-item":`error`}}]}async function me(){let[e,t]=await Promise.all([B(import(`eslint-config-prettier`)),B(import(`@stylistic/eslint-plugin`))]);return[{name:`2digits:prettier`,plugins:{stylistic:t},rules:{...e.rules,"tailwindcss/classnames-order":`off`,"stylistic/jsx-newline":[`error`,{prevent:!1}]}}]}async function he(e={}){let{files:t=[w,T],overrides:r={},parserOptions:i,tsconfigRootDir:a,reactCompiler:o=!0}=e,[s,c,l,u,d]=await Promise.all([B(import(`@eslint-react/eslint-plugin`)),B(import(`eslint-plugin-react-hooks`)),B(import(`@typescript-eslint/parser`)),o?B(import(`eslint-plugin-react-compiler`)):void 0,B(import(`@stylistic/eslint-plugin`))]),f=s.configs.all.plugins,p=n({...c.configs[`recommended-latest`].rules,...s.configs[`recommended-type-checked`].rules},I);return[{name:`2digits:react/setup`,plugins:{stylistic:d,"react-dom":f[`@eslint-react/dom`],"react-web-api":f[`@eslint-react/web-api`],"react-extra":f[`@eslint-react`],"react-hooks":c,"react-hooks-extra":f[`@eslint-react/hooks-extra`],"react-naming-convention":f[`@eslint-react/naming-convention`],...o?{"react-compiler":u}:{}},settings:{react:{version:`detect`}}},{name:`2digits:react/rules`,files:t,languageOptions:{parser:l,parserOptions:{ecmaFeatures:{jsx:!0},tsconfigRootDir:a,projectService:!0,...i},sourceType:`module`},rules:{...p,...o?{"react-compiler/react-compiler":`error`}:{},"react-hooks-extra/no-unnecessary-use-callback":`error`,"react-hooks-extra/prefer-use-state-lazy-initialization":`error`,"react-hooks-extra/no-redundant-custom-hook":`error`,"react-hooks-extra/no-unnecessary-use-memo":`error`,"react-extra/no-useless-fragment":`off`,"react-extra/prefer-read-only-props":`off`,"react-extra/prefer-shorthand-boolean":`error`,"react-extra/prefer-shorthand-fragment":`error`,"react-extra/prefer-react-namespace-import":`error`,"react-naming-convention/use-state":`error`,"stylistic/jsx-curly-newline":`off`,"stylistic/jsx-newline":[`error`,{prevent:!1}],"stylistic/jsx-self-closing-comp":`error`,...r}}]}function ge(){return[{files:[C],name:`2digits:regexp`,plugins:{regexp:b},rules:{...b.configs[`flat/recommended`].rules}}]}function _e(){return[{files:[C],name:`2digits:sonar`,plugins:{sonar:x},rules:{"sonar/code-eval":`error`,"sonar/cognitive-complexity":`error`,"sonar/comma-or-logical-or-case":`error`,"sonar/concise-regex":`error`,"sonar/confidential-information-logging":`error`,"sonar/constructor-for-side-effects":`error`,"sonar/content-length":`error`,"sonar/content-security-policy":`error`,"sonar/cookie-no-httponly":`error`,"sonar/cors":`error`,"sonar/csrf":`error`,"sonar/max-switch-cases":`error`,"sonar/no-all-duplicated-branches":`error`,"sonar/no-collapsible-if":`error`,"sonar/no-collection-size-mischeck":`error`,"sonar/no-duplicate-string":[`error`,{threshold:5}],"sonar/no-duplicated-branches":`error`,"sonar/no-element-overwrite":`error`,"sonar/no-empty-collection":`error`,"sonar/no-extra-arguments":`error`,"sonar/no-for-in-iterable":`error`,"sonar/no-gratuitous-expressions":`error`,"sonar/no-identical-conditions":`error`,"sonar/no-identical-expressions":`error`,"sonar/no-identical-functions":`error`,"sonar/no-ignored-return":`error`,"sonar/no-inverted-boolean-check":`error`,"sonar/no-nested-switch":`error`,"sonar/no-nested-template-literals":`error`,"sonar/no-one-iteration-loop":`error`,"sonar/no-redundant-boolean":`error`,"sonar/no-same-line-conditional":`error`,"sonar/no-small-switch":`error`,"sonar/no-unused-collection":`error`,"sonar/no-use-of-empty-return-value":`error`,"sonar/no-useless-catch":`error`,"sonar/non-existent-operator":`error`,"sonar/prefer-immediate-return":`error`,"sonar/prefer-object-literal":`error`,"sonar/prefer-single-boolean-return":`error`,"sonar/prefer-while":`error`,"sonar/elseif-without-else":`off`,"sonar/no-redundant-jump":`off`}}]}async function Y(e={}){let{files:t=[oe],overrides:n={},parserOptions:r,storybookDirectory:i=`.storybook`}=e,[a,o]=await Promise.all([B(import(`eslint-plugin-storybook`)),B(import(`@typescript-eslint/parser`))]),s={parser:o,parserOptions:{ecmaFeatures:{jsx:!0},projectService:!0,...r},sourceType:`module`};return[{name:`2digits:storybook/setup`,plugins:{storybook:d(a)}},{name:`2digits:storybook/rules`,files:t,languageOptions:s,rules:{"storybook/await-interactions":`error`,"storybook/context-in-play-function":`error`,"storybook/csf-component":`error`,"storybook/default-exports":`error`,"storybook/hierarchy-separator":`error`,"storybook/meta-inline-properties":`error`,"storybook/no-redundant-story-name":`error`,"storybook/no-stories-of":`error`,"storybook/no-title-property-in-meta":`error`,"storybook/no-uninstalled-addons":`error`,"storybook/prefer-pascal-case":`error`,"storybook/story-exports":`error`,"storybook/use-storybook-expect":`error`,"storybook/use-storybook-testing-library":`error`,"storybook/meta-satisfies-type":`error`,...n}},{name:`2digits:storybook/disables`,files:t,rules:{"react-hooks/rules-of-hooks":`off`,"react/display-name":`off`,"sonar/no-duplicate-string":`off`}},{name:`2digits:storybook/config`,files:[`${i}/main.@(js|cjs|mjs|ts)`],languageOptions:s,rules:{"storybook/no-uninstalled-addons":`error`}}]}async function ve(e={}){let{overrides:t={}}=e,[n,{tailwindFunctions:i},a]=await Promise.all([B(import(`eslint-plugin-tailwindcss`)),B(import(`@2digits/constants`)),r([`tailwind.config.ts`,`tailwind.config.js`])]);return[{files:[C],name:`2digits:tailwind`,plugins:{tailwindcss:n},settings:{tailwindcss:{callees:i,config:a}},rules:{...n.configs.recommended.rules,...t}}]}async function ye(e={}){let{overrides:t={}}=e,r=await B(import(`@tanstack/eslint-plugin-query`)),i=n(r.configs[`flat/recommended`].at(0)?.rules??{},I);return[{files:[C],name:`2digits:tanstack`,plugins:{tanstack:r},rules:{...i,...t}}]}async function be(e={}){let{overrides:t={}}=e,n=await B(import(`eslint-plugin-turbo`));return[{files:[C],name:`2digits:turbo`,plugins:{turbo:n},rules:{"turbo/no-undeclared-env-vars":`error`,...t}}]}async function xe(e={}){let{overrides:n={},parserOptions:r={}}=e,[{plugin:i,configs:a,parser:o},s]=await Promise.all([B(import(`typescript-eslint`)),B(import(`@2digits/eslint-plugin`))]),c=t(a.strictTypeChecked,I),l=Object.fromEntries(c.flatMap(({rules:e})=>Object.entries(e??{})));return[{name:`2digits:typescript/setup`,plugins:{ts:i,"@2digits":s}},{name:`2digits:typescript/rules`,files:[C],ignores:[M],languageOptions:{parser:o,parserOptions:{tsconfigRootDir:process.cwd(),projectService:!0,warnOnUnsupportedTypeScriptVersion:!1,...r},sourceType:`module`},rules:{...l,"ts/array-type":[`error`,{default:`generic`,readonly:`generic`}],"ts/restrict-template-expressions":[`error`,{allowNumber:!0}],"ts/ban-ts-comment":[`error`,{"ts-ignore":`allow-with-description`}],"ts/consistent-type-exports":[`error`],"ts/consistent-type-imports":[`error`,{prefer:`type-imports`,disallowTypeAnnotations:!1,fixStyle:`inline-type-imports`}],"ts/no-empty-object-type":[`error`,{allowInterfaces:`with-single-extends`,allowObjectTypes:`never`}],"ts/no-explicit-any":[`error`],"ts/no-import-type-side-effects":[`error`],"ts/no-misused-promises":`off`,"ts/no-confusing-void-expression":`off`,"ts/no-unused-vars":[`error`,{ignoreRestSiblings:!0,argsIgnorePattern:`^_`,varsIgnorePattern:`^_`}],"ts/unbound-method":`off`,...s.configs.recommended.rules,...n}},{name:`2digits:typescript/disables/dts`,files:[`**/*.d.ts`],ignores:[M],rules:{"unicorn/no-abusive-eslint-disable":`off`,"no-duplicate-imports":`off`,"no-restricted-syntax":`off`,"ts/no-unused-vars":`off`}},{name:`2digits:typescript/disables/test`,files:[`**/*.{test,spec}.ts?(x)`],ignores:[M],rules:{"no-unused-expressions":`off`}},{name:`2digits:typescript/disables/cjs`,files:[`**/*.js`,`**/*.cjs`,`**/*.cts`],ignores:[M],rules:{"ts/no-require-imports":`off`,"ts/no-var-requires":`off`}}]}function Se(){return[{files:[C],name:`2digits:unicorn`,plugins:{unicorn:S},rules:{...S.configs.recommended.rules,"unicorn/filename-case":[`off`],"unicorn/prefer-module":[`off`],"unicorn/prevent-abbreviations":[`off`],"unicorn/prefer-ternary":[`error`,`only-single-line`],"unicorn/no-useless-undefined":[`error`,{checkArguments:!1,checkArrowFunctionBody:!1}],"unicorn/prefer-top-level-await":[`off`]}}]}function Ce(){return[{name:`2digits:yaml/setup`,plugins:{yml:ie}},{name:`2digits:yaml/base`,...X,rules:{"no-irregular-whitespace":`off`,"no-unused-vars":`off`,"spaced-comment":`off`}},{name:`2digits:yaml/recommended`,...X,rules:{"yml/no-empty-document":`error`,"yml/no-empty-key":`error`,"yml/no-empty-mapping-value":`error`,"yml/no-empty-sequence-entry":`error`,"yml/no-irregular-whitespace":`error`,"yml/no-tab-indent":`error`,"yml/vue-custom-block/no-parsing-error":`error`}},{name:`2digits:yaml/standard`,...X,rules:{"yml/block-mapping":`error`,"yml/block-sequence":`error`,"yml/plain-scalar":`error`,"yml/spaced-comment":`error`}},{name:`2digits:yaml/prettier`,...X,rules:{"yml/block-mapping-colon-indicator-newline":`off`,"yml/block-mapping-question-indicator-newline":`off`,"yml/block-sequence-hyphen-indicator-newline":`off`,"yml/flow-mapping-curly-newline":`off`,"yml/flow-mapping-curly-spacing":`off`,"yml/flow-sequence-bracket-newline":`off`,"yml/flow-sequence-bracket-spacing":`off`,"yml/indent":`off`,"yml/key-spacing":`off`,"yml/no-multiple-empty-lines":`off`,"yml/no-trailing-zeros":`off`,"yml/quotes":`off`}}]}const X={files:[k],languageOptions:{parser:ae}};function Z(e,t){return typeof e==`boolean`?e:e?.enable??t??!1}function Q(e){if(typeof e==`boolean`||e===void 0)return{};let{enable:t,...n}=e;return n}async function $(t={},...n){let a;t.pnpm===void 0&&(a=r(`pnpm-workspace.yaml`));let o=new e(U(t.ignores),W(t.js),F(),fe(),R(),G(),Se(),_e(),ge(),P(),ce(),z(),Ce(),le());Z(t.turbo,i(`turbo`))&&(o=o.append(be(Q(t.turbo))));let{overrides:s,...c}=Q(t.ts);return Z(t.ts,i(`typescript`))&&(o=o.append(xe(Q(t.ts)))),Z(t.react,i(`react`))&&(o=o.append(he({...Q(t.react),...c}))),Z(t.next,i(`next`))&&(o=o.append(de({...Q(t.next),...c}))),Z(t.storybook,i(`storybook`))&&(o=o.append(Y({...Q(t.storybook),...c}))),Z(t.tailwind,i(`tailwindcss`))&&(o=o.append(ve(Q(t.tailwind)))),Z(t.tanstack,i(`react-query`)||i(`@tanstack/react-query`)||i(`@tanstack/react-query-devtools`))&&(o=o.append(ye(Q(t.tanstack)))),Z(t.drizzle,i(`drizzle-kit`)||i(`drizzle-orm`))&&(o=o.append(V(Q(t.drizzle)))),Z(t.graphql,i(`graphql`))&&(o=o.append(H(Q(t.graphql)))),Z(t.pnpm,!!await a)&&(o=o.append(pe())),o=o.append(...n),i(`prettier`)&&(o=o.append(me())),o.renamePlugins(I).toConfigs()}export{$ as default,$ as twoDigits};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@2digits/eslint-config",
3
- "version": "4.6.5",
3
+ "version": "4.6.7",
4
4
  "description": "Effortlessly enforce best practices and catch errors with this comprehensive ESLint configuration for TypeScript, featuring popular plugins like @typescript-eslint, eslint-plugin-react, and eslint-plugin-unicorn.",
5
5
  "homepage": "https://2d-configs.vercel.app/",
6
6
  "repository": {
@@ -34,10 +34,10 @@
34
34
  "@eslint/markdown": "6.6.0",
35
35
  "@graphql-eslint/eslint-plugin": "4.4.0",
36
36
  "@next/eslint-plugin-next": "15.3.4",
37
- "@stylistic/eslint-plugin": "4.4.1",
38
- "@tanstack/eslint-plugin-query": "5.81.0",
39
- "@typescript-eslint/parser": "8.34.1",
40
- "@typescript-eslint/utils": "8.34.1",
37
+ "@stylistic/eslint-plugin": "5.0.0",
38
+ "@tanstack/eslint-plugin-query": "5.81.2",
39
+ "@typescript-eslint/parser": "8.35.0",
40
+ "@typescript-eslint/utils": "8.35.0",
41
41
  "eslint-config-flat-gitignore": "2.1.0",
42
42
  "eslint-config-prettier": "10.1.5",
43
43
  "eslint-flat-config-utils": "2.1.0",
@@ -45,7 +45,7 @@
45
45
  "eslint-plugin-antfu": "3.1.1",
46
46
  "eslint-plugin-de-morgan": "1.3.0",
47
47
  "eslint-plugin-drizzle": "0.2.3",
48
- "eslint-plugin-jsdoc": "51.1.1",
48
+ "eslint-plugin-jsdoc": "51.2.2",
49
49
  "eslint-plugin-jsonc": "2.20.1",
50
50
  "eslint-plugin-n": "17.20.0",
51
51
  "eslint-plugin-pnpm": "0.3.1",
@@ -63,14 +63,13 @@
63
63
  "graphql-config": "5.1.5",
64
64
  "jsonc-eslint-parser": "2.4.0",
65
65
  "local-pkg": "1.1.1",
66
- "typescript-eslint": "8.34.1",
66
+ "typescript-eslint": "8.35.0",
67
67
  "yaml-eslint-parser": "1.3.0",
68
- "@2digits/constants": "1.1.1",
69
- "@2digits/eslint-plugin": "3.1.3"
68
+ "@2digits/constants": "1.1.2",
69
+ "@2digits/eslint-plugin": "3.1.5"
70
70
  },
71
71
  "devDependencies": {
72
72
  "@eslint/config-inspector": "1.1.0",
73
- "@types/node": "22.15.32",
74
73
  "@types/react": "19.1.8",
75
74
  "dedent": "1.6.0",
76
75
  "eslint": "9.29.0",
@@ -81,7 +80,7 @@
81
80
  "tsdown": "0.12.8",
82
81
  "typescript": "5.8.3",
83
82
  "vitest": "3.2.4",
84
- "@2digits/tsconfig": "0.7.1"
83
+ "@2digits/tsconfig": "0.8.0"
85
84
  },
86
85
  "scripts": {
87
86
  "build": "tsdown --minify",