@2digits/eslint-config 2.7.6 → 2.8.0
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.cjs +23 -20
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +544 -5
- package/dist/index.d.ts +544 -5
- package/dist/index.js +7 -6
- package/dist/index.js.map +1 -1
- package/package.json +7 -6
package/dist/index.d.ts
CHANGED
|
@@ -2680,12 +2680,17 @@ Backward pagination arguments
|
|
|
2680
2680
|
* disallow unnecessary fragments
|
|
2681
2681
|
* @see https://eslint-react.xyz/docs/rules/no-useless-fragment
|
|
2682
2682
|
*/
|
|
2683
|
-
'react-extra/no-useless-fragment'?: Linter.RuleEntry<
|
|
2683
|
+
'react-extra/no-useless-fragment'?: Linter.RuleEntry<ReactExtraNoUselessFragment>
|
|
2684
2684
|
/**
|
|
2685
2685
|
* enforce using destructuring assignment in component props and context
|
|
2686
2686
|
* @see https://eslint-react.xyz/docs/rules/prefer-destructuring-assignment
|
|
2687
2687
|
*/
|
|
2688
2688
|
'react-extra/prefer-destructuring-assignment'?: Linter.RuleEntry<[]>
|
|
2689
|
+
/**
|
|
2690
|
+
* enforce React is imported via a namespace import
|
|
2691
|
+
* @see https://eslint-react.xyz/docs/rules/prefer-react-namespace-import
|
|
2692
|
+
*/
|
|
2693
|
+
'react-extra/prefer-react-namespace-import'?: Linter.RuleEntry<[]>
|
|
2689
2694
|
/**
|
|
2690
2695
|
* enforce read-only props in components
|
|
2691
2696
|
* @see https://eslint-react.xyz/docs/rules/prefer-read-only-props
|
|
@@ -2717,8 +2722,8 @@ Backward pagination arguments
|
|
|
2717
2722
|
*/
|
|
2718
2723
|
'react-hooks-extra/no-direct-set-state-in-use-effect'?: Linter.RuleEntry<[]>
|
|
2719
2724
|
/**
|
|
2720
|
-
* disallow direct calls to the 'set' function of 'useState' in '
|
|
2721
|
-
* @see https://eslint-react.xyz/docs/rules/hooks-extra-no-direct-set-state-in-use-effect
|
|
2725
|
+
* disallow direct calls to the 'set' function of 'useState' in 'useLayoutEffect'
|
|
2726
|
+
* @see https://eslint-react.xyz/docs/rules/hooks-extra-no-direct-set-state-in-use-layout-effect
|
|
2722
2727
|
*/
|
|
2723
2728
|
'react-hooks-extra/no-direct-set-state-in-use-layout-effect'?: Linter.RuleEntry<[]>
|
|
2724
2729
|
/**
|
|
@@ -3308,6 +3313,416 @@ Backward pagination arguments
|
|
|
3308
3313
|
* @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/void-dom-elements-no-children.md
|
|
3309
3314
|
*/
|
|
3310
3315
|
'react/void-dom-elements-no-children'?: Linter.RuleEntry<[]>
|
|
3316
|
+
/**
|
|
3317
|
+
* disallow confusing quantifiers
|
|
3318
|
+
* @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/confusing-quantifier.html
|
|
3319
|
+
*/
|
|
3320
|
+
'regexp/confusing-quantifier'?: Linter.RuleEntry<[]>
|
|
3321
|
+
/**
|
|
3322
|
+
* enforce consistent escaping of control characters
|
|
3323
|
+
* @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/control-character-escape.html
|
|
3324
|
+
*/
|
|
3325
|
+
'regexp/control-character-escape'?: Linter.RuleEntry<[]>
|
|
3326
|
+
/**
|
|
3327
|
+
* enforce single grapheme in string literal
|
|
3328
|
+
* @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/grapheme-string-literal.html
|
|
3329
|
+
*/
|
|
3330
|
+
'regexp/grapheme-string-literal'?: Linter.RuleEntry<[]>
|
|
3331
|
+
/**
|
|
3332
|
+
* enforce consistent usage of hexadecimal escape
|
|
3333
|
+
* @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/hexadecimal-escape.html
|
|
3334
|
+
*/
|
|
3335
|
+
'regexp/hexadecimal-escape'?: Linter.RuleEntry<RegexpHexadecimalEscape>
|
|
3336
|
+
/**
|
|
3337
|
+
* enforce into your favorite case
|
|
3338
|
+
* @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/letter-case.html
|
|
3339
|
+
*/
|
|
3340
|
+
'regexp/letter-case'?: Linter.RuleEntry<RegexpLetterCase>
|
|
3341
|
+
/**
|
|
3342
|
+
* enforce match any character style
|
|
3343
|
+
* @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/match-any.html
|
|
3344
|
+
*/
|
|
3345
|
+
'regexp/match-any'?: Linter.RuleEntry<RegexpMatchAny>
|
|
3346
|
+
/**
|
|
3347
|
+
* enforce use of escapes on negation
|
|
3348
|
+
* @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/negation.html
|
|
3349
|
+
*/
|
|
3350
|
+
'regexp/negation'?: Linter.RuleEntry<[]>
|
|
3351
|
+
/**
|
|
3352
|
+
* disallow elements that contradict assertions
|
|
3353
|
+
* @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/no-contradiction-with-assertion.html
|
|
3354
|
+
*/
|
|
3355
|
+
'regexp/no-contradiction-with-assertion'?: Linter.RuleEntry<[]>
|
|
3356
|
+
/**
|
|
3357
|
+
* disallow control characters
|
|
3358
|
+
* @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/no-control-character.html
|
|
3359
|
+
*/
|
|
3360
|
+
'regexp/no-control-character'?: Linter.RuleEntry<[]>
|
|
3361
|
+
/**
|
|
3362
|
+
* disallow duplicate characters in the RegExp character class
|
|
3363
|
+
* @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/no-dupe-characters-character-class.html
|
|
3364
|
+
*/
|
|
3365
|
+
'regexp/no-dupe-characters-character-class'?: Linter.RuleEntry<[]>
|
|
3366
|
+
/**
|
|
3367
|
+
* disallow duplicate disjunctions
|
|
3368
|
+
* @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/no-dupe-disjunctions.html
|
|
3369
|
+
*/
|
|
3370
|
+
'regexp/no-dupe-disjunctions'?: Linter.RuleEntry<RegexpNoDupeDisjunctions>
|
|
3371
|
+
/**
|
|
3372
|
+
* disallow alternatives without elements
|
|
3373
|
+
* @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/no-empty-alternative.html
|
|
3374
|
+
*/
|
|
3375
|
+
'regexp/no-empty-alternative'?: Linter.RuleEntry<[]>
|
|
3376
|
+
/**
|
|
3377
|
+
* disallow capturing group that captures empty.
|
|
3378
|
+
* @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/no-empty-capturing-group.html
|
|
3379
|
+
*/
|
|
3380
|
+
'regexp/no-empty-capturing-group'?: Linter.RuleEntry<[]>
|
|
3381
|
+
/**
|
|
3382
|
+
* disallow character classes that match no characters
|
|
3383
|
+
* @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/no-empty-character-class.html
|
|
3384
|
+
*/
|
|
3385
|
+
'regexp/no-empty-character-class'?: Linter.RuleEntry<[]>
|
|
3386
|
+
/**
|
|
3387
|
+
* disallow empty group
|
|
3388
|
+
* @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/no-empty-group.html
|
|
3389
|
+
*/
|
|
3390
|
+
'regexp/no-empty-group'?: Linter.RuleEntry<[]>
|
|
3391
|
+
/**
|
|
3392
|
+
* disallow empty lookahead assertion or empty lookbehind assertion
|
|
3393
|
+
* @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/no-empty-lookarounds-assertion.html
|
|
3394
|
+
*/
|
|
3395
|
+
'regexp/no-empty-lookarounds-assertion'?: Linter.RuleEntry<[]>
|
|
3396
|
+
/**
|
|
3397
|
+
* disallow empty string literals in character classes
|
|
3398
|
+
* @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/no-empty-string-literal.html
|
|
3399
|
+
*/
|
|
3400
|
+
'regexp/no-empty-string-literal'?: Linter.RuleEntry<[]>
|
|
3401
|
+
/**
|
|
3402
|
+
* disallow escape backspace (`[\b]`)
|
|
3403
|
+
* @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/no-escape-backspace.html
|
|
3404
|
+
*/
|
|
3405
|
+
'regexp/no-escape-backspace'?: Linter.RuleEntry<[]>
|
|
3406
|
+
/**
|
|
3407
|
+
* disallow unnecessary nested lookaround assertions
|
|
3408
|
+
* @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/no-extra-lookaround-assertions.html
|
|
3409
|
+
*/
|
|
3410
|
+
'regexp/no-extra-lookaround-assertions'?: Linter.RuleEntry<[]>
|
|
3411
|
+
/**
|
|
3412
|
+
* disallow invalid regular expression strings in `RegExp` constructors
|
|
3413
|
+
* @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/no-invalid-regexp.html
|
|
3414
|
+
*/
|
|
3415
|
+
'regexp/no-invalid-regexp'?: Linter.RuleEntry<[]>
|
|
3416
|
+
/**
|
|
3417
|
+
* disallow invisible raw character
|
|
3418
|
+
* @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/no-invisible-character.html
|
|
3419
|
+
*/
|
|
3420
|
+
'regexp/no-invisible-character'?: Linter.RuleEntry<[]>
|
|
3421
|
+
/**
|
|
3422
|
+
* disallow lazy quantifiers at the end of an expression
|
|
3423
|
+
* @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/no-lazy-ends.html
|
|
3424
|
+
*/
|
|
3425
|
+
'regexp/no-lazy-ends'?: Linter.RuleEntry<RegexpNoLazyEnds>
|
|
3426
|
+
/**
|
|
3427
|
+
* disallow legacy RegExp features
|
|
3428
|
+
* @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/no-legacy-features.html
|
|
3429
|
+
*/
|
|
3430
|
+
'regexp/no-legacy-features'?: Linter.RuleEntry<RegexpNoLegacyFeatures>
|
|
3431
|
+
/**
|
|
3432
|
+
* disallow capturing groups that do not behave as one would expect
|
|
3433
|
+
* @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/no-misleading-capturing-group.html
|
|
3434
|
+
*/
|
|
3435
|
+
'regexp/no-misleading-capturing-group'?: Linter.RuleEntry<RegexpNoMisleadingCapturingGroup>
|
|
3436
|
+
/**
|
|
3437
|
+
* disallow multi-code-point characters in character classes and quantifiers
|
|
3438
|
+
* @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/no-misleading-unicode-character.html
|
|
3439
|
+
*/
|
|
3440
|
+
'regexp/no-misleading-unicode-character'?: Linter.RuleEntry<RegexpNoMisleadingUnicodeCharacter>
|
|
3441
|
+
/**
|
|
3442
|
+
* disallow missing `g` flag in patterns used in `String#matchAll` and `String#replaceAll`
|
|
3443
|
+
* @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/no-missing-g-flag.html
|
|
3444
|
+
*/
|
|
3445
|
+
'regexp/no-missing-g-flag'?: Linter.RuleEntry<RegexpNoMissingGFlag>
|
|
3446
|
+
/**
|
|
3447
|
+
* disallow non-standard flags
|
|
3448
|
+
* @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/no-non-standard-flag.html
|
|
3449
|
+
*/
|
|
3450
|
+
'regexp/no-non-standard-flag'?: Linter.RuleEntry<[]>
|
|
3451
|
+
/**
|
|
3452
|
+
* disallow obscure character ranges
|
|
3453
|
+
* @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/no-obscure-range.html
|
|
3454
|
+
*/
|
|
3455
|
+
'regexp/no-obscure-range'?: Linter.RuleEntry<RegexpNoObscureRange>
|
|
3456
|
+
/**
|
|
3457
|
+
* disallow octal escape sequence
|
|
3458
|
+
* @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/no-octal.html
|
|
3459
|
+
*/
|
|
3460
|
+
'regexp/no-octal'?: Linter.RuleEntry<[]>
|
|
3461
|
+
/**
|
|
3462
|
+
* disallow optional assertions
|
|
3463
|
+
* @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/no-optional-assertion.html
|
|
3464
|
+
*/
|
|
3465
|
+
'regexp/no-optional-assertion'?: Linter.RuleEntry<[]>
|
|
3466
|
+
/**
|
|
3467
|
+
* disallow backreferences that reference a group that might not be matched
|
|
3468
|
+
* @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/no-potentially-useless-backreference.html
|
|
3469
|
+
*/
|
|
3470
|
+
'regexp/no-potentially-useless-backreference'?: Linter.RuleEntry<[]>
|
|
3471
|
+
/**
|
|
3472
|
+
* disallow standalone backslashes (`\`)
|
|
3473
|
+
* @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/no-standalone-backslash.html
|
|
3474
|
+
*/
|
|
3475
|
+
'regexp/no-standalone-backslash'?: Linter.RuleEntry<[]>
|
|
3476
|
+
/**
|
|
3477
|
+
* disallow exponential and polynomial backtracking
|
|
3478
|
+
* @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/no-super-linear-backtracking.html
|
|
3479
|
+
*/
|
|
3480
|
+
'regexp/no-super-linear-backtracking'?: Linter.RuleEntry<RegexpNoSuperLinearBacktracking>
|
|
3481
|
+
/**
|
|
3482
|
+
* disallow quantifiers that cause quadratic moves
|
|
3483
|
+
* @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/no-super-linear-move.html
|
|
3484
|
+
*/
|
|
3485
|
+
'regexp/no-super-linear-move'?: Linter.RuleEntry<RegexpNoSuperLinearMove>
|
|
3486
|
+
/**
|
|
3487
|
+
* disallow trivially nested assertions
|
|
3488
|
+
* @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/no-trivially-nested-assertion.html
|
|
3489
|
+
*/
|
|
3490
|
+
'regexp/no-trivially-nested-assertion'?: Linter.RuleEntry<[]>
|
|
3491
|
+
/**
|
|
3492
|
+
* disallow nested quantifiers that can be rewritten as one quantifier
|
|
3493
|
+
* @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/no-trivially-nested-quantifier.html
|
|
3494
|
+
*/
|
|
3495
|
+
'regexp/no-trivially-nested-quantifier'?: Linter.RuleEntry<[]>
|
|
3496
|
+
/**
|
|
3497
|
+
* disallow unused capturing group
|
|
3498
|
+
* @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/no-unused-capturing-group.html
|
|
3499
|
+
*/
|
|
3500
|
+
'regexp/no-unused-capturing-group'?: Linter.RuleEntry<RegexpNoUnusedCapturingGroup>
|
|
3501
|
+
/**
|
|
3502
|
+
* disallow assertions that are known to always accept (or reject)
|
|
3503
|
+
* @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/no-useless-assertions.html
|
|
3504
|
+
*/
|
|
3505
|
+
'regexp/no-useless-assertions'?: Linter.RuleEntry<[]>
|
|
3506
|
+
/**
|
|
3507
|
+
* disallow useless backreferences in regular expressions
|
|
3508
|
+
* @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/no-useless-backreference.html
|
|
3509
|
+
*/
|
|
3510
|
+
'regexp/no-useless-backreference'?: Linter.RuleEntry<[]>
|
|
3511
|
+
/**
|
|
3512
|
+
* disallow character class with one character
|
|
3513
|
+
* @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/no-useless-character-class.html
|
|
3514
|
+
*/
|
|
3515
|
+
'regexp/no-useless-character-class'?: Linter.RuleEntry<RegexpNoUselessCharacterClass>
|
|
3516
|
+
/**
|
|
3517
|
+
* disallow useless `$` replacements in replacement string
|
|
3518
|
+
* @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/no-useless-dollar-replacements.html
|
|
3519
|
+
*/
|
|
3520
|
+
'regexp/no-useless-dollar-replacements'?: Linter.RuleEntry<[]>
|
|
3521
|
+
/**
|
|
3522
|
+
* disallow unnecessary escape characters in RegExp
|
|
3523
|
+
* @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/no-useless-escape.html
|
|
3524
|
+
*/
|
|
3525
|
+
'regexp/no-useless-escape'?: Linter.RuleEntry<[]>
|
|
3526
|
+
/**
|
|
3527
|
+
* disallow unnecessary regex flags
|
|
3528
|
+
* @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/no-useless-flag.html
|
|
3529
|
+
*/
|
|
3530
|
+
'regexp/no-useless-flag'?: Linter.RuleEntry<RegexpNoUselessFlag>
|
|
3531
|
+
/**
|
|
3532
|
+
* disallow unnecessarily non-greedy quantifiers
|
|
3533
|
+
* @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/no-useless-lazy.html
|
|
3534
|
+
*/
|
|
3535
|
+
'regexp/no-useless-lazy'?: Linter.RuleEntry<[]>
|
|
3536
|
+
/**
|
|
3537
|
+
* disallow unnecessary non-capturing group
|
|
3538
|
+
* @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/no-useless-non-capturing-group.html
|
|
3539
|
+
*/
|
|
3540
|
+
'regexp/no-useless-non-capturing-group'?: Linter.RuleEntry<RegexpNoUselessNonCapturingGroup>
|
|
3541
|
+
/**
|
|
3542
|
+
* disallow quantifiers that can be removed
|
|
3543
|
+
* @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/no-useless-quantifier.html
|
|
3544
|
+
*/
|
|
3545
|
+
'regexp/no-useless-quantifier'?: Linter.RuleEntry<[]>
|
|
3546
|
+
/**
|
|
3547
|
+
* disallow unnecessary character ranges
|
|
3548
|
+
* @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/no-useless-range.html
|
|
3549
|
+
*/
|
|
3550
|
+
'regexp/no-useless-range'?: Linter.RuleEntry<[]>
|
|
3551
|
+
/**
|
|
3552
|
+
* disallow unnecessary elements in expression character classes
|
|
3553
|
+
* @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/no-useless-set-operand.html
|
|
3554
|
+
*/
|
|
3555
|
+
'regexp/no-useless-set-operand'?: Linter.RuleEntry<[]>
|
|
3556
|
+
/**
|
|
3557
|
+
* disallow string disjunction of single characters in `\q{...}`
|
|
3558
|
+
* @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/no-useless-string-literal.html
|
|
3559
|
+
*/
|
|
3560
|
+
'regexp/no-useless-string-literal'?: Linter.RuleEntry<[]>
|
|
3561
|
+
/**
|
|
3562
|
+
* disallow unnecessary `{n,m}` quantifier
|
|
3563
|
+
* @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/no-useless-two-nums-quantifier.html
|
|
3564
|
+
*/
|
|
3565
|
+
'regexp/no-useless-two-nums-quantifier'?: Linter.RuleEntry<[]>
|
|
3566
|
+
/**
|
|
3567
|
+
* disallow quantifiers with a maximum of zero
|
|
3568
|
+
* @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/no-zero-quantifier.html
|
|
3569
|
+
*/
|
|
3570
|
+
'regexp/no-zero-quantifier'?: Linter.RuleEntry<[]>
|
|
3571
|
+
/**
|
|
3572
|
+
* disallow the alternatives of lookarounds that end with a non-constant quantifier
|
|
3573
|
+
* @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/optimal-lookaround-quantifier.html
|
|
3574
|
+
*/
|
|
3575
|
+
'regexp/optimal-lookaround-quantifier'?: Linter.RuleEntry<[]>
|
|
3576
|
+
/**
|
|
3577
|
+
* require optimal quantifiers for concatenated quantifiers
|
|
3578
|
+
* @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/optimal-quantifier-concatenation.html
|
|
3579
|
+
*/
|
|
3580
|
+
'regexp/optimal-quantifier-concatenation'?: Linter.RuleEntry<RegexpOptimalQuantifierConcatenation>
|
|
3581
|
+
/**
|
|
3582
|
+
* enforce using character class
|
|
3583
|
+
* @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/prefer-character-class.html
|
|
3584
|
+
*/
|
|
3585
|
+
'regexp/prefer-character-class'?: Linter.RuleEntry<RegexpPreferCharacterClass>
|
|
3586
|
+
/**
|
|
3587
|
+
* enforce using `\d`
|
|
3588
|
+
* @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/prefer-d.html
|
|
3589
|
+
*/
|
|
3590
|
+
'regexp/prefer-d'?: Linter.RuleEntry<RegexpPreferD>
|
|
3591
|
+
/**
|
|
3592
|
+
* enforces escape of replacement `$` character (`$$`).
|
|
3593
|
+
* @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/prefer-escape-replacement-dollar-char.html
|
|
3594
|
+
*/
|
|
3595
|
+
'regexp/prefer-escape-replacement-dollar-char'?: Linter.RuleEntry<[]>
|
|
3596
|
+
/**
|
|
3597
|
+
* prefer lookarounds over capturing group that do not replace
|
|
3598
|
+
* @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/prefer-lookaround.html
|
|
3599
|
+
*/
|
|
3600
|
+
'regexp/prefer-lookaround'?: Linter.RuleEntry<RegexpPreferLookaround>
|
|
3601
|
+
/**
|
|
3602
|
+
* enforce using named backreferences
|
|
3603
|
+
* @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/prefer-named-backreference.html
|
|
3604
|
+
*/
|
|
3605
|
+
'regexp/prefer-named-backreference'?: Linter.RuleEntry<[]>
|
|
3606
|
+
/**
|
|
3607
|
+
* enforce using named capture groups
|
|
3608
|
+
* @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/prefer-named-capture-group.html
|
|
3609
|
+
*/
|
|
3610
|
+
'regexp/prefer-named-capture-group'?: Linter.RuleEntry<[]>
|
|
3611
|
+
/**
|
|
3612
|
+
* enforce using named replacement
|
|
3613
|
+
* @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/prefer-named-replacement.html
|
|
3614
|
+
*/
|
|
3615
|
+
'regexp/prefer-named-replacement'?: Linter.RuleEntry<RegexpPreferNamedReplacement>
|
|
3616
|
+
/**
|
|
3617
|
+
* enforce using `+` quantifier
|
|
3618
|
+
* @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/prefer-plus-quantifier.html
|
|
3619
|
+
*/
|
|
3620
|
+
'regexp/prefer-plus-quantifier'?: Linter.RuleEntry<[]>
|
|
3621
|
+
/**
|
|
3622
|
+
* prefer predefined assertion over equivalent lookarounds
|
|
3623
|
+
* @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/prefer-predefined-assertion.html
|
|
3624
|
+
*/
|
|
3625
|
+
'regexp/prefer-predefined-assertion'?: Linter.RuleEntry<[]>
|
|
3626
|
+
/**
|
|
3627
|
+
* enforce using quantifier
|
|
3628
|
+
* @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/prefer-quantifier.html
|
|
3629
|
+
*/
|
|
3630
|
+
'regexp/prefer-quantifier'?: Linter.RuleEntry<[]>
|
|
3631
|
+
/**
|
|
3632
|
+
* enforce using `?` quantifier
|
|
3633
|
+
* @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/prefer-question-quantifier.html
|
|
3634
|
+
*/
|
|
3635
|
+
'regexp/prefer-question-quantifier'?: Linter.RuleEntry<[]>
|
|
3636
|
+
/**
|
|
3637
|
+
* enforce using character class range
|
|
3638
|
+
* @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/prefer-range.html
|
|
3639
|
+
*/
|
|
3640
|
+
'regexp/prefer-range'?: Linter.RuleEntry<RegexpPreferRange>
|
|
3641
|
+
/**
|
|
3642
|
+
* enforce that `RegExp#exec` is used instead of `String#match` if no global flag is provided
|
|
3643
|
+
* @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/prefer-regexp-exec.html
|
|
3644
|
+
*/
|
|
3645
|
+
'regexp/prefer-regexp-exec'?: Linter.RuleEntry<[]>
|
|
3646
|
+
/**
|
|
3647
|
+
* enforce that `RegExp#test` is used instead of `String#match` and `RegExp#exec`
|
|
3648
|
+
* @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/prefer-regexp-test.html
|
|
3649
|
+
*/
|
|
3650
|
+
'regexp/prefer-regexp-test'?: Linter.RuleEntry<[]>
|
|
3651
|
+
/**
|
|
3652
|
+
* enforce using result array `groups`
|
|
3653
|
+
* @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/prefer-result-array-groups.html
|
|
3654
|
+
*/
|
|
3655
|
+
'regexp/prefer-result-array-groups'?: Linter.RuleEntry<RegexpPreferResultArrayGroups>
|
|
3656
|
+
/**
|
|
3657
|
+
* prefer character class set operations instead of lookarounds
|
|
3658
|
+
* @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/prefer-set-operation.html
|
|
3659
|
+
*/
|
|
3660
|
+
'regexp/prefer-set-operation'?: Linter.RuleEntry<[]>
|
|
3661
|
+
/**
|
|
3662
|
+
* enforce using `*` quantifier
|
|
3663
|
+
* @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/prefer-star-quantifier.html
|
|
3664
|
+
*/
|
|
3665
|
+
'regexp/prefer-star-quantifier'?: Linter.RuleEntry<[]>
|
|
3666
|
+
/**
|
|
3667
|
+
* enforce use of unicode codepoint escapes
|
|
3668
|
+
* @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/prefer-unicode-codepoint-escapes.html
|
|
3669
|
+
*/
|
|
3670
|
+
'regexp/prefer-unicode-codepoint-escapes'?: Linter.RuleEntry<[]>
|
|
3671
|
+
/**
|
|
3672
|
+
* enforce using `\w`
|
|
3673
|
+
* @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/prefer-w.html
|
|
3674
|
+
*/
|
|
3675
|
+
'regexp/prefer-w'?: Linter.RuleEntry<[]>
|
|
3676
|
+
/**
|
|
3677
|
+
* enforce the use of the `u` flag
|
|
3678
|
+
* @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/require-unicode-regexp.html
|
|
3679
|
+
*/
|
|
3680
|
+
'regexp/require-unicode-regexp'?: Linter.RuleEntry<[]>
|
|
3681
|
+
/**
|
|
3682
|
+
* enforce the use of the `v` flag
|
|
3683
|
+
* @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/require-unicode-sets-regexp.html
|
|
3684
|
+
*/
|
|
3685
|
+
'regexp/require-unicode-sets-regexp'?: Linter.RuleEntry<[]>
|
|
3686
|
+
/**
|
|
3687
|
+
* require simplify set operations
|
|
3688
|
+
* @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/simplify-set-operations.html
|
|
3689
|
+
*/
|
|
3690
|
+
'regexp/simplify-set-operations'?: Linter.RuleEntry<[]>
|
|
3691
|
+
/**
|
|
3692
|
+
* sort alternatives if order doesn't matter
|
|
3693
|
+
* @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/sort-alternatives.html
|
|
3694
|
+
*/
|
|
3695
|
+
'regexp/sort-alternatives'?: Linter.RuleEntry<[]>
|
|
3696
|
+
/**
|
|
3697
|
+
* enforces elements order in character class
|
|
3698
|
+
* @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/sort-character-class-elements.html
|
|
3699
|
+
*/
|
|
3700
|
+
'regexp/sort-character-class-elements'?: Linter.RuleEntry<RegexpSortCharacterClassElements>
|
|
3701
|
+
/**
|
|
3702
|
+
* require regex flags to be sorted
|
|
3703
|
+
* @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/sort-flags.html
|
|
3704
|
+
*/
|
|
3705
|
+
'regexp/sort-flags'?: Linter.RuleEntry<[]>
|
|
3706
|
+
/**
|
|
3707
|
+
* disallow not strictly valid regular expressions
|
|
3708
|
+
* @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/strict.html
|
|
3709
|
+
*/
|
|
3710
|
+
'regexp/strict'?: Linter.RuleEntry<[]>
|
|
3711
|
+
/**
|
|
3712
|
+
* enforce consistent usage of unicode escape or unicode codepoint escape
|
|
3713
|
+
* @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/unicode-escape.html
|
|
3714
|
+
*/
|
|
3715
|
+
'regexp/unicode-escape'?: Linter.RuleEntry<RegexpUnicodeEscape>
|
|
3716
|
+
/**
|
|
3717
|
+
* enforce consistent naming of unicode properties
|
|
3718
|
+
* @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/unicode-property.html
|
|
3719
|
+
*/
|
|
3720
|
+
'regexp/unicode-property'?: Linter.RuleEntry<RegexpUnicodeProperty>
|
|
3721
|
+
/**
|
|
3722
|
+
* use the `i` flag if it simplifies the pattern
|
|
3723
|
+
* @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/use-ignore-case.html
|
|
3724
|
+
*/
|
|
3725
|
+
'regexp/use-ignore-case'?: Linter.RuleEntry<[]>
|
|
3311
3726
|
/**
|
|
3312
3727
|
* Disallow assignments that can lead to race conditions due to usage of `await` or `yield`
|
|
3313
3728
|
* @see https://eslint.org/docs/latest/rules/require-atomic-updates
|
|
@@ -7365,6 +7780,10 @@ type Radix = []|[("always" | "as-needed")]
|
|
|
7365
7780
|
type ReactCompilerReactCompiler = []|[{
|
|
7366
7781
|
[k: string]: unknown | undefined
|
|
7367
7782
|
}]
|
|
7783
|
+
// ----- react-extra/no-useless-fragment -----
|
|
7784
|
+
type ReactExtraNoUselessFragment = []|[{
|
|
7785
|
+
allowExpressions?: boolean
|
|
7786
|
+
}]
|
|
7368
7787
|
// ----- react-hooks/exhaustive-deps -----
|
|
7369
7788
|
type ReactHooksExhaustiveDeps = []|[{
|
|
7370
7789
|
additionalHooks?: string
|
|
@@ -7853,6 +8272,124 @@ type ReactStylePropObject = []|[{
|
|
|
7853
8272
|
allow?: string[]
|
|
7854
8273
|
[k: string]: unknown | undefined
|
|
7855
8274
|
}]
|
|
8275
|
+
// ----- regexp/hexadecimal-escape -----
|
|
8276
|
+
type RegexpHexadecimalEscape = []|[("always" | "never")]
|
|
8277
|
+
// ----- regexp/letter-case -----
|
|
8278
|
+
type RegexpLetterCase = []|[{
|
|
8279
|
+
caseInsensitive?: ("lowercase" | "uppercase" | "ignore")
|
|
8280
|
+
unicodeEscape?: ("lowercase" | "uppercase" | "ignore")
|
|
8281
|
+
hexadecimalEscape?: ("lowercase" | "uppercase" | "ignore")
|
|
8282
|
+
controlEscape?: ("lowercase" | "uppercase" | "ignore")
|
|
8283
|
+
}]
|
|
8284
|
+
// ----- regexp/match-any -----
|
|
8285
|
+
type RegexpMatchAny = []|[{
|
|
8286
|
+
|
|
8287
|
+
allows?: [("[\\s\\S]" | "[\\S\\s]" | "[^]" | "dotAll"), ...(("[\\s\\S]" | "[\\S\\s]" | "[^]" | "dotAll"))[]]
|
|
8288
|
+
}]
|
|
8289
|
+
// ----- regexp/no-dupe-disjunctions -----
|
|
8290
|
+
type RegexpNoDupeDisjunctions = []|[{
|
|
8291
|
+
report?: ("all" | "trivial" | "interesting")
|
|
8292
|
+
reportExponentialBacktracking?: ("none" | "certain" | "potential")
|
|
8293
|
+
reportUnreachable?: ("certain" | "potential")
|
|
8294
|
+
}]
|
|
8295
|
+
// ----- regexp/no-lazy-ends -----
|
|
8296
|
+
type RegexpNoLazyEnds = []|[{
|
|
8297
|
+
ignorePartial?: boolean
|
|
8298
|
+
}]
|
|
8299
|
+
// ----- regexp/no-legacy-features -----
|
|
8300
|
+
type RegexpNoLegacyFeatures = []|[{
|
|
8301
|
+
staticProperties?: ("input" | "$_" | "lastMatch" | "$&" | "lastParen" | "$+" | "leftContext" | "$`" | "rightContext" | "$'" | "$1" | "$2" | "$3" | "$4" | "$5" | "$6" | "$7" | "$8" | "$9")[]
|
|
8302
|
+
prototypeMethods?: ("compile")[]
|
|
8303
|
+
}]
|
|
8304
|
+
// ----- regexp/no-misleading-capturing-group -----
|
|
8305
|
+
type RegexpNoMisleadingCapturingGroup = []|[{
|
|
8306
|
+
reportBacktrackingEnds?: boolean
|
|
8307
|
+
}]
|
|
8308
|
+
// ----- regexp/no-misleading-unicode-character -----
|
|
8309
|
+
type RegexpNoMisleadingUnicodeCharacter = []|[{
|
|
8310
|
+
fixable?: boolean
|
|
8311
|
+
}]
|
|
8312
|
+
// ----- regexp/no-missing-g-flag -----
|
|
8313
|
+
type RegexpNoMissingGFlag = []|[{
|
|
8314
|
+
strictTypes?: boolean
|
|
8315
|
+
}]
|
|
8316
|
+
// ----- regexp/no-obscure-range -----
|
|
8317
|
+
type RegexpNoObscureRange = []|[{
|
|
8318
|
+
allowed?: (("all" | "alphanumeric") | [("all" | "alphanumeric")] | [("alphanumeric" | string), ...(("alphanumeric" | string))[]])
|
|
8319
|
+
}]
|
|
8320
|
+
// ----- regexp/no-super-linear-backtracking -----
|
|
8321
|
+
type RegexpNoSuperLinearBacktracking = []|[{
|
|
8322
|
+
report?: ("certain" | "potential")
|
|
8323
|
+
}]
|
|
8324
|
+
// ----- regexp/no-super-linear-move -----
|
|
8325
|
+
type RegexpNoSuperLinearMove = []|[{
|
|
8326
|
+
report?: ("certain" | "potential")
|
|
8327
|
+
ignoreSticky?: boolean
|
|
8328
|
+
ignorePartial?: boolean
|
|
8329
|
+
}]
|
|
8330
|
+
// ----- regexp/no-unused-capturing-group -----
|
|
8331
|
+
type RegexpNoUnusedCapturingGroup = []|[{
|
|
8332
|
+
fixable?: boolean
|
|
8333
|
+
allowNamed?: boolean
|
|
8334
|
+
}]
|
|
8335
|
+
// ----- regexp/no-useless-character-class -----
|
|
8336
|
+
type RegexpNoUselessCharacterClass = []|[{
|
|
8337
|
+
ignores?: string[]
|
|
8338
|
+
}]
|
|
8339
|
+
// ----- regexp/no-useless-flag -----
|
|
8340
|
+
type RegexpNoUselessFlag = []|[{
|
|
8341
|
+
ignore?: ("i" | "m" | "s" | "g" | "y")[]
|
|
8342
|
+
strictTypes?: boolean
|
|
8343
|
+
}]
|
|
8344
|
+
// ----- regexp/no-useless-non-capturing-group -----
|
|
8345
|
+
type RegexpNoUselessNonCapturingGroup = []|[{
|
|
8346
|
+
allowTop?: (boolean | ("always" | "never" | "partial"))
|
|
8347
|
+
}]
|
|
8348
|
+
// ----- regexp/optimal-quantifier-concatenation -----
|
|
8349
|
+
type RegexpOptimalQuantifierConcatenation = []|[{
|
|
8350
|
+
capturingGroups?: ("ignore" | "report")
|
|
8351
|
+
}]
|
|
8352
|
+
// ----- regexp/prefer-character-class -----
|
|
8353
|
+
type RegexpPreferCharacterClass = []|[{
|
|
8354
|
+
minAlternatives?: number
|
|
8355
|
+
}]
|
|
8356
|
+
// ----- regexp/prefer-d -----
|
|
8357
|
+
type RegexpPreferD = []|[{
|
|
8358
|
+
insideCharacterClass?: ("ignore" | "range" | "d")
|
|
8359
|
+
}]
|
|
8360
|
+
// ----- regexp/prefer-lookaround -----
|
|
8361
|
+
type RegexpPreferLookaround = []|[{
|
|
8362
|
+
lookbehind?: boolean
|
|
8363
|
+
strictTypes?: boolean
|
|
8364
|
+
}]
|
|
8365
|
+
// ----- regexp/prefer-named-replacement -----
|
|
8366
|
+
type RegexpPreferNamedReplacement = []|[{
|
|
8367
|
+
strictTypes?: boolean
|
|
8368
|
+
}]
|
|
8369
|
+
// ----- regexp/prefer-range -----
|
|
8370
|
+
type RegexpPreferRange = []|[{
|
|
8371
|
+
target?: (("all" | "alphanumeric") | [("all" | "alphanumeric")] | [("alphanumeric" | string), ...(("alphanumeric" | string))[]])
|
|
8372
|
+
}]
|
|
8373
|
+
// ----- regexp/prefer-result-array-groups -----
|
|
8374
|
+
type RegexpPreferResultArrayGroups = []|[{
|
|
8375
|
+
strictTypes?: boolean
|
|
8376
|
+
}]
|
|
8377
|
+
// ----- regexp/sort-character-class-elements -----
|
|
8378
|
+
type RegexpSortCharacterClassElements = []|[{
|
|
8379
|
+
order?: ("\\s" | "\\w" | "\\d" | "\\p" | "*" | "\\q" | "[]")[]
|
|
8380
|
+
}]
|
|
8381
|
+
// ----- regexp/unicode-escape -----
|
|
8382
|
+
type RegexpUnicodeEscape = []|[("unicodeCodePointEscape" | "unicodeEscape")]
|
|
8383
|
+
// ----- regexp/unicode-property -----
|
|
8384
|
+
type RegexpUnicodeProperty = []|[{
|
|
8385
|
+
generalCategory?: ("always" | "never" | "ignore")
|
|
8386
|
+
key?: ("short" | "long" | "ignore")
|
|
8387
|
+
property?: (("short" | "long" | "ignore") | {
|
|
8388
|
+
binary?: ("short" | "long" | "ignore")
|
|
8389
|
+
generalCategory?: ("short" | "long" | "ignore")
|
|
8390
|
+
script?: ("short" | "long" | "ignore")
|
|
8391
|
+
})
|
|
8392
|
+
}]
|
|
7856
8393
|
// ----- require-atomic-updates -----
|
|
7857
8394
|
type RequireAtomicUpdates = []|[{
|
|
7858
8395
|
allowProperties?: boolean
|
|
@@ -9394,7 +9931,7 @@ type Yoda = []|[("always" | "never")]|[("always" | "never"), {
|
|
|
9394
9931
|
onlyEquality?: boolean
|
|
9395
9932
|
}]
|
|
9396
9933
|
// Names of all the configs
|
|
9397
|
-
type ConfigNames = '2digits:comments' | '2digits:graphql' | '2digits:ignores' | '2digits:gitignore' | '2digits:javascript' | '2digits:jsdoc' | '2digits:next/setup' | '2digits:next/rules' | '2digits:node' | '2digits:prettier' | '2digits:react/setup' | '2digits:react/rules' | '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'
|
|
9934
|
+
type ConfigNames = '2digits:comments' | '2digits:graphql' | '2digits:ignores' | '2digits:gitignore' | '2digits:javascript' | '2digits:jsdoc' | '2digits:next/setup' | '2digits:next/rules' | '2digits:node' | '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'
|
|
9398
9935
|
|
|
9399
9936
|
type Rules = RuleOptions;
|
|
9400
9937
|
interface TypedFlatConfigItem extends Omit<Linter.Config<Linter.RulesRecord & Rules>, 'plugins' | 'languageOptions'> {
|
|
@@ -9465,6 +10002,8 @@ declare function prettier(): Promise<TypedFlatConfigItem[]>;
|
|
|
9465
10002
|
|
|
9466
10003
|
declare function react(options?: OptionsWithReact & OptionsTypeScriptWithTypes): Promise<TypedFlatConfigItem[]>;
|
|
9467
10004
|
|
|
10005
|
+
declare function regexp(): TypedFlatConfigItem[];
|
|
10006
|
+
|
|
9468
10007
|
declare function sonar(): TypedFlatConfigItem[];
|
|
9469
10008
|
|
|
9470
10009
|
declare function storybook(options?: OptionsWithStorybook & OptionsTypeScriptWithTypes): Promise<TypedFlatConfigItem[]>;
|
|
@@ -9496,4 +10035,4 @@ interface ESLint2DigitsOptions {
|
|
|
9496
10035
|
}
|
|
9497
10036
|
declare function twoDigits(options?: ESLint2DigitsOptions, ...userConfig: TypedFlatConfigItem[]): Promise<TypedFlatConfigItem[]>;
|
|
9498
10037
|
|
|
9499
|
-
export { type ConfigNames, type OptionsOverrides, type OptionsTypeScriptWithTypes, type OptionsWithFiles, type OptionsWithIgnores, type OptionsWithReact, type OptionsWithStorybook, type Rules, type TypedFlatConfigItem, comments, twoDigits as default, graphql, ignores, javascript, jsdoc, next, node, prettier, react, sonar, storybook, tailwind, tanstack, turbo, twoDigits, typescript, unicorn };
|
|
10038
|
+
export { type ConfigNames, type OptionsOverrides, type OptionsTypeScriptWithTypes, type OptionsWithFiles, type OptionsWithIgnores, type OptionsWithReact, type OptionsWithStorybook, type Rules, type TypedFlatConfigItem, comments, twoDigits as default, graphql, ignores, javascript, jsdoc, next, node, prettier, react, regexp, sonar, storybook, tailwind, tanstack, turbo, twoDigits, typescript, unicorn };
|