@pengzhanbo/eslint-config 2.2.0 → 2.4.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.d.mts +880 -554
- package/dist/index.mjs +25 -108
- package/package.json +38 -43
package/dist/index.d.mts
CHANGED
|
@@ -7,11 +7,11 @@ import pluginNode from "eslint-plugin-n";
|
|
|
7
7
|
import pluginPerfectionist from "eslint-plugin-perfectionist";
|
|
8
8
|
import pluginUnicorn from "eslint-plugin-unicorn";
|
|
9
9
|
import pluginUnusedImports from "eslint-plugin-unused-imports";
|
|
10
|
+
import { Linter } from "eslint";
|
|
10
11
|
import { StylisticCustomizeOptions } from "@stylistic/eslint-plugin";
|
|
11
12
|
import { ParserOptions } from "@typescript-eslint/parser";
|
|
12
13
|
import { FlatGitignoreOptions } from "eslint-config-flat-gitignore";
|
|
13
14
|
import { Options } from "eslint-processor-vue-blocks";
|
|
14
|
-
import { Linter } from "eslint";
|
|
15
15
|
|
|
16
16
|
//#region src/typegen.d.ts
|
|
17
17
|
interface RuleOptions {
|
|
@@ -131,7 +131,7 @@ interface RuleOptions {
|
|
|
131
131
|
*/
|
|
132
132
|
'angular-template/no-negated-async'?: Linter.RuleEntry<[]>;
|
|
133
133
|
/**
|
|
134
|
-
* Denies nesting of
|
|
134
|
+
* Denies nesting of `<p>` and `<a>` tags.
|
|
135
135
|
* @see https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin-template/docs/rules/no-nested-tags.md
|
|
136
136
|
*/
|
|
137
137
|
'angular-template/no-nested-tags'?: Linter.RuleEntry<[]>;
|
|
@@ -771,6 +771,11 @@ interface RuleOptions {
|
|
|
771
771
|
* @see https://ota-meshi.github.io/eslint-plugin-astro/rules/no-exports-from-components/
|
|
772
772
|
*/
|
|
773
773
|
'astro/no-exports-from-components'?: Linter.RuleEntry<[]>;
|
|
774
|
+
/**
|
|
775
|
+
* disallow `prerender` export outside of pages/ directory
|
|
776
|
+
* @see https://ota-meshi.github.io/eslint-plugin-astro/rules/no-prerender-export-outside-pages/
|
|
777
|
+
*/
|
|
778
|
+
'astro/no-prerender-export-outside-pages'?: Linter.RuleEntry<[]>;
|
|
774
779
|
/**
|
|
775
780
|
* disallow use of `set:html` to prevent XSS attack
|
|
776
781
|
* @see https://ota-meshi.github.io/eslint-plugin-astro/rules/no-set-html-directive/
|
|
@@ -1999,6 +2004,11 @@ interface RuleOptions {
|
|
|
1999
2004
|
* @see https://github.com/eslint/markdown/blob/main/docs/rules/fenced-code-language.md
|
|
2000
2005
|
*/
|
|
2001
2006
|
'markdown/fenced-code-language'?: Linter.RuleEntry<MarkdownFencedCodeLanguage>;
|
|
2007
|
+
/**
|
|
2008
|
+
* Require or disallow metadata for fenced code blocks
|
|
2009
|
+
* @see https://github.com/eslint/markdown/blob/main/docs/rules/fenced-code-meta.md
|
|
2010
|
+
*/
|
|
2011
|
+
'markdown/fenced-code-meta'?: Linter.RuleEntry<MarkdownFencedCodeMeta>;
|
|
2002
2012
|
/**
|
|
2003
2013
|
* Enforce heading levels increment by one
|
|
2004
2014
|
* @see https://github.com/eslint/markdown/blob/main/docs/rules/heading-increment.md
|
|
@@ -3377,6 +3387,11 @@ interface RuleOptions {
|
|
|
3377
3387
|
* @see https://perfectionist.dev/rules/sort-array-includes
|
|
3378
3388
|
*/
|
|
3379
3389
|
'perfectionist/sort-array-includes'?: Linter.RuleEntry<PerfectionistSortArrayIncludes>;
|
|
3390
|
+
/**
|
|
3391
|
+
* Enforce sorted arrays.
|
|
3392
|
+
* @see https://perfectionist.dev/rules/sort-arrays
|
|
3393
|
+
*/
|
|
3394
|
+
'perfectionist/sort-arrays'?: Linter.RuleEntry<PerfectionistSortArrays>;
|
|
3380
3395
|
/**
|
|
3381
3396
|
* Enforce sorted classes.
|
|
3382
3397
|
* @see https://perfectionist.dev/rules/sort-classes
|
|
@@ -3610,601 +3625,742 @@ interface RuleOptions {
|
|
|
3610
3625
|
* @see https://eslint.org/docs/latest/rules/radix
|
|
3611
3626
|
*/
|
|
3612
3627
|
'radix'?: Linter.RuleEntry<Radix>;
|
|
3628
|
+
'react-refresh/only-export-components'?: Linter.RuleEntry<ReactRefreshOnlyExportComponents>;
|
|
3629
|
+
/**
|
|
3630
|
+
* Disallows higher order functions that define components or hooks inside them.
|
|
3631
|
+
* @see https://eslint-react.xyz/docs/rules/component-hook-factories
|
|
3632
|
+
*/
|
|
3633
|
+
'react/component-hook-factories'?: Linter.RuleEntry<[]>;
|
|
3613
3634
|
/**
|
|
3614
3635
|
* Disallows DOM elements from using 'dangerouslySetInnerHTML'.
|
|
3615
3636
|
* @see https://eslint-react.xyz/docs/rules/dom-no-dangerously-set-innerhtml
|
|
3616
3637
|
*/
|
|
3617
|
-
'react-
|
|
3638
|
+
'react/dom-no-dangerously-set-innerhtml'?: Linter.RuleEntry<[]>;
|
|
3618
3639
|
/**
|
|
3619
3640
|
* Disallows DOM elements from using 'dangerouslySetInnerHTML' and 'children' at the same time.
|
|
3620
3641
|
* @see https://eslint-react.xyz/docs/rules/dom-no-dangerously-set-innerhtml-with-children
|
|
3621
3642
|
*/
|
|
3622
|
-
'react-
|
|
3643
|
+
'react/dom-no-dangerously-set-innerhtml-with-children'?: Linter.RuleEntry<[]>;
|
|
3623
3644
|
/**
|
|
3624
3645
|
* Disallows 'findDOMNode'.
|
|
3625
3646
|
* @see https://eslint-react.xyz/docs/rules/dom-no-find-dom-node
|
|
3626
3647
|
*/
|
|
3627
|
-
'react-
|
|
3648
|
+
'react/dom-no-find-dom-node'?: Linter.RuleEntry<[]>;
|
|
3628
3649
|
/**
|
|
3629
3650
|
* Disallows 'flushSync'.
|
|
3630
3651
|
* @see https://eslint-react.xyz/docs/rules/dom-no-flush-sync
|
|
3631
3652
|
*/
|
|
3632
|
-
'react-
|
|
3653
|
+
'react/dom-no-flush-sync'?: Linter.RuleEntry<[]>;
|
|
3633
3654
|
/**
|
|
3634
3655
|
* Replaces usage of 'ReactDOM.hydrate()' with 'hydrateRoot()'.
|
|
3635
3656
|
* @see https://eslint-react.xyz/docs/rules/dom-no-hydrate
|
|
3636
3657
|
*/
|
|
3637
|
-
'react-
|
|
3658
|
+
'react/dom-no-hydrate'?: Linter.RuleEntry<[]>;
|
|
3638
3659
|
/**
|
|
3639
3660
|
* Enforces an explicit 'type' attribute for 'button' elements.
|
|
3640
3661
|
* @see https://eslint-react.xyz/docs/rules/dom-no-missing-button-type
|
|
3641
3662
|
*/
|
|
3642
|
-
'react-
|
|
3663
|
+
'react/dom-no-missing-button-type'?: Linter.RuleEntry<[]>;
|
|
3643
3664
|
/**
|
|
3644
3665
|
* Enforces an explicit 'sandbox' attribute for 'iframe' elements.
|
|
3645
3666
|
* @see https://eslint-react.xyz/docs/rules/dom-no-missing-iframe-sandbox
|
|
3646
3667
|
*/
|
|
3647
|
-
'react-
|
|
3648
|
-
/**
|
|
3649
|
-
* Enforces the absence of a 'namespace' in React elements.
|
|
3650
|
-
* @see https://eslint-react.xyz/docs/rules/dom-no-namespace
|
|
3651
|
-
*/
|
|
3652
|
-
'react-dom/no-namespace'?: Linter.RuleEntry<[]>;
|
|
3668
|
+
'react/dom-no-missing-iframe-sandbox'?: Linter.RuleEntry<[]>;
|
|
3653
3669
|
/**
|
|
3654
3670
|
* Replaces usage of 'ReactDOM.render()' with 'createRoot(node).render()'.
|
|
3655
3671
|
* @see https://eslint-react.xyz/docs/rules/dom-no-render
|
|
3656
3672
|
*/
|
|
3657
|
-
'react-
|
|
3673
|
+
'react/dom-no-render'?: Linter.RuleEntry<[]>;
|
|
3658
3674
|
/**
|
|
3659
3675
|
* Disallows the return value of 'ReactDOM.render'.
|
|
3660
3676
|
* @see https://eslint-react.xyz/docs/rules/dom-no-render-return-value
|
|
3661
3677
|
*/
|
|
3662
|
-
'react-
|
|
3678
|
+
'react/dom-no-render-return-value'?: Linter.RuleEntry<[]>;
|
|
3663
3679
|
/**
|
|
3664
3680
|
* Disallows 'javascript:' URLs as attribute values.
|
|
3665
3681
|
* @see https://eslint-react.xyz/docs/rules/dom-no-script-url
|
|
3666
3682
|
*/
|
|
3667
|
-
'react-
|
|
3683
|
+
'react/dom-no-script-url'?: Linter.RuleEntry<[]>;
|
|
3668
3684
|
/**
|
|
3669
3685
|
* Disallows the use of string style prop in JSX. Use an object instead.
|
|
3670
3686
|
* @see https://eslint-react.xyz/docs/rules/dom-no-string-style-prop
|
|
3671
3687
|
*/
|
|
3672
|
-
'react-
|
|
3688
|
+
'react/dom-no-string-style-prop'?: Linter.RuleEntry<[]>;
|
|
3673
3689
|
/**
|
|
3674
3690
|
* Disallows unknown 'DOM' properties.
|
|
3675
3691
|
* @see https://eslint-react.xyz/docs/rules/dom-no-unknown-property
|
|
3676
3692
|
*/
|
|
3677
|
-
'react-
|
|
3693
|
+
'react/dom-no-unknown-property'?: Linter.RuleEntry<ReactDomNoUnknownProperty>;
|
|
3678
3694
|
/**
|
|
3679
3695
|
* Enforces that the 'sandbox' attribute for 'iframe' elements is not set to unsafe combinations.
|
|
3680
3696
|
* @see https://eslint-react.xyz/docs/rules/dom-no-unsafe-iframe-sandbox
|
|
3681
3697
|
*/
|
|
3682
|
-
'react-
|
|
3698
|
+
'react/dom-no-unsafe-iframe-sandbox'?: Linter.RuleEntry<[]>;
|
|
3683
3699
|
/**
|
|
3684
3700
|
* Disallows 'target="_blank"' without 'rel="noreferrer noopener"'.
|
|
3685
3701
|
* @see https://eslint-react.xyz/docs/rules/dom-no-unsafe-target-blank
|
|
3686
3702
|
*/
|
|
3687
|
-
'react-
|
|
3703
|
+
'react/dom-no-unsafe-target-blank'?: Linter.RuleEntry<[]>;
|
|
3688
3704
|
/**
|
|
3689
3705
|
* Replaces usage of 'useFormState' with 'useActionState'.
|
|
3690
3706
|
* @see https://eslint-react.xyz/docs/rules/dom-no-use-form-state
|
|
3691
3707
|
*/
|
|
3692
|
-
'react-
|
|
3708
|
+
'react/dom-no-use-form-state'?: Linter.RuleEntry<[]>;
|
|
3693
3709
|
/**
|
|
3694
3710
|
* Disallows 'children' in void DOM elements.
|
|
3695
3711
|
* @see https://eslint-react.xyz/docs/rules/dom-no-void-elements-with-children
|
|
3696
3712
|
*/
|
|
3697
|
-
'react-
|
|
3713
|
+
'react/dom-no-void-elements-with-children'?: Linter.RuleEntry<[]>;
|
|
3698
3714
|
/**
|
|
3699
3715
|
* Enforces importing React DOM via a namespace import.
|
|
3700
3716
|
* @see https://eslint-react.xyz/docs/rules/dom-prefer-namespace-import
|
|
3701
3717
|
*/
|
|
3702
|
-
'react-
|
|
3718
|
+
'react/dom-prefer-namespace-import'?: Linter.RuleEntry<[]>;
|
|
3703
3719
|
/**
|
|
3704
|
-
*
|
|
3705
|
-
* @see https://eslint-react.xyz/docs/rules/
|
|
3720
|
+
* Validates usage of Error Boundaries instead of try/catch for errors in child components.
|
|
3721
|
+
* @see https://eslint-react.xyz/docs/rules/error-boundaries
|
|
3706
3722
|
*/
|
|
3707
|
-
'react
|
|
3723
|
+
'react/error-boundaries'?: Linter.RuleEntry<[]>;
|
|
3708
3724
|
/**
|
|
3709
|
-
* Verifies
|
|
3725
|
+
* Verifies the list of dependencies for Hooks like 'useEffect' and similar.
|
|
3726
|
+
* @see https://github.com/facebook/react/issues/14920
|
|
3710
3727
|
*/
|
|
3711
|
-
'react
|
|
3728
|
+
'react/exhaustive-deps'?: Linter.RuleEntry<ReactExhaustiveDeps>;
|
|
3712
3729
|
/**
|
|
3713
|
-
* Validates against
|
|
3730
|
+
* Validates against mutating props, state, and other values that are immutable.
|
|
3731
|
+
* @see https://eslint-react.xyz/docs/rules/immutability
|
|
3714
3732
|
*/
|
|
3715
|
-
'react
|
|
3733
|
+
'react/immutability'?: Linter.RuleEntry<[]>;
|
|
3716
3734
|
/**
|
|
3717
|
-
*
|
|
3735
|
+
* Disallows passing 'children' as a prop.
|
|
3736
|
+
* @see https://eslint-react.xyz/docs/rules/no-children-prop
|
|
3718
3737
|
*/
|
|
3719
|
-
'react
|
|
3738
|
+
'react/jsx-no-children-prop'?: Linter.RuleEntry<[]>;
|
|
3720
3739
|
/**
|
|
3721
|
-
*
|
|
3740
|
+
* Disallows passing 'children' as a prop when children are also passed as nested content.
|
|
3741
|
+
* @see https://eslint-react.xyz/docs/rules/no-children-prop-with-children
|
|
3722
3742
|
*/
|
|
3723
|
-
'react-
|
|
3743
|
+
'react/jsx-no-children-prop-with-children'?: Linter.RuleEntry<[]>;
|
|
3724
3744
|
/**
|
|
3725
|
-
*
|
|
3745
|
+
* Prevents comment strings from being accidentally inserted into a JSX element's text nodes.
|
|
3746
|
+
* @see https://eslint-react.xyz/docs/rules/no-comment-textnodes
|
|
3726
3747
|
*/
|
|
3727
|
-
'react
|
|
3748
|
+
'react/jsx-no-comment-textnodes'?: Linter.RuleEntry<[]>;
|
|
3728
3749
|
/**
|
|
3729
|
-
*
|
|
3730
|
-
* @see https://
|
|
3750
|
+
* Prevent patterns that cause deoptimization when using the automatic JSX runtime.
|
|
3751
|
+
* @see https://eslint-react.xyz/docs/rules/no-key-after-spread
|
|
3731
3752
|
*/
|
|
3732
|
-
'react
|
|
3753
|
+
'react/jsx-no-key-after-spread'?: Linter.RuleEntry<[]>;
|
|
3733
3754
|
/**
|
|
3734
|
-
*
|
|
3755
|
+
* Catches `$` before `{expr}` in JSX — typically from template literal `${expr}` being copy-pasted into JSX without removing the `$`. The `$` "leaks" into the rendered output.
|
|
3756
|
+
* @see https://eslint-react.xyz/docs/rules/no-leaked-dollar
|
|
3735
3757
|
*/
|
|
3736
|
-
'react-
|
|
3758
|
+
'react/jsx-no-leaked-dollar'?: Linter.RuleEntry<[]>;
|
|
3737
3759
|
/**
|
|
3738
|
-
*
|
|
3760
|
+
* Catches `;` at the start of JSX text nodes — typically from accidentally placing a statement-ending `;` inside JSX. The `;` "leaks" into the rendered output.
|
|
3761
|
+
* @see https://eslint-react.xyz/docs/rules/no-leaked-semicolon
|
|
3739
3762
|
*/
|
|
3740
|
-
'react-
|
|
3763
|
+
'react/jsx-no-leaked-semicolon'?: Linter.RuleEntry<[]>;
|
|
3741
3764
|
/**
|
|
3742
|
-
*
|
|
3765
|
+
* Disallow JSX namespace syntax, as React does not support them.
|
|
3766
|
+
* @see https://eslint-react.xyz/docs/rules/no-namespace
|
|
3743
3767
|
*/
|
|
3744
|
-
'react-
|
|
3768
|
+
'react/jsx-no-namespace'?: Linter.RuleEntry<[]>;
|
|
3745
3769
|
/**
|
|
3746
|
-
*
|
|
3770
|
+
* Disallows useless fragment elements.
|
|
3771
|
+
* @see https://eslint-react.xyz/docs/rules/no-useless-fragment
|
|
3747
3772
|
*/
|
|
3748
|
-
'react-
|
|
3773
|
+
'react/jsx-no-useless-fragment'?: Linter.RuleEntry<ReactJsxNoUselessFragment>;
|
|
3749
3774
|
/**
|
|
3750
|
-
*
|
|
3775
|
+
* Enforces the context name to be a valid component name with the suffix 'Context'.
|
|
3776
|
+
* @see https://eslint-react.xyz/docs/rules/naming-convention-context-name
|
|
3751
3777
|
*/
|
|
3752
|
-
'react-
|
|
3778
|
+
'react/naming-convention-context-name'?: Linter.RuleEntry<[]>;
|
|
3753
3779
|
/**
|
|
3754
|
-
*
|
|
3780
|
+
* Enforces identifier names assigned from 'useId' calls to be either 'id' or end with 'Id'.
|
|
3781
|
+
* @see https://eslint-react.xyz/docs/rules/naming-convention-id-name
|
|
3755
3782
|
*/
|
|
3756
|
-
'react-
|
|
3783
|
+
'react/naming-convention-id-name'?: Linter.RuleEntry<[]>;
|
|
3757
3784
|
/**
|
|
3758
|
-
*
|
|
3785
|
+
* Enforces identifier names assigned from 'useRef' calls to be either 'ref' or end with 'Ref'.
|
|
3786
|
+
* @see https://eslint-react.xyz/docs/rules/naming-convention-ref-name
|
|
3759
3787
|
*/
|
|
3760
|
-
'react
|
|
3788
|
+
'react/naming-convention-ref-name'?: Linter.RuleEntry<[]>;
|
|
3761
3789
|
/**
|
|
3762
|
-
*
|
|
3790
|
+
* Disallows accessing 'this.state' inside 'setState' calls.
|
|
3791
|
+
* @see https://eslint-react.xyz/docs/rules/no-access-state-in-setstate
|
|
3763
3792
|
*/
|
|
3764
|
-
'react-
|
|
3793
|
+
'react/no-access-state-in-setstate'?: Linter.RuleEntry<[]>;
|
|
3765
3794
|
/**
|
|
3766
|
-
*
|
|
3795
|
+
* Disallows using an item's index in the array as its key.
|
|
3796
|
+
* @see https://eslint-react.xyz/docs/rules/no-array-index-key
|
|
3767
3797
|
*/
|
|
3768
|
-
'react
|
|
3798
|
+
'react/no-array-index-key'?: Linter.RuleEntry<[]>;
|
|
3769
3799
|
/**
|
|
3770
|
-
*
|
|
3800
|
+
* Disallows the use of 'Children.count' from the 'react' package.
|
|
3801
|
+
* @see https://eslint-react.xyz/docs/rules/no-children-count
|
|
3771
3802
|
*/
|
|
3772
|
-
'react
|
|
3803
|
+
'react/no-children-count'?: Linter.RuleEntry<[]>;
|
|
3773
3804
|
/**
|
|
3774
|
-
*
|
|
3805
|
+
* Disallows the use of 'Children.forEach' from the 'react' package.
|
|
3806
|
+
* @see https://eslint-react.xyz/docs/rules/no-children-for-each
|
|
3775
3807
|
*/
|
|
3776
|
-
'react
|
|
3808
|
+
'react/no-children-for-each'?: Linter.RuleEntry<[]>;
|
|
3777
3809
|
/**
|
|
3778
|
-
*
|
|
3810
|
+
* Disallows the use of 'Children.map' from the 'react' package.
|
|
3811
|
+
* @see https://eslint-react.xyz/docs/rules/no-children-map
|
|
3779
3812
|
*/
|
|
3780
|
-
'react-
|
|
3813
|
+
'react/no-children-map'?: Linter.RuleEntry<[]>;
|
|
3781
3814
|
/**
|
|
3782
|
-
*
|
|
3815
|
+
* Disallows the use of 'Children.only' from the 'react' package.
|
|
3816
|
+
* @see https://eslint-react.xyz/docs/rules/no-children-only
|
|
3783
3817
|
*/
|
|
3784
|
-
'react-
|
|
3818
|
+
'react/no-children-only'?: Linter.RuleEntry<[]>;
|
|
3785
3819
|
/**
|
|
3786
|
-
*
|
|
3820
|
+
* Disallows the use of 'Children.toArray' from the 'react' package.
|
|
3821
|
+
* @see https://eslint-react.xyz/docs/rules/no-children-to-array
|
|
3787
3822
|
*/
|
|
3788
|
-
'react
|
|
3823
|
+
'react/no-children-to-array'?: Linter.RuleEntry<[]>;
|
|
3789
3824
|
/**
|
|
3790
|
-
*
|
|
3791
|
-
* @see https://react.
|
|
3825
|
+
* Disallows class components except for error boundaries.
|
|
3826
|
+
* @see https://eslint-react.xyz/docs/rules/no-class-component
|
|
3792
3827
|
*/
|
|
3793
|
-
'react
|
|
3828
|
+
'react/no-class-component'?: Linter.RuleEntry<[]>;
|
|
3794
3829
|
/**
|
|
3795
|
-
*
|
|
3830
|
+
* Disallows 'cloneElement'.
|
|
3831
|
+
* @see https://eslint-react.xyz/docs/rules/no-clone-element
|
|
3796
3832
|
*/
|
|
3797
|
-
'react
|
|
3833
|
+
'react/no-clone-element'?: Linter.RuleEntry<[]>;
|
|
3798
3834
|
/**
|
|
3799
|
-
*
|
|
3835
|
+
* Replaces usage of 'componentWillMount' with 'UNSAFE_componentWillMount'.
|
|
3836
|
+
* @see https://eslint-react.xyz/docs/rules/no-component-will-mount
|
|
3800
3837
|
*/
|
|
3801
|
-
'react
|
|
3838
|
+
'react/no-component-will-mount'?: Linter.RuleEntry<[]>;
|
|
3802
3839
|
/**
|
|
3803
|
-
*
|
|
3840
|
+
* Replaces usage of 'componentWillReceiveProps' with 'UNSAFE_componentWillReceiveProps'.
|
|
3841
|
+
* @see https://eslint-react.xyz/docs/rules/no-component-will-receive-props
|
|
3804
3842
|
*/
|
|
3805
|
-
'react
|
|
3843
|
+
'react/no-component-will-receive-props'?: Linter.RuleEntry<[]>;
|
|
3806
3844
|
/**
|
|
3807
|
-
*
|
|
3845
|
+
* Replaces usage of 'componentWillUpdate' with 'UNSAFE_componentWillUpdate'.
|
|
3846
|
+
* @see https://eslint-react.xyz/docs/rules/no-component-will-update
|
|
3808
3847
|
*/
|
|
3809
|
-
'react-
|
|
3848
|
+
'react/no-component-will-update'?: Linter.RuleEntry<[]>;
|
|
3810
3849
|
/**
|
|
3811
|
-
*
|
|
3850
|
+
* Replaces usage of '<Context.Provider>' with '<Context>'.
|
|
3851
|
+
* @see https://eslint-react.xyz/docs/rules/no-context-provider
|
|
3812
3852
|
*/
|
|
3813
|
-
'react-
|
|
3853
|
+
'react/no-context-provider'?: Linter.RuleEntry<[]>;
|
|
3814
3854
|
/**
|
|
3815
|
-
*
|
|
3855
|
+
* Disallows 'createRef' in function components.
|
|
3856
|
+
* @see https://eslint-react.xyz/docs/rules/no-create-ref
|
|
3816
3857
|
*/
|
|
3817
|
-
'react
|
|
3858
|
+
'react/no-create-ref'?: Linter.RuleEntry<[]>;
|
|
3818
3859
|
/**
|
|
3819
|
-
*
|
|
3860
|
+
* Disallows direct mutation of 'this.state'.
|
|
3861
|
+
* @see https://eslint-react.xyz/docs/rules/no-direct-mutation-state
|
|
3820
3862
|
*/
|
|
3821
|
-
'react
|
|
3863
|
+
'react/no-direct-mutation-state'?: Linter.RuleEntry<[]>;
|
|
3822
3864
|
/**
|
|
3823
|
-
*
|
|
3865
|
+
* Prevents duplicate 'key' props on sibling elements when rendering lists.
|
|
3866
|
+
* @see https://eslint-react.xyz/docs/rules/no-duplicate-key
|
|
3824
3867
|
*/
|
|
3825
|
-
'react
|
|
3868
|
+
'react/no-duplicate-key'?: Linter.RuleEntry<[]>;
|
|
3826
3869
|
/**
|
|
3827
|
-
*
|
|
3828
|
-
* @see https://eslint-react.xyz/docs/rules/
|
|
3870
|
+
* Replaces usage of 'forwardRef' with passing 'ref' as a prop.
|
|
3871
|
+
* @see https://eslint-react.xyz/docs/rules/no-forward-ref
|
|
3829
3872
|
*/
|
|
3830
|
-
'react-
|
|
3873
|
+
'react/no-forward-ref'?: Linter.RuleEntry<[]>;
|
|
3831
3874
|
/**
|
|
3832
|
-
*
|
|
3833
|
-
* @see https://eslint-react.xyz/docs/rules/
|
|
3875
|
+
* Prevents implicitly passing the 'children' prop to components.
|
|
3876
|
+
* @see https://eslint-react.xyz/docs/rules/no-implicit-children
|
|
3834
3877
|
*/
|
|
3835
|
-
'react-
|
|
3878
|
+
'react/no-implicit-children'?: Linter.RuleEntry<[]>;
|
|
3836
3879
|
/**
|
|
3837
|
-
*
|
|
3838
|
-
* @see https://eslint-react.xyz/docs/rules/
|
|
3880
|
+
* Prevents implicitly passing the 'key' prop to components.
|
|
3881
|
+
* @see https://eslint-react.xyz/docs/rules/no-implicit-key
|
|
3839
3882
|
*/
|
|
3840
|
-
'react-
|
|
3883
|
+
'react/no-implicit-key'?: Linter.RuleEntry<[]>;
|
|
3841
3884
|
/**
|
|
3842
|
-
*
|
|
3843
|
-
* @see https://eslint-react.xyz/docs/rules/
|
|
3885
|
+
* Prevents implicitly passing the 'ref' prop to components.
|
|
3886
|
+
* @see https://eslint-react.xyz/docs/rules/no-implicit-ref
|
|
3844
3887
|
*/
|
|
3845
|
-
'react-
|
|
3888
|
+
'react/no-implicit-ref'?: Linter.RuleEntry<[]>;
|
|
3846
3889
|
/**
|
|
3847
|
-
*
|
|
3848
|
-
* @see https://eslint-react.xyz/docs/rules/
|
|
3890
|
+
* Prevents problematic leaked values from being rendered.
|
|
3891
|
+
* @see https://eslint-react.xyz/docs/rules/no-leaked-conditional-rendering
|
|
3849
3892
|
*/
|
|
3850
|
-
'react-
|
|
3893
|
+
'react/no-leaked-conditional-rendering'?: Linter.RuleEntry<[]>;
|
|
3851
3894
|
/**
|
|
3852
|
-
* Enforces
|
|
3853
|
-
* @see https://eslint-react.xyz/docs/rules/
|
|
3895
|
+
* Enforces that all components have a 'displayName' that can be used in DevTools.
|
|
3896
|
+
* @see https://eslint-react.xyz/docs/rules/no-missing-component-display-name
|
|
3897
|
+
*/
|
|
3898
|
+
'react/no-missing-component-display-name'?: Linter.RuleEntry<[]>;
|
|
3899
|
+
/**
|
|
3900
|
+
* Enforces that all contexts have a 'displayName' that can be used in DevTools.
|
|
3901
|
+
* @see https://eslint-react.xyz/docs/rules/no-missing-context-display-name
|
|
3854
3902
|
*/
|
|
3855
|
-
'react-
|
|
3903
|
+
'react/no-missing-context-display-name'?: Linter.RuleEntry<[]>;
|
|
3856
3904
|
/**
|
|
3857
|
-
*
|
|
3858
|
-
* @see https://eslint-react.xyz/docs/rules/
|
|
3905
|
+
* Disallows missing 'key' on items in list rendering.
|
|
3906
|
+
* @see https://eslint-react.xyz/docs/rules/no-missing-key
|
|
3859
3907
|
*/
|
|
3860
|
-
'react-
|
|
3861
|
-
|
|
3908
|
+
'react/no-missing-key'?: Linter.RuleEntry<[]>;
|
|
3909
|
+
/**
|
|
3910
|
+
* Prevents incorrect usage of 'captureOwnerStack'.
|
|
3911
|
+
* @see https://eslint-react.xyz/docs/rules/no-misused-capture-owner-stack
|
|
3912
|
+
*/
|
|
3913
|
+
'react/no-misused-capture-owner-stack'?: Linter.RuleEntry<[]>;
|
|
3914
|
+
/**
|
|
3915
|
+
* Disallows nesting component definitions inside other components.
|
|
3916
|
+
* @see https://eslint-react.xyz/docs/rules/no-nested-component-definitions
|
|
3917
|
+
*/
|
|
3918
|
+
'react/no-nested-component-definitions'?: Linter.RuleEntry<[]>;
|
|
3919
|
+
/**
|
|
3920
|
+
* Disallows nesting lazy component declarations inside other components or hooks.
|
|
3921
|
+
* @see https://eslint-react.xyz/docs/rules/no-nested-lazy-component-declarations
|
|
3922
|
+
*/
|
|
3923
|
+
'react/no-nested-lazy-component-declarations'?: Linter.RuleEntry<[]>;
|
|
3924
|
+
/**
|
|
3925
|
+
* Disallows 'shouldComponentUpdate' when extending 'React.PureComponent'.
|
|
3926
|
+
* @see https://eslint-react.xyz/docs/rules/no-redundant-should-component-update
|
|
3927
|
+
*/
|
|
3928
|
+
'react/no-redundant-should-component-update'?: Linter.RuleEntry<[]>;
|
|
3929
|
+
/**
|
|
3930
|
+
* Disallows calling 'this.setState' in 'componentDidMount' outside functions such as callbacks.
|
|
3931
|
+
* @see https://eslint-react.xyz/docs/rules/no-set-state-in-component-did-mount
|
|
3932
|
+
*/
|
|
3933
|
+
'react/no-set-state-in-component-did-mount'?: Linter.RuleEntry<[]>;
|
|
3934
|
+
/**
|
|
3935
|
+
* Disallows calling 'this.setState' in 'componentDidUpdate' outside functions such as callbacks.
|
|
3936
|
+
* @see https://eslint-react.xyz/docs/rules/no-set-state-in-component-did-update
|
|
3937
|
+
*/
|
|
3938
|
+
'react/no-set-state-in-component-did-update'?: Linter.RuleEntry<[]>;
|
|
3939
|
+
/**
|
|
3940
|
+
* Disallows calling 'this.setState' in 'componentWillUpdate' outside functions such as callbacks.
|
|
3941
|
+
* @see https://eslint-react.xyz/docs/rules/no-set-state-in-component-will-update
|
|
3942
|
+
*/
|
|
3943
|
+
'react/no-set-state-in-component-will-update'?: Linter.RuleEntry<[]>;
|
|
3944
|
+
/**
|
|
3945
|
+
* Disallows unnecessary usage of 'useCallback'.
|
|
3946
|
+
* @see https://eslint-react.xyz/docs/rules/no-unnecessary-use-callback
|
|
3947
|
+
*/
|
|
3948
|
+
'react/no-unnecessary-use-callback'?: Linter.RuleEntry<[]>;
|
|
3949
|
+
/**
|
|
3950
|
+
* Disallows unnecessary usage of 'useMemo'.
|
|
3951
|
+
* @see https://eslint-react.xyz/docs/rules/no-unnecessary-use-memo
|
|
3952
|
+
*/
|
|
3953
|
+
'react/no-unnecessary-use-memo'?: Linter.RuleEntry<[]>;
|
|
3954
|
+
/**
|
|
3955
|
+
* Enforces that a function with the 'use' prefix uses at least one Hook inside it.
|
|
3956
|
+
* @see https://eslint-react.xyz/docs/rules/no-unnecessary-use-prefix
|
|
3957
|
+
*/
|
|
3958
|
+
'react/no-unnecessary-use-prefix'?: Linter.RuleEntry<[]>;
|
|
3959
|
+
/**
|
|
3960
|
+
* Warns about the use of 'UNSAFE_componentWillMount' in class components.
|
|
3961
|
+
* @see https://eslint-react.xyz/docs/rules/no-unsafe-component-will-mount
|
|
3962
|
+
*/
|
|
3963
|
+
'react/no-unsafe-component-will-mount'?: Linter.RuleEntry<[]>;
|
|
3964
|
+
/**
|
|
3965
|
+
* Warns about the use of 'UNSAFE_componentWillReceiveProps' in class components.
|
|
3966
|
+
* @see https://eslint-react.xyz/docs/rules/no-unsafe-component-will-receive-props
|
|
3967
|
+
*/
|
|
3968
|
+
'react/no-unsafe-component-will-receive-props'?: Linter.RuleEntry<[]>;
|
|
3969
|
+
/**
|
|
3970
|
+
* Warns about the use of 'UNSAFE_componentWillUpdate' in class components.
|
|
3971
|
+
* @see https://eslint-react.xyz/docs/rules/no-unsafe-component-will-update
|
|
3972
|
+
*/
|
|
3973
|
+
'react/no-unsafe-component-will-update'?: Linter.RuleEntry<[]>;
|
|
3974
|
+
/**
|
|
3975
|
+
* Prevents non-stable values (i.e., object literals) from being used as a value for 'Context.Provider'.
|
|
3976
|
+
* @see https://eslint-react.xyz/docs/rules/no-unstable-context-value
|
|
3977
|
+
*/
|
|
3978
|
+
'react/no-unstable-context-value'?: Linter.RuleEntry<[]>;
|
|
3979
|
+
/**
|
|
3980
|
+
* Prevents using referential-type values as default props in object destructuring.
|
|
3981
|
+
* @see https://eslint-react.xyz/docs/rules/no-unstable-default-props
|
|
3982
|
+
*/
|
|
3983
|
+
'react/no-unstable-default-props'?: Linter.RuleEntry<ReactNoUnstableDefaultProps>;
|
|
3984
|
+
/**
|
|
3985
|
+
* Warns about unused class component methods and properties.
|
|
3986
|
+
* @see https://eslint-react.xyz/docs/rules/no-unused-class-component-members
|
|
3987
|
+
*/
|
|
3988
|
+
'react/no-unused-class-component-members'?: Linter.RuleEntry<[]>;
|
|
3989
|
+
/**
|
|
3990
|
+
* Warns about component props that are defined but never used.
|
|
3991
|
+
* @see https://eslint-react.xyz/docs/rules/no-unused-props
|
|
3992
|
+
*/
|
|
3993
|
+
'react/no-unused-props'?: Linter.RuleEntry<[]>;
|
|
3862
3994
|
/**
|
|
3863
|
-
*
|
|
3995
|
+
* Warns about unused class component state.
|
|
3996
|
+
* @see https://eslint-react.xyz/docs/rules/no-unused-state
|
|
3997
|
+
*/
|
|
3998
|
+
'react/no-unused-state'?: Linter.RuleEntry<[]>;
|
|
3999
|
+
/**
|
|
4000
|
+
* Replaces usage of 'useContext' with 'use'.
|
|
4001
|
+
* @see https://eslint-react.xyz/docs/rules/no-use-context
|
|
4002
|
+
*/
|
|
4003
|
+
'react/no-use-context'?: Linter.RuleEntry<[]>;
|
|
4004
|
+
/**
|
|
4005
|
+
* Enforces destructuring assignment for component props and context.
|
|
4006
|
+
* @see https://eslint-react.xyz/docs/rules/prefer-destructuring-assignment
|
|
4007
|
+
*/
|
|
4008
|
+
'react/prefer-destructuring-assignment'?: Linter.RuleEntry<[]>;
|
|
4009
|
+
/**
|
|
4010
|
+
* Enforces importing React via a namespace import.
|
|
4011
|
+
* @see https://eslint-react.xyz/docs/rules/prefer-namespace-import
|
|
4012
|
+
*/
|
|
4013
|
+
'react/prefer-namespace-import'?: Linter.RuleEntry<[]>;
|
|
4014
|
+
/**
|
|
4015
|
+
* Validates that components and hooks are pure by checking that they do not call known-impure functions during render.
|
|
4016
|
+
* @see https://eslint-react.xyz/docs/rules/purity
|
|
4017
|
+
*/
|
|
4018
|
+
'react/purity'?: Linter.RuleEntry<[]>;
|
|
4019
|
+
/**
|
|
4020
|
+
* Validates correct usage of refs by checking that 'ref.current' is not read or written during render.
|
|
4021
|
+
* @see https://eslint-react.xyz/docs/rules/refs
|
|
4022
|
+
*/
|
|
4023
|
+
'react/refs'?: Linter.RuleEntry<[]>;
|
|
4024
|
+
/**
|
|
4025
|
+
* Validates and transforms React Client/Server Function definitions.
|
|
3864
4026
|
* @see https://eslint-react.xyz/docs/rules/function-definition
|
|
3865
4027
|
*/
|
|
3866
|
-
'react-
|
|
4028
|
+
'react/rsc-function-definition'?: Linter.RuleEntry<[]>;
|
|
3867
4029
|
/**
|
|
3868
|
-
* Enforces
|
|
3869
|
-
* @see https://
|
|
4030
|
+
* Enforces the Rules of Hooks.
|
|
4031
|
+
* @see https://react.dev/reference/rules/rules-of-hooks
|
|
3870
4032
|
*/
|
|
3871
|
-
'react
|
|
4033
|
+
'react/rules-of-hooks'?: Linter.RuleEntry<ReactRulesOfHooks>;
|
|
3872
4034
|
/**
|
|
3873
|
-
*
|
|
3874
|
-
* @see https://eslint-react.xyz/docs/rules/
|
|
4035
|
+
* Validates against setting state synchronously in an effect, which can lead to re-renders that degrade performance.
|
|
4036
|
+
* @see https://eslint-react.xyz/docs/rules/set-state-in-effect
|
|
3875
4037
|
*/
|
|
3876
|
-
'react-
|
|
4038
|
+
'react/set-state-in-effect'?: Linter.RuleEntry<[]>;
|
|
3877
4039
|
/**
|
|
3878
|
-
*
|
|
3879
|
-
* @see https://eslint-react.xyz/docs/rules/
|
|
4040
|
+
* Validates against unconditionally setting state during render, which can trigger additional renders and potential infinite render loops.
|
|
4041
|
+
* @see https://eslint-react.xyz/docs/rules/set-state-in-render
|
|
3880
4042
|
*/
|
|
3881
|
-
'react
|
|
4043
|
+
'react/set-state-in-render'?: Linter.RuleEntry<[]>;
|
|
3882
4044
|
/**
|
|
3883
|
-
*
|
|
3884
|
-
* @see https://eslint-react.xyz/docs/rules/
|
|
4045
|
+
* Validates against syntax that React Compiler does not support.
|
|
4046
|
+
* @see https://eslint-react.xyz/docs/rules/unsupported-syntax
|
|
3885
4047
|
*/
|
|
3886
|
-
'react
|
|
4048
|
+
'react/unsupported-syntax'?: Linter.RuleEntry<[]>;
|
|
3887
4049
|
/**
|
|
3888
|
-
*
|
|
3889
|
-
* @see https://eslint-react.xyz/docs/rules/
|
|
4050
|
+
* Validates that 'useMemo' is called with a callback that returns a value.
|
|
4051
|
+
* @see https://eslint-react.xyz/docs/rules/use-memo
|
|
3890
4052
|
*/
|
|
3891
|
-
'react/
|
|
4053
|
+
'react/use-memo'?: Linter.RuleEntry<[]>;
|
|
3892
4054
|
/**
|
|
3893
|
-
* Enforces '
|
|
3894
|
-
* @see https://eslint-react.xyz/docs/rules/
|
|
4055
|
+
* Enforces correct usage of 'useState', including destructuring, symmetric naming of the value and setter, and wrapping expensive initializers in a lazy initializer function.
|
|
4056
|
+
* @see https://eslint-react.xyz/docs/rules/use-state
|
|
3895
4057
|
*/
|
|
3896
|
-
'react/
|
|
4058
|
+
'react/use-state'?: Linter.RuleEntry<ReactUseState>;
|
|
3897
4059
|
/**
|
|
3898
|
-
*
|
|
3899
|
-
* @see https://eslint-react.xyz/docs/rules/
|
|
4060
|
+
* Enforces that every 'addEventListener' in a component or custom hook has a corresponding 'removeEventListener'.
|
|
4061
|
+
* @see https://eslint-react.xyz/docs/rules/web-api-no-leaked-event-listener
|
|
3900
4062
|
*/
|
|
3901
|
-
'react/
|
|
4063
|
+
'react/web-api-no-leaked-event-listener'?: Linter.RuleEntry<[]>;
|
|
3902
4064
|
/**
|
|
3903
|
-
*
|
|
3904
|
-
* @see https://eslint-react.xyz/docs/rules/
|
|
4065
|
+
* Enforces that every 'setInterval' in a component or custom hook has a corresponding 'clearInterval'.
|
|
4066
|
+
* @see https://eslint-react.xyz/docs/rules/web-api-no-leaked-interval
|
|
3905
4067
|
*/
|
|
3906
|
-
'react/
|
|
4068
|
+
'react/web-api-no-leaked-interval'?: Linter.RuleEntry<[]>;
|
|
3907
4069
|
/**
|
|
3908
|
-
*
|
|
3909
|
-
* @see https://eslint-react.xyz/docs/rules/
|
|
4070
|
+
* Enforces that every 'ResizeObserver' created in a component or custom hook has a corresponding 'ResizeObserver.disconnect()'.
|
|
4071
|
+
* @see https://eslint-react.xyz/docs/rules/web-api-no-leaked-resize-observer
|
|
3910
4072
|
*/
|
|
3911
|
-
'react/
|
|
4073
|
+
'react/web-api-no-leaked-resize-observer'?: Linter.RuleEntry<[]>;
|
|
3912
4074
|
/**
|
|
3913
|
-
*
|
|
3914
|
-
* @see https://eslint-react.xyz/docs/rules/
|
|
4075
|
+
* Enforces that every 'setTimeout' in a component or custom hook has a corresponding 'clearTimeout'.
|
|
4076
|
+
* @see https://eslint-react.xyz/docs/rules/web-api-no-leaked-timeout
|
|
3915
4077
|
*/
|
|
3916
|
-
'react/
|
|
4078
|
+
'react/web-api-no-leaked-timeout'?: Linter.RuleEntry<[]>;
|
|
3917
4079
|
/**
|
|
3918
|
-
*
|
|
3919
|
-
* @see https://eslint-react.xyz/docs/rules/
|
|
4080
|
+
* Disallows higher order functions that define components or hooks inside them.
|
|
4081
|
+
* @see https://eslint-react.xyz/docs/rules/component-hook-factories
|
|
3920
4082
|
*/
|
|
3921
|
-
'react/
|
|
4083
|
+
'react/x-component-hook-factories'?: Linter.RuleEntry<[]>;
|
|
3922
4084
|
/**
|
|
3923
|
-
*
|
|
3924
|
-
* @see https://eslint-react.xyz/docs/rules/
|
|
4085
|
+
* Validates usage of Error Boundaries instead of try/catch for errors in child components.
|
|
4086
|
+
* @see https://eslint-react.xyz/docs/rules/error-boundaries
|
|
3925
4087
|
*/
|
|
3926
|
-
'react/
|
|
4088
|
+
'react/x-error-boundaries'?: Linter.RuleEntry<[]>;
|
|
3927
4089
|
/**
|
|
3928
|
-
*
|
|
3929
|
-
* @see https://
|
|
4090
|
+
* Verifies the list of dependencies for Hooks like 'useEffect' and similar.
|
|
4091
|
+
* @see https://github.com/facebook/react/issues/14920
|
|
3930
4092
|
*/
|
|
3931
|
-
'react/
|
|
4093
|
+
'react/x-exhaustive-deps'?: Linter.RuleEntry<ReactXExhaustiveDeps>;
|
|
3932
4094
|
/**
|
|
3933
|
-
*
|
|
3934
|
-
* @see https://eslint-react.xyz/docs/rules/
|
|
4095
|
+
* Validates against mutating props, state, and other values that are immutable.
|
|
4096
|
+
* @see https://eslint-react.xyz/docs/rules/immutability
|
|
3935
4097
|
*/
|
|
3936
|
-
'react/
|
|
4098
|
+
'react/x-immutability'?: Linter.RuleEntry<[]>;
|
|
3937
4099
|
/**
|
|
3938
4100
|
* Disallows accessing 'this.state' inside 'setState' calls.
|
|
3939
4101
|
* @see https://eslint-react.xyz/docs/rules/no-access-state-in-setstate
|
|
3940
4102
|
*/
|
|
3941
|
-
'react/no-access-state-in-setstate'?: Linter.RuleEntry<[]>;
|
|
4103
|
+
'react/x-no-access-state-in-setstate'?: Linter.RuleEntry<[]>;
|
|
3942
4104
|
/**
|
|
3943
4105
|
* Disallows using an item's index in the array as its key.
|
|
3944
4106
|
* @see https://eslint-react.xyz/docs/rules/no-array-index-key
|
|
3945
4107
|
*/
|
|
3946
|
-
'react/no-array-index-key'?: Linter.RuleEntry<[]>;
|
|
4108
|
+
'react/x-no-array-index-key'?: Linter.RuleEntry<[]>;
|
|
3947
4109
|
/**
|
|
3948
4110
|
* Disallows the use of 'Children.count' from the 'react' package.
|
|
3949
4111
|
* @see https://eslint-react.xyz/docs/rules/no-children-count
|
|
3950
4112
|
*/
|
|
3951
|
-
'react/no-children-count'?: Linter.RuleEntry<[]>;
|
|
4113
|
+
'react/x-no-children-count'?: Linter.RuleEntry<[]>;
|
|
3952
4114
|
/**
|
|
3953
4115
|
* Disallows the use of 'Children.forEach' from the 'react' package.
|
|
3954
4116
|
* @see https://eslint-react.xyz/docs/rules/no-children-for-each
|
|
3955
4117
|
*/
|
|
3956
|
-
'react/no-children-for-each'?: Linter.RuleEntry<[]>;
|
|
4118
|
+
'react/x-no-children-for-each'?: Linter.RuleEntry<[]>;
|
|
3957
4119
|
/**
|
|
3958
4120
|
* Disallows the use of 'Children.map' from the 'react' package.
|
|
3959
4121
|
* @see https://eslint-react.xyz/docs/rules/no-children-map
|
|
3960
4122
|
*/
|
|
3961
|
-
'react/no-children-map'?: Linter.RuleEntry<[]>;
|
|
4123
|
+
'react/x-no-children-map'?: Linter.RuleEntry<[]>;
|
|
3962
4124
|
/**
|
|
3963
4125
|
* Disallows the use of 'Children.only' from the 'react' package.
|
|
3964
4126
|
* @see https://eslint-react.xyz/docs/rules/no-children-only
|
|
3965
4127
|
*/
|
|
3966
|
-
'react/no-children-only'?: Linter.RuleEntry<[]>;
|
|
3967
|
-
/**
|
|
3968
|
-
* Disallows passing 'children' as a prop.
|
|
3969
|
-
* @see https://eslint-react.xyz/docs/rules/no-children-prop
|
|
3970
|
-
*/
|
|
3971
|
-
'react/no-children-prop'?: Linter.RuleEntry<[]>;
|
|
4128
|
+
'react/x-no-children-only'?: Linter.RuleEntry<[]>;
|
|
3972
4129
|
/**
|
|
3973
4130
|
* Disallows the use of 'Children.toArray' from the 'react' package.
|
|
3974
4131
|
* @see https://eslint-react.xyz/docs/rules/no-children-to-array
|
|
3975
4132
|
*/
|
|
3976
|
-
'react/no-children-to-array'?: Linter.RuleEntry<[]>;
|
|
4133
|
+
'react/x-no-children-to-array'?: Linter.RuleEntry<[]>;
|
|
3977
4134
|
/**
|
|
3978
4135
|
* Disallows class components except for error boundaries.
|
|
3979
4136
|
* @see https://eslint-react.xyz/docs/rules/no-class-component
|
|
3980
4137
|
*/
|
|
3981
|
-
'react/no-class-component'?: Linter.RuleEntry<[]>;
|
|
4138
|
+
'react/x-no-class-component'?: Linter.RuleEntry<[]>;
|
|
3982
4139
|
/**
|
|
3983
4140
|
* Disallows 'cloneElement'.
|
|
3984
4141
|
* @see https://eslint-react.xyz/docs/rules/no-clone-element
|
|
3985
4142
|
*/
|
|
3986
|
-
'react/no-clone-element'?: Linter.RuleEntry<[]>;
|
|
4143
|
+
'react/x-no-clone-element'?: Linter.RuleEntry<[]>;
|
|
3987
4144
|
/**
|
|
3988
4145
|
* Replaces usage of 'componentWillMount' with 'UNSAFE_componentWillMount'.
|
|
3989
4146
|
* @see https://eslint-react.xyz/docs/rules/no-component-will-mount
|
|
3990
4147
|
*/
|
|
3991
|
-
'react/no-component-will-mount'?: Linter.RuleEntry<[]>;
|
|
4148
|
+
'react/x-no-component-will-mount'?: Linter.RuleEntry<[]>;
|
|
3992
4149
|
/**
|
|
3993
4150
|
* Replaces usage of 'componentWillReceiveProps' with 'UNSAFE_componentWillReceiveProps'.
|
|
3994
4151
|
* @see https://eslint-react.xyz/docs/rules/no-component-will-receive-props
|
|
3995
4152
|
*/
|
|
3996
|
-
'react/no-component-will-receive-props'?: Linter.RuleEntry<[]>;
|
|
4153
|
+
'react/x-no-component-will-receive-props'?: Linter.RuleEntry<[]>;
|
|
3997
4154
|
/**
|
|
3998
4155
|
* Replaces usage of 'componentWillUpdate' with 'UNSAFE_componentWillUpdate'.
|
|
3999
4156
|
* @see https://eslint-react.xyz/docs/rules/no-component-will-update
|
|
4000
4157
|
*/
|
|
4001
|
-
'react/no-component-will-update'?: Linter.RuleEntry<[]>;
|
|
4158
|
+
'react/x-no-component-will-update'?: Linter.RuleEntry<[]>;
|
|
4002
4159
|
/**
|
|
4003
4160
|
* Replaces usage of '<Context.Provider>' with '<Context>'.
|
|
4004
4161
|
* @see https://eslint-react.xyz/docs/rules/no-context-provider
|
|
4005
4162
|
*/
|
|
4006
|
-
'react/no-context-provider'?: Linter.RuleEntry<[]>;
|
|
4163
|
+
'react/x-no-context-provider'?: Linter.RuleEntry<[]>;
|
|
4007
4164
|
/**
|
|
4008
4165
|
* Disallows 'createRef' in function components.
|
|
4009
4166
|
* @see https://eslint-react.xyz/docs/rules/no-create-ref
|
|
4010
4167
|
*/
|
|
4011
|
-
'react/no-create-ref'?: Linter.RuleEntry<[]>;
|
|
4012
|
-
/**
|
|
4013
|
-
* Disallows the 'defaultProps' property in favor of ES6 default parameters.
|
|
4014
|
-
* @see https://eslint-react.xyz/docs/rules/no-default-props
|
|
4015
|
-
*/
|
|
4016
|
-
'react/no-default-props'?: Linter.RuleEntry<[]>;
|
|
4168
|
+
'react/x-no-create-ref'?: Linter.RuleEntry<[]>;
|
|
4017
4169
|
/**
|
|
4018
4170
|
* Disallows direct mutation of 'this.state'.
|
|
4019
4171
|
* @see https://eslint-react.xyz/docs/rules/no-direct-mutation-state
|
|
4020
4172
|
*/
|
|
4021
|
-
'react/no-direct-mutation-state'?: Linter.RuleEntry<[]>;
|
|
4173
|
+
'react/x-no-direct-mutation-state'?: Linter.RuleEntry<[]>;
|
|
4022
4174
|
/**
|
|
4023
4175
|
* Prevents duplicate 'key' props on sibling elements when rendering lists.
|
|
4024
4176
|
* @see https://eslint-react.xyz/docs/rules/no-duplicate-key
|
|
4025
4177
|
*/
|
|
4026
|
-
'react/no-duplicate-key'?: Linter.RuleEntry<[]>;
|
|
4027
|
-
/**
|
|
4028
|
-
* Disallows certain props on components.
|
|
4029
|
-
* @see https://eslint-react.xyz/docs/rules/no-forbidden-props
|
|
4030
|
-
* @deprecated
|
|
4031
|
-
*/
|
|
4032
|
-
'react/no-forbidden-props'?: Linter.RuleEntry<ReactNoForbiddenProps>;
|
|
4178
|
+
'react/x-no-duplicate-key'?: Linter.RuleEntry<[]>;
|
|
4033
4179
|
/**
|
|
4034
4180
|
* Replaces usage of 'forwardRef' with passing 'ref' as a prop.
|
|
4035
4181
|
* @see https://eslint-react.xyz/docs/rules/no-forward-ref
|
|
4036
4182
|
*/
|
|
4037
|
-
'react/no-forward-ref'?: Linter.RuleEntry<[]>;
|
|
4183
|
+
'react/x-no-forward-ref'?: Linter.RuleEntry<[]>;
|
|
4184
|
+
/**
|
|
4185
|
+
* Prevents implicitly passing the 'children' prop to components.
|
|
4186
|
+
* @see https://eslint-react.xyz/docs/rules/no-implicit-children
|
|
4187
|
+
*/
|
|
4188
|
+
'react/x-no-implicit-children'?: Linter.RuleEntry<[]>;
|
|
4038
4189
|
/**
|
|
4039
4190
|
* Prevents implicitly passing the 'key' prop to components.
|
|
4040
4191
|
* @see https://eslint-react.xyz/docs/rules/no-implicit-key
|
|
4041
4192
|
*/
|
|
4042
|
-
'react/no-implicit-key'?: Linter.RuleEntry<[]>;
|
|
4193
|
+
'react/x-no-implicit-key'?: Linter.RuleEntry<[]>;
|
|
4194
|
+
/**
|
|
4195
|
+
* Prevents implicitly passing the 'ref' prop to components.
|
|
4196
|
+
* @see https://eslint-react.xyz/docs/rules/no-implicit-ref
|
|
4197
|
+
*/
|
|
4198
|
+
'react/x-no-implicit-ref'?: Linter.RuleEntry<[]>;
|
|
4043
4199
|
/**
|
|
4044
4200
|
* Prevents problematic leaked values from being rendered.
|
|
4045
4201
|
* @see https://eslint-react.xyz/docs/rules/no-leaked-conditional-rendering
|
|
4046
4202
|
*/
|
|
4047
|
-
'react/no-leaked-conditional-rendering'?: Linter.RuleEntry<[]>;
|
|
4203
|
+
'react/x-no-leaked-conditional-rendering'?: Linter.RuleEntry<[]>;
|
|
4048
4204
|
/**
|
|
4049
4205
|
* Enforces that all components have a 'displayName' that can be used in DevTools.
|
|
4050
4206
|
* @see https://eslint-react.xyz/docs/rules/no-missing-component-display-name
|
|
4051
4207
|
*/
|
|
4052
|
-
'react/no-missing-component-display-name'?: Linter.RuleEntry<[]>;
|
|
4208
|
+
'react/x-no-missing-component-display-name'?: Linter.RuleEntry<[]>;
|
|
4053
4209
|
/**
|
|
4054
4210
|
* Enforces that all contexts have a 'displayName' that can be used in DevTools.
|
|
4055
4211
|
* @see https://eslint-react.xyz/docs/rules/no-missing-context-display-name
|
|
4056
4212
|
*/
|
|
4057
|
-
'react/no-missing-context-display-name'?: Linter.RuleEntry<[]>;
|
|
4213
|
+
'react/x-no-missing-context-display-name'?: Linter.RuleEntry<[]>;
|
|
4058
4214
|
/**
|
|
4059
4215
|
* Disallows missing 'key' on items in list rendering.
|
|
4060
4216
|
* @see https://eslint-react.xyz/docs/rules/no-missing-key
|
|
4061
4217
|
*/
|
|
4062
|
-
'react/no-missing-key'?: Linter.RuleEntry<[]>;
|
|
4218
|
+
'react/x-no-missing-key'?: Linter.RuleEntry<[]>;
|
|
4063
4219
|
/**
|
|
4064
4220
|
* Prevents incorrect usage of 'captureOwnerStack'.
|
|
4065
4221
|
* @see https://eslint-react.xyz/docs/rules/no-misused-capture-owner-stack
|
|
4066
4222
|
*/
|
|
4067
|
-
'react/no-misused-capture-owner-stack'?: Linter.RuleEntry<[]>;
|
|
4223
|
+
'react/x-no-misused-capture-owner-stack'?: Linter.RuleEntry<[]>;
|
|
4068
4224
|
/**
|
|
4069
4225
|
* Disallows nesting component definitions inside other components.
|
|
4070
4226
|
* @see https://eslint-react.xyz/docs/rules/no-nested-component-definitions
|
|
4071
4227
|
*/
|
|
4072
|
-
'react/no-nested-component-definitions'?: Linter.RuleEntry<[]>;
|
|
4228
|
+
'react/x-no-nested-component-definitions'?: Linter.RuleEntry<[]>;
|
|
4073
4229
|
/**
|
|
4074
|
-
* Disallows nesting lazy component declarations inside other components.
|
|
4230
|
+
* Disallows nesting lazy component declarations inside other components or hooks.
|
|
4075
4231
|
* @see https://eslint-react.xyz/docs/rules/no-nested-lazy-component-declarations
|
|
4076
4232
|
*/
|
|
4077
|
-
'react/no-nested-lazy-component-declarations'?: Linter.RuleEntry<[]>;
|
|
4078
|
-
/**
|
|
4079
|
-
* Disallows 'propTypes' in favor of TypeScript or another type-checking solution.
|
|
4080
|
-
* @see https://eslint-react.xyz/docs/rules/no-prop-types
|
|
4081
|
-
*/
|
|
4082
|
-
'react/no-prop-types'?: Linter.RuleEntry<[]>;
|
|
4233
|
+
'react/x-no-nested-lazy-component-declarations'?: Linter.RuleEntry<[]>;
|
|
4083
4234
|
/**
|
|
4084
4235
|
* Disallows 'shouldComponentUpdate' when extending 'React.PureComponent'.
|
|
4085
4236
|
* @see https://eslint-react.xyz/docs/rules/no-redundant-should-component-update
|
|
4086
4237
|
*/
|
|
4087
|
-
'react/no-redundant-should-component-update'?: Linter.RuleEntry<[]>;
|
|
4238
|
+
'react/x-no-redundant-should-component-update'?: Linter.RuleEntry<[]>;
|
|
4088
4239
|
/**
|
|
4089
4240
|
* Disallows calling 'this.setState' in 'componentDidMount' outside functions such as callbacks.
|
|
4090
4241
|
* @see https://eslint-react.xyz/docs/rules/no-set-state-in-component-did-mount
|
|
4091
4242
|
*/
|
|
4092
|
-
'react/no-set-state-in-component-did-mount'?: Linter.RuleEntry<[]>;
|
|
4243
|
+
'react/x-no-set-state-in-component-did-mount'?: Linter.RuleEntry<[]>;
|
|
4093
4244
|
/**
|
|
4094
4245
|
* Disallows calling 'this.setState' in 'componentDidUpdate' outside functions such as callbacks.
|
|
4095
4246
|
* @see https://eslint-react.xyz/docs/rules/no-set-state-in-component-did-update
|
|
4096
4247
|
*/
|
|
4097
|
-
'react/no-set-state-in-component-did-update'?: Linter.RuleEntry<[]>;
|
|
4248
|
+
'react/x-no-set-state-in-component-did-update'?: Linter.RuleEntry<[]>;
|
|
4098
4249
|
/**
|
|
4099
4250
|
* Disallows calling 'this.setState' in 'componentWillUpdate' outside functions such as callbacks.
|
|
4100
4251
|
* @see https://eslint-react.xyz/docs/rules/no-set-state-in-component-will-update
|
|
4101
4252
|
*/
|
|
4102
|
-
'react/no-set-state-in-component-will-update'?: Linter.RuleEntry<[]>;
|
|
4103
|
-
/**
|
|
4104
|
-
* Replaces string refs with callback refs.
|
|
4105
|
-
* @see https://eslint-react.xyz/docs/rules/no-string-refs
|
|
4106
|
-
*/
|
|
4107
|
-
'react/no-string-refs'?: Linter.RuleEntry<[]>;
|
|
4108
|
-
/**
|
|
4109
|
-
* Disallows unnecessary 'key' props on nested child elements when rendering lists.
|
|
4110
|
-
* @see https://eslint-react.xyz/docs/rules/no-unnecessary-key
|
|
4111
|
-
*/
|
|
4112
|
-
'react/no-unnecessary-key'?: Linter.RuleEntry<[]>;
|
|
4253
|
+
'react/x-no-set-state-in-component-will-update'?: Linter.RuleEntry<[]>;
|
|
4113
4254
|
/**
|
|
4114
4255
|
* Disallows unnecessary usage of 'useCallback'.
|
|
4115
4256
|
* @see https://eslint-react.xyz/docs/rules/no-unnecessary-use-callback
|
|
4116
4257
|
*/
|
|
4117
|
-
'react/no-unnecessary-use-callback'?: Linter.RuleEntry<[]>;
|
|
4258
|
+
'react/x-no-unnecessary-use-callback'?: Linter.RuleEntry<[]>;
|
|
4118
4259
|
/**
|
|
4119
4260
|
* Disallows unnecessary usage of 'useMemo'.
|
|
4120
4261
|
* @see https://eslint-react.xyz/docs/rules/no-unnecessary-use-memo
|
|
4121
4262
|
*/
|
|
4122
|
-
'react/no-unnecessary-use-memo'?: Linter.RuleEntry<[]>;
|
|
4263
|
+
'react/x-no-unnecessary-use-memo'?: Linter.RuleEntry<[]>;
|
|
4123
4264
|
/**
|
|
4124
4265
|
* Enforces that a function with the 'use' prefix uses at least one Hook inside it.
|
|
4125
4266
|
* @see https://eslint-react.xyz/docs/rules/no-unnecessary-use-prefix
|
|
4126
4267
|
*/
|
|
4127
|
-
'react/no-unnecessary-use-prefix'?: Linter.RuleEntry<[]>;
|
|
4128
|
-
/**
|
|
4129
|
-
* Disallows unnecessary usage of 'useRef'.
|
|
4130
|
-
* @see https://eslint-react.xyz/docs/rules/no-unnecessary-use-ref
|
|
4131
|
-
*/
|
|
4132
|
-
'react/no-unnecessary-use-ref'?: Linter.RuleEntry<[]>;
|
|
4268
|
+
'react/x-no-unnecessary-use-prefix'?: Linter.RuleEntry<[]>;
|
|
4133
4269
|
/**
|
|
4134
4270
|
* Warns about the use of 'UNSAFE_componentWillMount' in class components.
|
|
4135
4271
|
* @see https://eslint-react.xyz/docs/rules/no-unsafe-component-will-mount
|
|
4136
4272
|
*/
|
|
4137
|
-
'react/no-unsafe-component-will-mount'?: Linter.RuleEntry<[]>;
|
|
4273
|
+
'react/x-no-unsafe-component-will-mount'?: Linter.RuleEntry<[]>;
|
|
4138
4274
|
/**
|
|
4139
4275
|
* Warns about the use of 'UNSAFE_componentWillReceiveProps' in class components.
|
|
4140
4276
|
* @see https://eslint-react.xyz/docs/rules/no-unsafe-component-will-receive-props
|
|
4141
4277
|
*/
|
|
4142
|
-
'react/no-unsafe-component-will-receive-props'?: Linter.RuleEntry<[]>;
|
|
4278
|
+
'react/x-no-unsafe-component-will-receive-props'?: Linter.RuleEntry<[]>;
|
|
4143
4279
|
/**
|
|
4144
4280
|
* Warns about the use of 'UNSAFE_componentWillUpdate' in class components.
|
|
4145
4281
|
* @see https://eslint-react.xyz/docs/rules/no-unsafe-component-will-update
|
|
4146
4282
|
*/
|
|
4147
|
-
'react/no-unsafe-component-will-update'?: Linter.RuleEntry<[]>;
|
|
4283
|
+
'react/x-no-unsafe-component-will-update'?: Linter.RuleEntry<[]>;
|
|
4148
4284
|
/**
|
|
4149
4285
|
* Prevents non-stable values (i.e., object literals) from being used as a value for 'Context.Provider'.
|
|
4150
4286
|
* @see https://eslint-react.xyz/docs/rules/no-unstable-context-value
|
|
4151
4287
|
*/
|
|
4152
|
-
'react/no-unstable-context-value'?: Linter.RuleEntry<[]>;
|
|
4288
|
+
'react/x-no-unstable-context-value'?: Linter.RuleEntry<[]>;
|
|
4153
4289
|
/**
|
|
4154
4290
|
* Prevents using referential-type values as default props in object destructuring.
|
|
4155
4291
|
* @see https://eslint-react.xyz/docs/rules/no-unstable-default-props
|
|
4156
4292
|
*/
|
|
4157
|
-
'react/no-unstable-default-props'?: Linter.RuleEntry<
|
|
4293
|
+
'react/x-no-unstable-default-props'?: Linter.RuleEntry<ReactXNoUnstableDefaultProps>;
|
|
4158
4294
|
/**
|
|
4159
4295
|
* Warns about unused class component methods and properties.
|
|
4160
4296
|
* @see https://eslint-react.xyz/docs/rules/no-unused-class-component-members
|
|
4161
4297
|
*/
|
|
4162
|
-
'react/no-unused-class-component-members'?: Linter.RuleEntry<[]>;
|
|
4298
|
+
'react/x-no-unused-class-component-members'?: Linter.RuleEntry<[]>;
|
|
4163
4299
|
/**
|
|
4164
4300
|
* Warns about component props that are defined but never used.
|
|
4165
4301
|
* @see https://eslint-react.xyz/docs/rules/no-unused-props
|
|
4166
4302
|
*/
|
|
4167
|
-
'react/no-unused-props'?: Linter.RuleEntry<[]>;
|
|
4303
|
+
'react/x-no-unused-props'?: Linter.RuleEntry<[]>;
|
|
4168
4304
|
/**
|
|
4169
4305
|
* Warns about unused class component state.
|
|
4170
4306
|
* @see https://eslint-react.xyz/docs/rules/no-unused-state
|
|
4171
4307
|
*/
|
|
4172
|
-
'react/no-unused-state'?: Linter.RuleEntry<[]>;
|
|
4308
|
+
'react/x-no-unused-state'?: Linter.RuleEntry<[]>;
|
|
4173
4309
|
/**
|
|
4174
4310
|
* Replaces usage of 'useContext' with 'use'.
|
|
4175
4311
|
* @see https://eslint-react.xyz/docs/rules/no-use-context
|
|
4176
4312
|
*/
|
|
4177
|
-
'react/no-use-context'?: Linter.RuleEntry<[]>;
|
|
4178
|
-
/**
|
|
4179
|
-
* Disallows useless 'forwardRef' calls on components that don't use 'ref's.
|
|
4180
|
-
* @see https://eslint-react.xyz/docs/rules/no-useless-forward-ref
|
|
4181
|
-
*/
|
|
4182
|
-
'react/no-useless-forward-ref'?: Linter.RuleEntry<[]>;
|
|
4183
|
-
/**
|
|
4184
|
-
* Disallows useless fragment elements.
|
|
4185
|
-
* @see https://eslint-react.xyz/docs/rules/no-useless-fragment
|
|
4186
|
-
*/
|
|
4187
|
-
'react/no-useless-fragment'?: Linter.RuleEntry<ReactNoUselessFragment>;
|
|
4313
|
+
'react/x-no-use-context'?: Linter.RuleEntry<[]>;
|
|
4188
4314
|
/**
|
|
4189
4315
|
* Enforces destructuring assignment for component props and context.
|
|
4190
4316
|
* @see https://eslint-react.xyz/docs/rules/prefer-destructuring-assignment
|
|
4191
4317
|
*/
|
|
4192
|
-
'react/prefer-destructuring-assignment'?: Linter.RuleEntry<[]>;
|
|
4318
|
+
'react/x-prefer-destructuring-assignment'?: Linter.RuleEntry<[]>;
|
|
4193
4319
|
/**
|
|
4194
4320
|
* Enforces importing React via a namespace import.
|
|
4195
4321
|
* @see https://eslint-react.xyz/docs/rules/prefer-namespace-import
|
|
4196
4322
|
*/
|
|
4197
|
-
'react/prefer-namespace-import'?: Linter.RuleEntry<[]>;
|
|
4323
|
+
'react/x-prefer-namespace-import'?: Linter.RuleEntry<[]>;
|
|
4324
|
+
/**
|
|
4325
|
+
* Validates that components and hooks are pure by checking that they do not call known-impure functions during render.
|
|
4326
|
+
* @see https://eslint-react.xyz/docs/rules/purity
|
|
4327
|
+
*/
|
|
4328
|
+
'react/x-purity'?: Linter.RuleEntry<[]>;
|
|
4198
4329
|
/**
|
|
4199
|
-
*
|
|
4200
|
-
* @see https://eslint-react.xyz/docs/rules/
|
|
4330
|
+
* Validates correct usage of refs by checking that 'ref.current' is not read or written during render.
|
|
4331
|
+
* @see https://eslint-react.xyz/docs/rules/refs
|
|
4201
4332
|
*/
|
|
4202
|
-
'react/
|
|
4333
|
+
'react/x-refs'?: Linter.RuleEntry<[]>;
|
|
4203
4334
|
/**
|
|
4204
|
-
* Enforces
|
|
4205
|
-
* @see https://
|
|
4335
|
+
* Enforces the Rules of Hooks.
|
|
4336
|
+
* @see https://react.dev/reference/rules/rules-of-hooks
|
|
4206
4337
|
*/
|
|
4207
|
-
'react/
|
|
4338
|
+
'react/x-rules-of-hooks'?: Linter.RuleEntry<ReactXRulesOfHooks>;
|
|
4339
|
+
/**
|
|
4340
|
+
* Validates against setting state synchronously in an effect, which can lead to re-renders that degrade performance.
|
|
4341
|
+
* @see https://eslint-react.xyz/docs/rules/set-state-in-effect
|
|
4342
|
+
*/
|
|
4343
|
+
'react/x-set-state-in-effect'?: Linter.RuleEntry<[]>;
|
|
4344
|
+
/**
|
|
4345
|
+
* Validates against unconditionally setting state during render, which can trigger additional renders and potential infinite render loops.
|
|
4346
|
+
* @see https://eslint-react.xyz/docs/rules/set-state-in-render
|
|
4347
|
+
*/
|
|
4348
|
+
'react/x-set-state-in-render'?: Linter.RuleEntry<[]>;
|
|
4349
|
+
/**
|
|
4350
|
+
* Validates against syntax that React Compiler does not support.
|
|
4351
|
+
* @see https://eslint-react.xyz/docs/rules/unsupported-syntax
|
|
4352
|
+
*/
|
|
4353
|
+
'react/x-unsupported-syntax'?: Linter.RuleEntry<[]>;
|
|
4354
|
+
/**
|
|
4355
|
+
* Validates that 'useMemo' is called with a callback that returns a value.
|
|
4356
|
+
* @see https://eslint-react.xyz/docs/rules/use-memo
|
|
4357
|
+
*/
|
|
4358
|
+
'react/x-use-memo'?: Linter.RuleEntry<[]>;
|
|
4359
|
+
/**
|
|
4360
|
+
* Enforces correct usage of 'useState', including destructuring, symmetric naming of the value and setter, and wrapping expensive initializers in a lazy initializer function.
|
|
4361
|
+
* @see https://eslint-react.xyz/docs/rules/use-state
|
|
4362
|
+
*/
|
|
4363
|
+
'react/x-use-state'?: Linter.RuleEntry<ReactXUseState>;
|
|
4208
4364
|
/**
|
|
4209
4365
|
* disallow confusing quantifiers
|
|
4210
4366
|
* @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/confusing-quantifier.html
|
|
@@ -5385,6 +5541,11 @@ interface RuleOptions {
|
|
|
5385
5541
|
* @see https://sveltejs.github.io/eslint-plugin-svelte/rules/max-attributes-per-line/
|
|
5386
5542
|
*/
|
|
5387
5543
|
'svelte/max-attributes-per-line'?: Linter.RuleEntry<SvelteMaxAttributesPerLine>;
|
|
5544
|
+
/**
|
|
5545
|
+
* enforce maximum number of lines in svelte component blocks
|
|
5546
|
+
* @see https://sveltejs.github.io/eslint-plugin-svelte/rules/max-lines-per-block/
|
|
5547
|
+
*/
|
|
5548
|
+
'svelte/max-lines-per-block'?: Linter.RuleEntry<SvelteMaxLinesPerBlock>;
|
|
5388
5549
|
/**
|
|
5389
5550
|
* enforce unified spacing in mustache
|
|
5390
5551
|
* @see https://sveltejs.github.io/eslint-plugin-svelte/rules/mustache-spacing/
|
|
@@ -5484,7 +5645,7 @@ interface RuleOptions {
|
|
|
5484
5645
|
*/
|
|
5485
5646
|
'svelte/no-navigation-without-base'?: Linter.RuleEntry<SvelteNoNavigationWithoutBase>;
|
|
5486
5647
|
/**
|
|
5487
|
-
* disallow
|
|
5648
|
+
* disallow internal navigation (links, `goto()`, `pushState()`, `replaceState()`) without a `resolve()`
|
|
5488
5649
|
* @see https://sveltejs.github.io/eslint-plugin-svelte/rules/no-navigation-without-resolve/
|
|
5489
5650
|
*/
|
|
5490
5651
|
'svelte/no-navigation-without-resolve'?: Linter.RuleEntry<SvelteNoNavigationWithoutResolve>;
|
|
@@ -6112,6 +6273,11 @@ interface RuleOptions {
|
|
|
6112
6273
|
* @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/require-top-level-describe.md
|
|
6113
6274
|
*/
|
|
6114
6275
|
'test/require-top-level-describe'?: Linter.RuleEntry<TestRequireTopLevelDescribe>;
|
|
6276
|
+
/**
|
|
6277
|
+
* enforce unbound methods are called with their expected scope
|
|
6278
|
+
* @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/unbound-method.md
|
|
6279
|
+
*/
|
|
6280
|
+
'test/unbound-method'?: Linter.RuleEntry<TestUnboundMethod>;
|
|
6115
6281
|
/**
|
|
6116
6282
|
* enforce valid describe callback
|
|
6117
6283
|
* @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/valid-describe-callback.md
|
|
@@ -6942,730 +7108,750 @@ interface RuleOptions {
|
|
|
6942
7108
|
'unicode-bom'?: Linter.RuleEntry<UnicodeBom>;
|
|
6943
7109
|
/**
|
|
6944
7110
|
* Improve regexes by making them shorter, consistent, and safer.
|
|
6945
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7111
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/better-regex.md
|
|
6946
7112
|
*/
|
|
6947
7113
|
'unicorn/better-regex'?: Linter.RuleEntry<UnicornBetterRegex>;
|
|
6948
7114
|
/**
|
|
6949
7115
|
* Enforce a specific parameter name in catch clauses.
|
|
6950
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7116
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/catch-error-name.md
|
|
6951
7117
|
*/
|
|
6952
7118
|
'unicorn/catch-error-name'?: Linter.RuleEntry<UnicornCatchErrorName>;
|
|
6953
7119
|
/**
|
|
6954
7120
|
* Enforce consistent assertion style with `node:assert`.
|
|
6955
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7121
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/consistent-assert.md
|
|
6956
7122
|
*/
|
|
6957
7123
|
'unicorn/consistent-assert'?: Linter.RuleEntry<[]>;
|
|
6958
7124
|
/**
|
|
6959
7125
|
* Prefer passing `Date` directly to the constructor when cloning.
|
|
6960
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7126
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/consistent-date-clone.md
|
|
6961
7127
|
*/
|
|
6962
7128
|
'unicorn/consistent-date-clone'?: Linter.RuleEntry<[]>;
|
|
6963
7129
|
/**
|
|
6964
7130
|
* Use destructured variables over properties.
|
|
6965
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7131
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/consistent-destructuring.md
|
|
6966
7132
|
*/
|
|
6967
7133
|
'unicorn/consistent-destructuring'?: Linter.RuleEntry<[]>;
|
|
6968
7134
|
/**
|
|
6969
7135
|
* Prefer consistent types when spreading a ternary in an array literal.
|
|
6970
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7136
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/consistent-empty-array-spread.md
|
|
6971
7137
|
*/
|
|
6972
7138
|
'unicorn/consistent-empty-array-spread'?: Linter.RuleEntry<[]>;
|
|
6973
7139
|
/**
|
|
6974
7140
|
* Enforce consistent style for element existence checks with `indexOf()`, `lastIndexOf()`, `findIndex()`, and `findLastIndex()`.
|
|
6975
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7141
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/consistent-existence-index-check.md
|
|
6976
7142
|
*/
|
|
6977
7143
|
'unicorn/consistent-existence-index-check'?: Linter.RuleEntry<[]>;
|
|
6978
7144
|
/**
|
|
6979
7145
|
* Move function definitions to the highest possible scope.
|
|
6980
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7146
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/consistent-function-scoping.md
|
|
6981
7147
|
*/
|
|
6982
7148
|
'unicorn/consistent-function-scoping'?: Linter.RuleEntry<UnicornConsistentFunctionScoping>;
|
|
7149
|
+
/**
|
|
7150
|
+
* Enforce consistent style for escaping `${` in template literals.
|
|
7151
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/consistent-template-literal-escape.md
|
|
7152
|
+
*/
|
|
7153
|
+
'unicorn/consistent-template-literal-escape'?: Linter.RuleEntry<[]>;
|
|
6983
7154
|
/**
|
|
6984
7155
|
* Enforce correct `Error` subclassing.
|
|
6985
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7156
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/custom-error-definition.md
|
|
6986
7157
|
*/
|
|
6987
7158
|
'unicorn/custom-error-definition'?: Linter.RuleEntry<[]>;
|
|
6988
7159
|
/**
|
|
6989
7160
|
* Enforce no spaces between braces.
|
|
6990
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7161
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/empty-brace-spaces.md
|
|
6991
7162
|
*/
|
|
6992
7163
|
'unicorn/empty-brace-spaces'?: Linter.RuleEntry<[]>;
|
|
6993
7164
|
/**
|
|
6994
7165
|
* Enforce passing a `message` value when creating a built-in error.
|
|
6995
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7166
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/error-message.md
|
|
6996
7167
|
*/
|
|
6997
7168
|
'unicorn/error-message'?: Linter.RuleEntry<[]>;
|
|
6998
7169
|
/**
|
|
6999
7170
|
* Require escape sequences to use uppercase or lowercase values.
|
|
7000
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7171
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/escape-case.md
|
|
7001
7172
|
*/
|
|
7002
7173
|
'unicorn/escape-case'?: Linter.RuleEntry<UnicornEscapeCase>;
|
|
7003
7174
|
/**
|
|
7004
7175
|
* Add expiration conditions to TODO comments.
|
|
7005
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7176
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/expiring-todo-comments.md
|
|
7006
7177
|
*/
|
|
7007
7178
|
'unicorn/expiring-todo-comments'?: Linter.RuleEntry<UnicornExpiringTodoComments>;
|
|
7008
7179
|
/**
|
|
7009
7180
|
* Enforce explicitly comparing the `length` or `size` property of a value.
|
|
7010
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7181
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/explicit-length-check.md
|
|
7011
7182
|
*/
|
|
7012
7183
|
'unicorn/explicit-length-check'?: Linter.RuleEntry<UnicornExplicitLengthCheck>;
|
|
7013
7184
|
/**
|
|
7014
7185
|
* Enforce a case style for filenames.
|
|
7015
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7186
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/filename-case.md
|
|
7016
7187
|
*/
|
|
7017
7188
|
'unicorn/filename-case'?: Linter.RuleEntry<UnicornFilenameCase>;
|
|
7018
7189
|
/**
|
|
7019
7190
|
* Enforce specific import styles per module.
|
|
7020
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7191
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/import-style.md
|
|
7021
7192
|
*/
|
|
7022
7193
|
'unicorn/import-style'?: Linter.RuleEntry<UnicornImportStyle>;
|
|
7023
7194
|
/**
|
|
7024
7195
|
* Prevent usage of variables from outside the scope of isolated functions.
|
|
7025
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7196
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/isolated-functions.md
|
|
7026
7197
|
*/
|
|
7027
7198
|
'unicorn/isolated-functions'?: Linter.RuleEntry<UnicornIsolatedFunctions>;
|
|
7028
7199
|
/**
|
|
7029
7200
|
* Enforce the use of `new` for all builtins, except `String`, `Number`, `Boolean`, `Symbol` and `BigInt`.
|
|
7030
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7201
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/new-for-builtins.md
|
|
7031
7202
|
*/
|
|
7032
7203
|
'unicorn/new-for-builtins'?: Linter.RuleEntry<[]>;
|
|
7033
7204
|
/**
|
|
7034
7205
|
* Enforce specifying rules to disable in `eslint-disable` comments.
|
|
7035
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7206
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-abusive-eslint-disable.md
|
|
7036
7207
|
*/
|
|
7037
7208
|
'unicorn/no-abusive-eslint-disable'?: Linter.RuleEntry<[]>;
|
|
7038
7209
|
/**
|
|
7039
7210
|
* Disallow recursive access to `this` within getters and setters.
|
|
7040
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7211
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-accessor-recursion.md
|
|
7041
7212
|
*/
|
|
7042
7213
|
'unicorn/no-accessor-recursion'?: Linter.RuleEntry<[]>;
|
|
7043
7214
|
/**
|
|
7044
7215
|
* Disallow anonymous functions and classes as the default export.
|
|
7045
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7216
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-anonymous-default-export.md
|
|
7046
7217
|
*/
|
|
7047
7218
|
'unicorn/no-anonymous-default-export'?: Linter.RuleEntry<[]>;
|
|
7048
7219
|
/**
|
|
7049
7220
|
* Prevent passing a function reference directly to iterator methods.
|
|
7050
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7221
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-array-callback-reference.md
|
|
7051
7222
|
*/
|
|
7052
7223
|
'unicorn/no-array-callback-reference'?: Linter.RuleEntry<[]>;
|
|
7053
7224
|
/**
|
|
7054
7225
|
* Prefer `for…of` over the `forEach` method.
|
|
7055
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7226
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-array-for-each.md
|
|
7056
7227
|
*/
|
|
7057
7228
|
'unicorn/no-array-for-each'?: Linter.RuleEntry<[]>;
|
|
7058
7229
|
/**
|
|
7059
7230
|
* Disallow using the `this` argument in array methods.
|
|
7060
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7231
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-array-method-this-argument.md
|
|
7061
7232
|
*/
|
|
7062
7233
|
'unicorn/no-array-method-this-argument'?: Linter.RuleEntry<[]>;
|
|
7063
7234
|
/**
|
|
7064
7235
|
* Replaced by `unicorn/prefer-single-call` which covers more cases.
|
|
7065
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7236
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/deleted-and-deprecated-rules.md#no-array-push-push
|
|
7066
7237
|
* @deprecated
|
|
7067
7238
|
*/
|
|
7068
7239
|
'unicorn/no-array-push-push'?: Linter.RuleEntry<[]>;
|
|
7069
7240
|
/**
|
|
7070
7241
|
* Disallow `Array#reduce()` and `Array#reduceRight()`.
|
|
7071
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7242
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-array-reduce.md
|
|
7072
7243
|
*/
|
|
7073
7244
|
'unicorn/no-array-reduce'?: Linter.RuleEntry<UnicornNoArrayReduce>;
|
|
7074
7245
|
/**
|
|
7075
7246
|
* Prefer `Array#toReversed()` over `Array#reverse()`.
|
|
7076
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7247
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-array-reverse.md
|
|
7077
7248
|
*/
|
|
7078
7249
|
'unicorn/no-array-reverse'?: Linter.RuleEntry<UnicornNoArrayReverse>;
|
|
7079
7250
|
/**
|
|
7080
7251
|
* Prefer `Array#toSorted()` over `Array#sort()`.
|
|
7081
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7252
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-array-sort.md
|
|
7082
7253
|
*/
|
|
7083
7254
|
'unicorn/no-array-sort'?: Linter.RuleEntry<UnicornNoArraySort>;
|
|
7084
7255
|
/**
|
|
7085
7256
|
* Disallow member access from await expression.
|
|
7086
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7257
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-await-expression-member.md
|
|
7087
7258
|
*/
|
|
7088
7259
|
'unicorn/no-await-expression-member'?: Linter.RuleEntry<[]>;
|
|
7089
7260
|
/**
|
|
7090
7261
|
* Disallow using `await` in `Promise` method parameters.
|
|
7091
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7262
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-await-in-promise-methods.md
|
|
7092
7263
|
*/
|
|
7093
7264
|
'unicorn/no-await-in-promise-methods'?: Linter.RuleEntry<[]>;
|
|
7094
7265
|
/**
|
|
7095
7266
|
* Do not use leading/trailing space between `console.log` parameters.
|
|
7096
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7267
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-console-spaces.md
|
|
7097
7268
|
*/
|
|
7098
7269
|
'unicorn/no-console-spaces'?: Linter.RuleEntry<[]>;
|
|
7099
7270
|
/**
|
|
7100
7271
|
* Do not use `document.cookie` directly.
|
|
7101
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7272
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-document-cookie.md
|
|
7102
7273
|
*/
|
|
7103
7274
|
'unicorn/no-document-cookie'?: Linter.RuleEntry<[]>;
|
|
7104
7275
|
/**
|
|
7105
7276
|
* Disallow empty files.
|
|
7106
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7277
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-empty-file.md
|
|
7107
7278
|
*/
|
|
7108
7279
|
'unicorn/no-empty-file'?: Linter.RuleEntry<[]>;
|
|
7109
7280
|
/**
|
|
7110
7281
|
* Do not use a `for` loop that can be replaced with a `for-of` loop.
|
|
7111
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7282
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-for-loop.md
|
|
7112
7283
|
*/
|
|
7113
7284
|
'unicorn/no-for-loop'?: Linter.RuleEntry<[]>;
|
|
7114
7285
|
/**
|
|
7115
7286
|
* Enforce the use of Unicode escapes instead of hexadecimal escapes.
|
|
7116
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7287
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-hex-escape.md
|
|
7117
7288
|
*/
|
|
7118
7289
|
'unicorn/no-hex-escape'?: Linter.RuleEntry<[]>;
|
|
7119
7290
|
/**
|
|
7120
7291
|
* Disallow immediate mutation after variable assignment.
|
|
7121
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7292
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-immediate-mutation.md
|
|
7122
7293
|
*/
|
|
7123
7294
|
'unicorn/no-immediate-mutation'?: Linter.RuleEntry<[]>;
|
|
7124
7295
|
/**
|
|
7125
7296
|
* Replaced by `unicorn/no-instanceof-builtins` which covers more cases.
|
|
7126
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7297
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/deleted-and-deprecated-rules.md#no-instanceof-array
|
|
7127
7298
|
* @deprecated
|
|
7128
7299
|
*/
|
|
7129
7300
|
'unicorn/no-instanceof-array'?: Linter.RuleEntry<[]>;
|
|
7130
7301
|
/**
|
|
7131
7302
|
* Disallow `instanceof` with built-in objects
|
|
7132
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7303
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-instanceof-builtins.md
|
|
7133
7304
|
*/
|
|
7134
7305
|
'unicorn/no-instanceof-builtins'?: Linter.RuleEntry<UnicornNoInstanceofBuiltins>;
|
|
7135
7306
|
/**
|
|
7136
7307
|
* Disallow invalid options in `fetch()` and `new Request()`.
|
|
7137
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7308
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-invalid-fetch-options.md
|
|
7138
7309
|
*/
|
|
7139
7310
|
'unicorn/no-invalid-fetch-options'?: Linter.RuleEntry<[]>;
|
|
7140
7311
|
/**
|
|
7141
7312
|
* Prevent calling `EventTarget#removeEventListener()` with the result of an expression.
|
|
7142
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7313
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-invalid-remove-event-listener.md
|
|
7143
7314
|
*/
|
|
7144
7315
|
'unicorn/no-invalid-remove-event-listener'?: Linter.RuleEntry<[]>;
|
|
7145
7316
|
/**
|
|
7146
7317
|
* Disallow identifiers starting with `new` or `class`.
|
|
7147
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7318
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-keyword-prefix.md
|
|
7148
7319
|
*/
|
|
7149
7320
|
'unicorn/no-keyword-prefix'?: Linter.RuleEntry<UnicornNoKeywordPrefix>;
|
|
7150
7321
|
/**
|
|
7151
7322
|
* Replaced by `unicorn/no-unnecessary-slice-end` which covers more cases.
|
|
7152
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7323
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/deleted-and-deprecated-rules.md#no-length-as-slice-end
|
|
7153
7324
|
* @deprecated
|
|
7154
7325
|
*/
|
|
7155
7326
|
'unicorn/no-length-as-slice-end'?: Linter.RuleEntry<[]>;
|
|
7156
7327
|
/**
|
|
7157
7328
|
* Disallow `if` statements as the only statement in `if` blocks without `else`.
|
|
7158
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7329
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-lonely-if.md
|
|
7159
7330
|
*/
|
|
7160
7331
|
'unicorn/no-lonely-if'?: Linter.RuleEntry<[]>;
|
|
7161
7332
|
/**
|
|
7162
7333
|
* Disallow a magic number as the `depth` argument in `Array#flat(…).`
|
|
7163
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7334
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-magic-array-flat-depth.md
|
|
7164
7335
|
*/
|
|
7165
7336
|
'unicorn/no-magic-array-flat-depth'?: Linter.RuleEntry<[]>;
|
|
7166
7337
|
/**
|
|
7167
7338
|
* Disallow named usage of default import and export.
|
|
7168
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7339
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-named-default.md
|
|
7169
7340
|
*/
|
|
7170
7341
|
'unicorn/no-named-default'?: Linter.RuleEntry<[]>;
|
|
7171
7342
|
/**
|
|
7172
7343
|
* Disallow negated conditions.
|
|
7173
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7344
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-negated-condition.md
|
|
7174
7345
|
*/
|
|
7175
7346
|
'unicorn/no-negated-condition'?: Linter.RuleEntry<[]>;
|
|
7176
7347
|
/**
|
|
7177
7348
|
* Disallow negated expression in equality check.
|
|
7178
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7349
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-negation-in-equality-check.md
|
|
7179
7350
|
*/
|
|
7180
7351
|
'unicorn/no-negation-in-equality-check'?: Linter.RuleEntry<[]>;
|
|
7181
7352
|
/**
|
|
7182
7353
|
* Disallow nested ternary expressions.
|
|
7183
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7354
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-nested-ternary.md
|
|
7184
7355
|
*/
|
|
7185
7356
|
'unicorn/no-nested-ternary'?: Linter.RuleEntry<[]>;
|
|
7186
7357
|
/**
|
|
7187
7358
|
* Disallow `new Array()`.
|
|
7188
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7359
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-new-array.md
|
|
7189
7360
|
*/
|
|
7190
7361
|
'unicorn/no-new-array'?: Linter.RuleEntry<[]>;
|
|
7191
7362
|
/**
|
|
7192
7363
|
* Enforce the use of `Buffer.from()` and `Buffer.alloc()` instead of the deprecated `new Buffer()`.
|
|
7193
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7364
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-new-buffer.md
|
|
7194
7365
|
*/
|
|
7195
7366
|
'unicorn/no-new-buffer'?: Linter.RuleEntry<[]>;
|
|
7196
7367
|
/**
|
|
7197
7368
|
* Disallow the use of the `null` literal.
|
|
7198
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7369
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-null.md
|
|
7199
7370
|
*/
|
|
7200
7371
|
'unicorn/no-null'?: Linter.RuleEntry<UnicornNoNull>;
|
|
7201
7372
|
/**
|
|
7202
7373
|
* Disallow the use of objects as default parameters.
|
|
7203
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7374
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-object-as-default-parameter.md
|
|
7204
7375
|
*/
|
|
7205
7376
|
'unicorn/no-object-as-default-parameter'?: Linter.RuleEntry<[]>;
|
|
7206
7377
|
/**
|
|
7207
7378
|
* Disallow `process.exit()`.
|
|
7208
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7379
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-process-exit.md
|
|
7209
7380
|
*/
|
|
7210
7381
|
'unicorn/no-process-exit'?: Linter.RuleEntry<[]>;
|
|
7211
7382
|
/**
|
|
7212
7383
|
* Disallow passing single-element arrays to `Promise` methods.
|
|
7213
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7384
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-single-promise-in-promise-methods.md
|
|
7214
7385
|
*/
|
|
7215
7386
|
'unicorn/no-single-promise-in-promise-methods'?: Linter.RuleEntry<[]>;
|
|
7216
7387
|
/**
|
|
7217
7388
|
* Disallow classes that only have static members.
|
|
7218
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7389
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-static-only-class.md
|
|
7219
7390
|
*/
|
|
7220
7391
|
'unicorn/no-static-only-class'?: Linter.RuleEntry<[]>;
|
|
7221
7392
|
/**
|
|
7222
7393
|
* Disallow `then` property.
|
|
7223
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7394
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-thenable.md
|
|
7224
7395
|
*/
|
|
7225
7396
|
'unicorn/no-thenable'?: Linter.RuleEntry<[]>;
|
|
7226
7397
|
/**
|
|
7227
7398
|
* Disallow assigning `this` to a variable.
|
|
7228
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7399
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-this-assignment.md
|
|
7229
7400
|
*/
|
|
7230
7401
|
'unicorn/no-this-assignment'?: Linter.RuleEntry<[]>;
|
|
7231
7402
|
/**
|
|
7232
7403
|
* Disallow comparing `undefined` using `typeof`.
|
|
7233
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7404
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-typeof-undefined.md
|
|
7234
7405
|
*/
|
|
7235
7406
|
'unicorn/no-typeof-undefined'?: Linter.RuleEntry<UnicornNoTypeofUndefined>;
|
|
7236
7407
|
/**
|
|
7237
7408
|
* Disallow using `1` as the `depth` argument of `Array#flat()`.
|
|
7238
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7409
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-unnecessary-array-flat-depth.md
|
|
7239
7410
|
*/
|
|
7240
7411
|
'unicorn/no-unnecessary-array-flat-depth'?: Linter.RuleEntry<[]>;
|
|
7241
7412
|
/**
|
|
7242
7413
|
* Disallow using `.length` or `Infinity` as the `deleteCount` or `skipCount` argument of `Array#{splice,toSpliced}()`.
|
|
7243
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7414
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-unnecessary-array-splice-count.md
|
|
7244
7415
|
*/
|
|
7245
7416
|
'unicorn/no-unnecessary-array-splice-count'?: Linter.RuleEntry<[]>;
|
|
7246
7417
|
/**
|
|
7247
7418
|
* Disallow awaiting non-promise values.
|
|
7248
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7419
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-unnecessary-await.md
|
|
7249
7420
|
*/
|
|
7250
7421
|
'unicorn/no-unnecessary-await'?: Linter.RuleEntry<[]>;
|
|
7251
7422
|
/**
|
|
7252
7423
|
* Enforce the use of built-in methods instead of unnecessary polyfills.
|
|
7253
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7424
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-unnecessary-polyfills.md
|
|
7254
7425
|
*/
|
|
7255
7426
|
'unicorn/no-unnecessary-polyfills'?: Linter.RuleEntry<UnicornNoUnnecessaryPolyfills>;
|
|
7256
7427
|
/**
|
|
7257
7428
|
* Disallow using `.length` or `Infinity` as the `end` argument of `{Array,String,TypedArray}#slice()`.
|
|
7258
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7429
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-unnecessary-slice-end.md
|
|
7259
7430
|
*/
|
|
7260
7431
|
'unicorn/no-unnecessary-slice-end'?: Linter.RuleEntry<[]>;
|
|
7261
7432
|
/**
|
|
7262
7433
|
* Disallow unreadable array destructuring.
|
|
7263
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7434
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-unreadable-array-destructuring.md
|
|
7264
7435
|
*/
|
|
7265
7436
|
'unicorn/no-unreadable-array-destructuring'?: Linter.RuleEntry<[]>;
|
|
7266
7437
|
/**
|
|
7267
7438
|
* Disallow unreadable IIFEs.
|
|
7268
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7439
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-unreadable-iife.md
|
|
7269
7440
|
*/
|
|
7270
7441
|
'unicorn/no-unreadable-iife'?: Linter.RuleEntry<[]>;
|
|
7271
7442
|
/**
|
|
7272
7443
|
* Disallow unused object properties.
|
|
7273
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7444
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-unused-properties.md
|
|
7274
7445
|
*/
|
|
7275
7446
|
'unicorn/no-unused-properties'?: Linter.RuleEntry<[]>;
|
|
7276
7447
|
/**
|
|
7277
7448
|
* Disallow useless values or fallbacks in `Set`, `Map`, `WeakSet`, or `WeakMap`.
|
|
7278
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7449
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-useless-collection-argument.md
|
|
7279
7450
|
*/
|
|
7280
7451
|
'unicorn/no-useless-collection-argument'?: Linter.RuleEntry<[]>;
|
|
7281
7452
|
/**
|
|
7282
7453
|
* Disallow unnecessary `Error.captureStackTrace(…)`.
|
|
7283
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7454
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-useless-error-capture-stack-trace.md
|
|
7284
7455
|
*/
|
|
7285
7456
|
'unicorn/no-useless-error-capture-stack-trace'?: Linter.RuleEntry<[]>;
|
|
7286
7457
|
/**
|
|
7287
7458
|
* Disallow useless fallback when spreading in object literals.
|
|
7288
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7459
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-useless-fallback-in-spread.md
|
|
7289
7460
|
*/
|
|
7290
7461
|
'unicorn/no-useless-fallback-in-spread'?: Linter.RuleEntry<[]>;
|
|
7462
|
+
/**
|
|
7463
|
+
* Disallow unnecessary `.toArray()` on iterators.
|
|
7464
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-useless-iterator-to-array.md
|
|
7465
|
+
*/
|
|
7466
|
+
'unicorn/no-useless-iterator-to-array'?: Linter.RuleEntry<[]>;
|
|
7291
7467
|
/**
|
|
7292
7468
|
* Disallow useless array length check.
|
|
7293
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7469
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-useless-length-check.md
|
|
7294
7470
|
*/
|
|
7295
7471
|
'unicorn/no-useless-length-check'?: Linter.RuleEntry<[]>;
|
|
7296
7472
|
/**
|
|
7297
7473
|
* Disallow returning/yielding `Promise.resolve/reject()` in async functions or promise callbacks
|
|
7298
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7474
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-useless-promise-resolve-reject.md
|
|
7299
7475
|
*/
|
|
7300
7476
|
'unicorn/no-useless-promise-resolve-reject'?: Linter.RuleEntry<[]>;
|
|
7301
7477
|
/**
|
|
7302
7478
|
* Disallow unnecessary spread.
|
|
7303
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7479
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-useless-spread.md
|
|
7304
7480
|
*/
|
|
7305
7481
|
'unicorn/no-useless-spread'?: Linter.RuleEntry<[]>;
|
|
7306
7482
|
/**
|
|
7307
7483
|
* Disallow useless case in switch statements.
|
|
7308
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7484
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-useless-switch-case.md
|
|
7309
7485
|
*/
|
|
7310
7486
|
'unicorn/no-useless-switch-case'?: Linter.RuleEntry<[]>;
|
|
7311
7487
|
/**
|
|
7312
7488
|
* Disallow useless `undefined`.
|
|
7313
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7489
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-useless-undefined.md
|
|
7314
7490
|
*/
|
|
7315
7491
|
'unicorn/no-useless-undefined'?: Linter.RuleEntry<UnicornNoUselessUndefined>;
|
|
7316
7492
|
/**
|
|
7317
7493
|
* Disallow number literals with zero fractions or dangling dots.
|
|
7318
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7494
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/no-zero-fractions.md
|
|
7319
7495
|
*/
|
|
7320
7496
|
'unicorn/no-zero-fractions'?: Linter.RuleEntry<[]>;
|
|
7321
7497
|
/**
|
|
7322
7498
|
* Enforce proper case for numeric literals.
|
|
7323
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7499
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/number-literal-case.md
|
|
7324
7500
|
*/
|
|
7325
7501
|
'unicorn/number-literal-case'?: Linter.RuleEntry<UnicornNumberLiteralCase>;
|
|
7326
7502
|
/**
|
|
7327
7503
|
* Enforce the style of numeric separators by correctly grouping digits.
|
|
7328
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7504
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/numeric-separators-style.md
|
|
7329
7505
|
*/
|
|
7330
7506
|
'unicorn/numeric-separators-style'?: Linter.RuleEntry<UnicornNumericSeparatorsStyle>;
|
|
7331
7507
|
/**
|
|
7332
7508
|
* Prefer `.addEventListener()` and `.removeEventListener()` over `on`-functions.
|
|
7333
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7509
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-add-event-listener.md
|
|
7334
7510
|
*/
|
|
7335
7511
|
'unicorn/prefer-add-event-listener'?: Linter.RuleEntry<UnicornPreferAddEventListener>;
|
|
7336
7512
|
/**
|
|
7337
7513
|
* Prefer `.find(…)` and `.findLast(…)` over the first or last element from `.filter(…)`.
|
|
7338
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7514
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-array-find.md
|
|
7339
7515
|
*/
|
|
7340
7516
|
'unicorn/prefer-array-find'?: Linter.RuleEntry<UnicornPreferArrayFind>;
|
|
7341
7517
|
/**
|
|
7342
7518
|
* Prefer `Array#flat()` over legacy techniques to flatten arrays.
|
|
7343
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7519
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-array-flat.md
|
|
7344
7520
|
*/
|
|
7345
7521
|
'unicorn/prefer-array-flat'?: Linter.RuleEntry<UnicornPreferArrayFlat>;
|
|
7346
7522
|
/**
|
|
7347
7523
|
* Prefer `.flatMap(…)` over `.map(…).flat()`.
|
|
7348
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7524
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-array-flat-map.md
|
|
7349
7525
|
*/
|
|
7350
7526
|
'unicorn/prefer-array-flat-map'?: Linter.RuleEntry<[]>;
|
|
7351
7527
|
/**
|
|
7352
7528
|
* Prefer `Array#{indexOf,lastIndexOf}()` over `Array#{findIndex,findLastIndex}()` when looking for the index of an item.
|
|
7353
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7529
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-array-index-of.md
|
|
7354
7530
|
*/
|
|
7355
7531
|
'unicorn/prefer-array-index-of'?: Linter.RuleEntry<[]>;
|
|
7356
7532
|
/**
|
|
7357
7533
|
* Prefer `.some(…)` over `.filter(…).length` check and `.{find,findLast,findIndex,findLastIndex}(…)`.
|
|
7358
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7534
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-array-some.md
|
|
7359
7535
|
*/
|
|
7360
7536
|
'unicorn/prefer-array-some'?: Linter.RuleEntry<[]>;
|
|
7361
7537
|
/**
|
|
7362
7538
|
* Prefer `.at()` method for index access and `String#charAt()`.
|
|
7363
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7539
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-at.md
|
|
7364
7540
|
*/
|
|
7365
7541
|
'unicorn/prefer-at'?: Linter.RuleEntry<UnicornPreferAt>;
|
|
7366
7542
|
/**
|
|
7367
7543
|
* Prefer `BigInt` literals over the constructor.
|
|
7368
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7544
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-bigint-literals.md
|
|
7369
7545
|
*/
|
|
7370
7546
|
'unicorn/prefer-bigint-literals'?: Linter.RuleEntry<[]>;
|
|
7371
7547
|
/**
|
|
7372
7548
|
* Prefer `Blob#arrayBuffer()` over `FileReader#readAsArrayBuffer(…)` and `Blob#text()` over `FileReader#readAsText(…)`.
|
|
7373
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7549
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-blob-reading-methods.md
|
|
7374
7550
|
*/
|
|
7375
7551
|
'unicorn/prefer-blob-reading-methods'?: Linter.RuleEntry<[]>;
|
|
7376
7552
|
/**
|
|
7377
7553
|
* Prefer class field declarations over `this` assignments in constructors.
|
|
7378
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7554
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-class-fields.md
|
|
7379
7555
|
*/
|
|
7380
7556
|
'unicorn/prefer-class-fields'?: Linter.RuleEntry<[]>;
|
|
7381
7557
|
/**
|
|
7382
7558
|
* Prefer using `Element#classList.toggle()` to toggle class names.
|
|
7383
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7559
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-classlist-toggle.md
|
|
7384
7560
|
*/
|
|
7385
7561
|
'unicorn/prefer-classlist-toggle'?: Linter.RuleEntry<[]>;
|
|
7386
7562
|
/**
|
|
7387
7563
|
* Prefer `String#codePointAt(…)` over `String#charCodeAt(…)` and `String.fromCodePoint(…)` over `String.fromCharCode(…)`.
|
|
7388
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7564
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-code-point.md
|
|
7389
7565
|
*/
|
|
7390
7566
|
'unicorn/prefer-code-point'?: Linter.RuleEntry<[]>;
|
|
7391
7567
|
/**
|
|
7392
7568
|
* Prefer `Date.now()` to get the number of milliseconds since the Unix Epoch.
|
|
7393
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7569
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-date-now.md
|
|
7394
7570
|
*/
|
|
7395
7571
|
'unicorn/prefer-date-now'?: Linter.RuleEntry<[]>;
|
|
7396
7572
|
/**
|
|
7397
7573
|
* Prefer default parameters over reassignment.
|
|
7398
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7574
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-default-parameters.md
|
|
7399
7575
|
*/
|
|
7400
7576
|
'unicorn/prefer-default-parameters'?: Linter.RuleEntry<[]>;
|
|
7401
7577
|
/**
|
|
7402
7578
|
* Prefer `Node#append()` over `Node#appendChild()`.
|
|
7403
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7579
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-dom-node-append.md
|
|
7404
7580
|
*/
|
|
7405
7581
|
'unicorn/prefer-dom-node-append'?: Linter.RuleEntry<[]>;
|
|
7406
7582
|
/**
|
|
7407
7583
|
* Prefer using `.dataset` on DOM elements over calling attribute methods.
|
|
7408
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7584
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-dom-node-dataset.md
|
|
7409
7585
|
*/
|
|
7410
7586
|
'unicorn/prefer-dom-node-dataset'?: Linter.RuleEntry<[]>;
|
|
7411
7587
|
/**
|
|
7412
7588
|
* Prefer `childNode.remove()` over `parentNode.removeChild(childNode)`.
|
|
7413
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7589
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-dom-node-remove.md
|
|
7414
7590
|
*/
|
|
7415
7591
|
'unicorn/prefer-dom-node-remove'?: Linter.RuleEntry<[]>;
|
|
7416
7592
|
/**
|
|
7417
7593
|
* Prefer `.textContent` over `.innerText`.
|
|
7418
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7594
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-dom-node-text-content.md
|
|
7419
7595
|
*/
|
|
7420
7596
|
'unicorn/prefer-dom-node-text-content'?: Linter.RuleEntry<[]>;
|
|
7421
7597
|
/**
|
|
7422
7598
|
* Prefer `EventTarget` over `EventEmitter`.
|
|
7423
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7599
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-event-target.md
|
|
7424
7600
|
*/
|
|
7425
7601
|
'unicorn/prefer-event-target'?: Linter.RuleEntry<[]>;
|
|
7426
7602
|
/**
|
|
7427
7603
|
* Prefer `export…from` when re-exporting.
|
|
7428
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7604
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-export-from.md
|
|
7429
7605
|
*/
|
|
7430
7606
|
'unicorn/prefer-export-from'?: Linter.RuleEntry<UnicornPreferExportFrom>;
|
|
7431
7607
|
/**
|
|
7432
7608
|
* Prefer `globalThis` over `window`, `self`, and `global`.
|
|
7433
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7609
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-global-this.md
|
|
7434
7610
|
*/
|
|
7435
7611
|
'unicorn/prefer-global-this'?: Linter.RuleEntry<[]>;
|
|
7436
7612
|
/**
|
|
7437
7613
|
* Prefer `import.meta.{dirname,filename}` over legacy techniques for getting file paths.
|
|
7438
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7614
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-import-meta-properties.md
|
|
7439
7615
|
*/
|
|
7440
7616
|
'unicorn/prefer-import-meta-properties'?: Linter.RuleEntry<[]>;
|
|
7441
7617
|
/**
|
|
7442
7618
|
* Prefer `.includes()` over `.indexOf()`, `.lastIndexOf()`, and `Array#some()` when checking for existence or non-existence.
|
|
7443
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7619
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-includes.md
|
|
7444
7620
|
*/
|
|
7445
7621
|
'unicorn/prefer-includes'?: Linter.RuleEntry<[]>;
|
|
7446
7622
|
/**
|
|
7447
7623
|
* Prefer reading a JSON file as a buffer.
|
|
7448
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7624
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-json-parse-buffer.md
|
|
7449
7625
|
*/
|
|
7450
7626
|
'unicorn/prefer-json-parse-buffer'?: Linter.RuleEntry<[]>;
|
|
7451
7627
|
/**
|
|
7452
7628
|
* Prefer `KeyboardEvent#key` over `KeyboardEvent#keyCode`.
|
|
7453
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7629
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-keyboard-event-key.md
|
|
7454
7630
|
*/
|
|
7455
7631
|
'unicorn/prefer-keyboard-event-key'?: Linter.RuleEntry<[]>;
|
|
7456
7632
|
/**
|
|
7457
7633
|
* Prefer using a logical operator over a ternary.
|
|
7458
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7634
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-logical-operator-over-ternary.md
|
|
7459
7635
|
*/
|
|
7460
7636
|
'unicorn/prefer-logical-operator-over-ternary'?: Linter.RuleEntry<[]>;
|
|
7461
7637
|
/**
|
|
7462
7638
|
* Prefer `Math.min()` and `Math.max()` over ternaries for simple comparisons.
|
|
7463
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7639
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-math-min-max.md
|
|
7464
7640
|
*/
|
|
7465
7641
|
'unicorn/prefer-math-min-max'?: Linter.RuleEntry<[]>;
|
|
7466
7642
|
/**
|
|
7467
7643
|
* Enforce the use of `Math.trunc` instead of bitwise operators.
|
|
7468
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7644
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-math-trunc.md
|
|
7469
7645
|
*/
|
|
7470
7646
|
'unicorn/prefer-math-trunc'?: Linter.RuleEntry<[]>;
|
|
7471
7647
|
/**
|
|
7472
7648
|
* Prefer `.before()` over `.insertBefore()`, `.replaceWith()` over `.replaceChild()`, prefer one of `.before()`, `.after()`, `.append()` or `.prepend()` over `insertAdjacentText()` and `insertAdjacentElement()`.
|
|
7473
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7649
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-modern-dom-apis.md
|
|
7474
7650
|
*/
|
|
7475
7651
|
'unicorn/prefer-modern-dom-apis'?: Linter.RuleEntry<[]>;
|
|
7476
7652
|
/**
|
|
7477
7653
|
* Prefer modern `Math` APIs over legacy patterns.
|
|
7478
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7654
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-modern-math-apis.md
|
|
7479
7655
|
*/
|
|
7480
7656
|
'unicorn/prefer-modern-math-apis'?: Linter.RuleEntry<[]>;
|
|
7481
7657
|
/**
|
|
7482
7658
|
* Prefer JavaScript modules (ESM) over CommonJS.
|
|
7483
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7659
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-module.md
|
|
7484
7660
|
*/
|
|
7485
7661
|
'unicorn/prefer-module'?: Linter.RuleEntry<[]>;
|
|
7486
7662
|
/**
|
|
7487
7663
|
* Prefer using `String`, `Number`, `BigInt`, `Boolean`, and `Symbol` directly.
|
|
7488
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7664
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-native-coercion-functions.md
|
|
7489
7665
|
*/
|
|
7490
7666
|
'unicorn/prefer-native-coercion-functions'?: Linter.RuleEntry<[]>;
|
|
7491
7667
|
/**
|
|
7492
7668
|
* Prefer negative index over `.length - index` when possible.
|
|
7493
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7669
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-negative-index.md
|
|
7494
7670
|
*/
|
|
7495
7671
|
'unicorn/prefer-negative-index'?: Linter.RuleEntry<[]>;
|
|
7496
7672
|
/**
|
|
7497
7673
|
* Prefer using the `node:` protocol when importing Node.js builtin modules.
|
|
7498
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7674
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-node-protocol.md
|
|
7499
7675
|
*/
|
|
7500
7676
|
'unicorn/prefer-node-protocol'?: Linter.RuleEntry<[]>;
|
|
7501
7677
|
/**
|
|
7502
7678
|
* Prefer `Number` static properties over global ones.
|
|
7503
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7679
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-number-properties.md
|
|
7504
7680
|
*/
|
|
7505
7681
|
'unicorn/prefer-number-properties'?: Linter.RuleEntry<UnicornPreferNumberProperties>;
|
|
7506
7682
|
/**
|
|
7507
7683
|
* Prefer using `Object.fromEntries(…)` to transform a list of key-value pairs into an object.
|
|
7508
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7684
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-object-from-entries.md
|
|
7509
7685
|
*/
|
|
7510
7686
|
'unicorn/prefer-object-from-entries'?: Linter.RuleEntry<UnicornPreferObjectFromEntries>;
|
|
7511
7687
|
/**
|
|
7512
7688
|
* Prefer omitting the `catch` binding parameter.
|
|
7513
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7689
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-optional-catch-binding.md
|
|
7514
7690
|
*/
|
|
7515
7691
|
'unicorn/prefer-optional-catch-binding'?: Linter.RuleEntry<[]>;
|
|
7516
7692
|
/**
|
|
7517
7693
|
* Prefer borrowing methods from the prototype instead of the instance.
|
|
7518
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7694
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-prototype-methods.md
|
|
7519
7695
|
*/
|
|
7520
7696
|
'unicorn/prefer-prototype-methods'?: Linter.RuleEntry<[]>;
|
|
7521
7697
|
/**
|
|
7522
7698
|
* Prefer `.querySelector()` over `.getElementById()`, `.querySelectorAll()` over `.getElementsByClassName()` and `.getElementsByTagName()` and `.getElementsByName()`.
|
|
7523
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7699
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-query-selector.md
|
|
7524
7700
|
*/
|
|
7525
7701
|
'unicorn/prefer-query-selector'?: Linter.RuleEntry<[]>;
|
|
7526
7702
|
/**
|
|
7527
7703
|
* Prefer `Reflect.apply()` over `Function#apply()`.
|
|
7528
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7704
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-reflect-apply.md
|
|
7529
7705
|
*/
|
|
7530
7706
|
'unicorn/prefer-reflect-apply'?: Linter.RuleEntry<[]>;
|
|
7531
7707
|
/**
|
|
7532
7708
|
* Prefer `RegExp#test()` over `String#match()` and `RegExp#exec()`.
|
|
7533
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7709
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-regexp-test.md
|
|
7534
7710
|
*/
|
|
7535
7711
|
'unicorn/prefer-regexp-test'?: Linter.RuleEntry<[]>;
|
|
7536
7712
|
/**
|
|
7537
7713
|
* Prefer `Response.json()` over `new Response(JSON.stringify())`.
|
|
7538
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7714
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-response-static-json.md
|
|
7539
7715
|
*/
|
|
7540
7716
|
'unicorn/prefer-response-static-json'?: Linter.RuleEntry<[]>;
|
|
7541
7717
|
/**
|
|
7542
7718
|
* Prefer `Set#has()` over `Array#includes()` when checking for existence or non-existence.
|
|
7543
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7719
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-set-has.md
|
|
7544
7720
|
*/
|
|
7545
7721
|
'unicorn/prefer-set-has'?: Linter.RuleEntry<[]>;
|
|
7546
7722
|
/**
|
|
7547
7723
|
* Prefer using `Set#size` instead of `Array#length`.
|
|
7548
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7724
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-set-size.md
|
|
7549
7725
|
*/
|
|
7550
7726
|
'unicorn/prefer-set-size'?: Linter.RuleEntry<[]>;
|
|
7727
|
+
/**
|
|
7728
|
+
* Prefer simple conditions first in logical expressions.
|
|
7729
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-simple-condition-first.md
|
|
7730
|
+
*/
|
|
7731
|
+
'unicorn/prefer-simple-condition-first'?: Linter.RuleEntry<[]>;
|
|
7551
7732
|
/**
|
|
7552
7733
|
* Enforce combining multiple `Array#push()`, `Element#classList.{add,remove}()`, and `importScripts()` into one call.
|
|
7553
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7734
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-single-call.md
|
|
7554
7735
|
*/
|
|
7555
7736
|
'unicorn/prefer-single-call'?: Linter.RuleEntry<UnicornPreferSingleCall>;
|
|
7556
7737
|
/**
|
|
7557
7738
|
* Prefer the spread operator over `Array.from(…)`, `Array#concat(…)`, `Array#{slice,toSpliced}()` and `String#split('')`.
|
|
7558
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7739
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-spread.md
|
|
7559
7740
|
*/
|
|
7560
7741
|
'unicorn/prefer-spread'?: Linter.RuleEntry<[]>;
|
|
7561
7742
|
/**
|
|
7562
7743
|
* Prefer using the `String.raw` tag to avoid escaping `\`.
|
|
7563
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7744
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-string-raw.md
|
|
7564
7745
|
*/
|
|
7565
7746
|
'unicorn/prefer-string-raw'?: Linter.RuleEntry<[]>;
|
|
7566
7747
|
/**
|
|
7567
7748
|
* Prefer `String#replaceAll()` over regex searches with the global flag.
|
|
7568
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7749
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-string-replace-all.md
|
|
7569
7750
|
*/
|
|
7570
7751
|
'unicorn/prefer-string-replace-all'?: Linter.RuleEntry<[]>;
|
|
7571
7752
|
/**
|
|
7572
7753
|
* Prefer `String#slice()` over `String#substr()` and `String#substring()`.
|
|
7573
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7754
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-string-slice.md
|
|
7574
7755
|
*/
|
|
7575
7756
|
'unicorn/prefer-string-slice'?: Linter.RuleEntry<[]>;
|
|
7576
7757
|
/**
|
|
7577
7758
|
* Prefer `String#startsWith()` & `String#endsWith()` over `RegExp#test()`.
|
|
7578
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7759
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-string-starts-ends-with.md
|
|
7579
7760
|
*/
|
|
7580
7761
|
'unicorn/prefer-string-starts-ends-with'?: Linter.RuleEntry<[]>;
|
|
7581
7762
|
/**
|
|
7582
7763
|
* Prefer `String#trimStart()` / `String#trimEnd()` over `String#trimLeft()` / `String#trimRight()`.
|
|
7583
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7764
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-string-trim-start-end.md
|
|
7584
7765
|
*/
|
|
7585
7766
|
'unicorn/prefer-string-trim-start-end'?: Linter.RuleEntry<[]>;
|
|
7586
7767
|
/**
|
|
7587
7768
|
* Prefer using `structuredClone` to create a deep clone.
|
|
7588
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7769
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-structured-clone.md
|
|
7589
7770
|
*/
|
|
7590
7771
|
'unicorn/prefer-structured-clone'?: Linter.RuleEntry<UnicornPreferStructuredClone>;
|
|
7591
7772
|
/**
|
|
7592
7773
|
* Prefer `switch` over multiple `else-if`.
|
|
7593
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7774
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-switch.md
|
|
7594
7775
|
*/
|
|
7595
7776
|
'unicorn/prefer-switch'?: Linter.RuleEntry<UnicornPreferSwitch>;
|
|
7596
7777
|
/**
|
|
7597
7778
|
* Prefer ternary expressions over simple `if-else` statements.
|
|
7598
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7779
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-ternary.md
|
|
7599
7780
|
*/
|
|
7600
7781
|
'unicorn/prefer-ternary'?: Linter.RuleEntry<UnicornPreferTernary>;
|
|
7601
7782
|
/**
|
|
7602
7783
|
* Prefer top-level await over top-level promises and async function calls.
|
|
7603
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7784
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-top-level-await.md
|
|
7604
7785
|
*/
|
|
7605
7786
|
'unicorn/prefer-top-level-await'?: Linter.RuleEntry<[]>;
|
|
7606
7787
|
/**
|
|
7607
7788
|
* Enforce throwing `TypeError` in type checking conditions.
|
|
7608
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7789
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prefer-type-error.md
|
|
7609
7790
|
*/
|
|
7610
7791
|
'unicorn/prefer-type-error'?: Linter.RuleEntry<[]>;
|
|
7611
7792
|
/**
|
|
7612
7793
|
* Prevent abbreviations.
|
|
7613
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7794
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/prevent-abbreviations.md
|
|
7614
7795
|
*/
|
|
7615
7796
|
'unicorn/prevent-abbreviations'?: Linter.RuleEntry<UnicornPreventAbbreviations>;
|
|
7616
7797
|
/**
|
|
7617
7798
|
* Enforce consistent relative URL style.
|
|
7618
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7799
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/relative-url-style.md
|
|
7619
7800
|
*/
|
|
7620
7801
|
'unicorn/relative-url-style'?: Linter.RuleEntry<UnicornRelativeUrlStyle>;
|
|
7621
7802
|
/**
|
|
7622
7803
|
* Enforce using the separator argument with `Array#join()`.
|
|
7623
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7804
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/require-array-join-separator.md
|
|
7624
7805
|
*/
|
|
7625
7806
|
'unicorn/require-array-join-separator'?: Linter.RuleEntry<[]>;
|
|
7626
7807
|
/**
|
|
7627
7808
|
* Require non-empty module attributes for imports and exports
|
|
7628
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7809
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/require-module-attributes.md
|
|
7629
7810
|
*/
|
|
7630
7811
|
'unicorn/require-module-attributes'?: Linter.RuleEntry<[]>;
|
|
7631
7812
|
/**
|
|
7632
7813
|
* Require non-empty specifier list in import and export statements.
|
|
7633
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7814
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/require-module-specifiers.md
|
|
7634
7815
|
*/
|
|
7635
7816
|
'unicorn/require-module-specifiers'?: Linter.RuleEntry<[]>;
|
|
7636
7817
|
/**
|
|
7637
7818
|
* Enforce using the digits argument with `Number#toFixed()`.
|
|
7638
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7819
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/require-number-to-fixed-digits-argument.md
|
|
7639
7820
|
*/
|
|
7640
7821
|
'unicorn/require-number-to-fixed-digits-argument'?: Linter.RuleEntry<[]>;
|
|
7641
7822
|
/**
|
|
7642
7823
|
* Enforce using the `targetOrigin` argument with `window.postMessage()`.
|
|
7643
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7824
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/require-post-message-target-origin.md
|
|
7644
7825
|
*/
|
|
7645
7826
|
'unicorn/require-post-message-target-origin'?: Linter.RuleEntry<[]>;
|
|
7646
7827
|
/**
|
|
7647
7828
|
* Enforce better string content.
|
|
7648
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7829
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/string-content.md
|
|
7649
7830
|
*/
|
|
7650
7831
|
'unicorn/string-content'?: Linter.RuleEntry<UnicornStringContent>;
|
|
7651
7832
|
/**
|
|
7652
7833
|
* Enforce consistent brace style for `case` clauses.
|
|
7653
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7834
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/switch-case-braces.md
|
|
7654
7835
|
*/
|
|
7655
7836
|
'unicorn/switch-case-braces'?: Linter.RuleEntry<UnicornSwitchCaseBraces>;
|
|
7837
|
+
/**
|
|
7838
|
+
* Enforce consistent `break`/`return`/`continue`/`throw` position in `case` clauses.
|
|
7839
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/switch-case-break-position.md
|
|
7840
|
+
*/
|
|
7841
|
+
'unicorn/switch-case-break-position'?: Linter.RuleEntry<[]>;
|
|
7656
7842
|
/**
|
|
7657
7843
|
* Fix whitespace-insensitive template indentation.
|
|
7658
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7844
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/template-indent.md
|
|
7659
7845
|
*/
|
|
7660
7846
|
'unicorn/template-indent'?: Linter.RuleEntry<UnicornTemplateIndent>;
|
|
7661
7847
|
/**
|
|
7662
7848
|
* Enforce consistent case for text encoding identifiers.
|
|
7663
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7849
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/text-encoding-identifier-case.md
|
|
7664
7850
|
*/
|
|
7665
7851
|
'unicorn/text-encoding-identifier-case'?: Linter.RuleEntry<UnicornTextEncodingIdentifierCase>;
|
|
7666
7852
|
/**
|
|
7667
7853
|
* Require `new` when creating an error.
|
|
7668
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7854
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v64.0.0/docs/rules/throw-new-error.md
|
|
7669
7855
|
*/
|
|
7670
7856
|
'unicorn/throw-new-error'?: Linter.RuleEntry<[]>;
|
|
7671
7857
|
/**
|
|
@@ -11131,13 +11317,15 @@ type LogicalAssignmentOperators = (([] | ["always"] | ["always", {
|
|
|
11131
11317
|
}] | ["never"]) & unknown[]); // ----- markdown/fenced-code-language -----
|
|
11132
11318
|
type MarkdownFencedCodeLanguage = [] | [{
|
|
11133
11319
|
required?: string[];
|
|
11134
|
-
}]; // ----- markdown/
|
|
11320
|
+
}]; // ----- markdown/fenced-code-meta -----
|
|
11321
|
+
type MarkdownFencedCodeMeta = [] | [("always" | "never")]; // ----- markdown/heading-increment -----
|
|
11135
11322
|
type MarkdownHeadingIncrement = [] | [{
|
|
11136
11323
|
frontmatterTitle?: string;
|
|
11137
11324
|
}]; // ----- markdown/no-duplicate-definitions -----
|
|
11138
11325
|
type MarkdownNoDuplicateDefinitions = [] | [{
|
|
11139
11326
|
allowDefinitions?: string[];
|
|
11140
11327
|
allowFootnoteDefinitions?: string[];
|
|
11328
|
+
checkFootnoteDefinitions?: boolean;
|
|
11141
11329
|
}]; // ----- markdown/no-duplicate-headings -----
|
|
11142
11330
|
type MarkdownNoDuplicateHeadings = [] | [{
|
|
11143
11331
|
checkSiblingsOnly?: boolean;
|
|
@@ -11170,6 +11358,7 @@ type MarkdownNoSpaceInEmphasis = [] | [{
|
|
|
11170
11358
|
type MarkdownNoUnusedDefinitions = [] | [{
|
|
11171
11359
|
allowDefinitions?: string[];
|
|
11172
11360
|
allowFootnoteDefinitions?: string[];
|
|
11361
|
+
checkFootnoteDefinitions?: boolean;
|
|
11173
11362
|
}]; // ----- markdown/table-column-count -----
|
|
11174
11363
|
type MarkdownTableColumnCount = [] | [{
|
|
11175
11364
|
checkMissingCells?: boolean;
|
|
@@ -11924,26 +12113,132 @@ type OperatorLinebreak = [] | [("after" | "before" | "none" | null)] | [("after"
|
|
|
11924
12113
|
overrides?: {
|
|
11925
12114
|
[k: string]: ("after" | "before" | "none" | "ignore") | undefined;
|
|
11926
12115
|
};
|
|
11927
|
-
}]; // ----- padded-blocks -----
|
|
11928
|
-
type PaddedBlocks = [] | [(("always" | "never") | {
|
|
11929
|
-
blocks?: ("always" | "never");
|
|
11930
|
-
switches?: ("always" | "never");
|
|
11931
|
-
classes?: ("always" | "never");
|
|
11932
|
-
})] | [(("always" | "never") | {
|
|
11933
|
-
blocks?: ("always" | "never");
|
|
11934
|
-
switches?: ("always" | "never");
|
|
11935
|
-
classes?: ("always" | "never");
|
|
11936
|
-
}), {
|
|
11937
|
-
allowSingleLineBlocks?: boolean;
|
|
11938
|
-
}]; // ----- padding-line-between-statements -----
|
|
11939
|
-
type _PaddingLineBetweenStatementsPaddingType = ("any" | "never" | "always");
|
|
11940
|
-
type _PaddingLineBetweenStatementsStatementType = (("*" | "block-like" | "cjs-export" | "cjs-import" | "directive" | "expression" | "iife" | "multiline-block-like" | "multiline-expression" | "multiline-const" | "multiline-let" | "multiline-var" | "singleline-const" | "singleline-let" | "singleline-var" | "block" | "empty" | "function" | "break" | "case" | "class" | "const" | "continue" | "debugger" | "default" | "do" | "export" | "for" | "if" | "import" | "let" | "return" | "switch" | "throw" | "try" | "var" | "while" | "with") | [("*" | "block-like" | "cjs-export" | "cjs-import" | "directive" | "expression" | "iife" | "multiline-block-like" | "multiline-expression" | "multiline-const" | "multiline-let" | "multiline-var" | "singleline-const" | "singleline-let" | "singleline-var" | "block" | "empty" | "function" | "break" | "case" | "class" | "const" | "continue" | "debugger" | "default" | "do" | "export" | "for" | "if" | "import" | "let" | "return" | "switch" | "throw" | "try" | "var" | "while" | "with"), ...(("*" | "block-like" | "cjs-export" | "cjs-import" | "directive" | "expression" | "iife" | "multiline-block-like" | "multiline-expression" | "multiline-const" | "multiline-let" | "multiline-var" | "singleline-const" | "singleline-let" | "singleline-var" | "block" | "empty" | "function" | "break" | "case" | "class" | "const" | "continue" | "debugger" | "default" | "do" | "export" | "for" | "if" | "import" | "let" | "return" | "switch" | "throw" | "try" | "var" | "while" | "with"))[]]);
|
|
11941
|
-
type PaddingLineBetweenStatements = {
|
|
11942
|
-
blankLine: _PaddingLineBetweenStatementsPaddingType;
|
|
11943
|
-
prev: _PaddingLineBetweenStatementsStatementType;
|
|
11944
|
-
next: _PaddingLineBetweenStatementsStatementType;
|
|
11945
|
-
}[]; // ----- perfectionist/sort-array-includes -----
|
|
11946
|
-
type PerfectionistSortArrayIncludes = {
|
|
12116
|
+
}]; // ----- padded-blocks -----
|
|
12117
|
+
type PaddedBlocks = [] | [(("always" | "never") | {
|
|
12118
|
+
blocks?: ("always" | "never");
|
|
12119
|
+
switches?: ("always" | "never");
|
|
12120
|
+
classes?: ("always" | "never");
|
|
12121
|
+
})] | [(("always" | "never") | {
|
|
12122
|
+
blocks?: ("always" | "never");
|
|
12123
|
+
switches?: ("always" | "never");
|
|
12124
|
+
classes?: ("always" | "never");
|
|
12125
|
+
}), {
|
|
12126
|
+
allowSingleLineBlocks?: boolean;
|
|
12127
|
+
}]; // ----- padding-line-between-statements -----
|
|
12128
|
+
type _PaddingLineBetweenStatementsPaddingType = ("any" | "never" | "always");
|
|
12129
|
+
type _PaddingLineBetweenStatementsStatementType = (("*" | "block-like" | "cjs-export" | "cjs-import" | "directive" | "expression" | "iife" | "multiline-block-like" | "multiline-expression" | "multiline-const" | "multiline-let" | "multiline-var" | "singleline-const" | "singleline-let" | "singleline-var" | "block" | "empty" | "function" | "break" | "case" | "class" | "const" | "continue" | "debugger" | "default" | "do" | "export" | "for" | "if" | "import" | "let" | "return" | "switch" | "throw" | "try" | "var" | "while" | "with") | [("*" | "block-like" | "cjs-export" | "cjs-import" | "directive" | "expression" | "iife" | "multiline-block-like" | "multiline-expression" | "multiline-const" | "multiline-let" | "multiline-var" | "singleline-const" | "singleline-let" | "singleline-var" | "block" | "empty" | "function" | "break" | "case" | "class" | "const" | "continue" | "debugger" | "default" | "do" | "export" | "for" | "if" | "import" | "let" | "return" | "switch" | "throw" | "try" | "var" | "while" | "with"), ...(("*" | "block-like" | "cjs-export" | "cjs-import" | "directive" | "expression" | "iife" | "multiline-block-like" | "multiline-expression" | "multiline-const" | "multiline-let" | "multiline-var" | "singleline-const" | "singleline-let" | "singleline-var" | "block" | "empty" | "function" | "break" | "case" | "class" | "const" | "continue" | "debugger" | "default" | "do" | "export" | "for" | "if" | "import" | "let" | "return" | "switch" | "throw" | "try" | "var" | "while" | "with"))[]]);
|
|
12130
|
+
type PaddingLineBetweenStatements = {
|
|
12131
|
+
blankLine: _PaddingLineBetweenStatementsPaddingType;
|
|
12132
|
+
prev: _PaddingLineBetweenStatementsStatementType;
|
|
12133
|
+
next: _PaddingLineBetweenStatementsStatementType;
|
|
12134
|
+
}[]; // ----- perfectionist/sort-array-includes -----
|
|
12135
|
+
type PerfectionistSortArrayIncludes = {
|
|
12136
|
+
fallbackSort?: {
|
|
12137
|
+
type: ("alphabetical" | "natural" | "line-length" | "custom" | "unsorted" | "subgroup-order");
|
|
12138
|
+
order?: ("asc" | "desc");
|
|
12139
|
+
};
|
|
12140
|
+
type?: ("alphabetical" | "natural" | "line-length" | "custom" | "unsorted" | "subgroup-order");
|
|
12141
|
+
specialCharacters?: ("remove" | "trim" | "keep");
|
|
12142
|
+
ignoreCase?: boolean;
|
|
12143
|
+
alphabet?: string;
|
|
12144
|
+
locales?: (string | string[]);
|
|
12145
|
+
order?: ("asc" | "desc");
|
|
12146
|
+
customGroups?: ({
|
|
12147
|
+
fallbackSort?: {
|
|
12148
|
+
type: ("alphabetical" | "natural" | "line-length" | "custom" | "unsorted" | "subgroup-order");
|
|
12149
|
+
order?: ("asc" | "desc");
|
|
12150
|
+
};
|
|
12151
|
+
type?: ("alphabetical" | "natural" | "line-length" | "custom" | "unsorted" | "subgroup-order");
|
|
12152
|
+
groupName: string;
|
|
12153
|
+
newlinesInside?: ("ignore" | number);
|
|
12154
|
+
order?: ("asc" | "desc");
|
|
12155
|
+
anyOf: [{
|
|
12156
|
+
elementNamePattern?: (({
|
|
12157
|
+
pattern: string;
|
|
12158
|
+
flags?: string;
|
|
12159
|
+
} | string)[] | ({
|
|
12160
|
+
pattern: string;
|
|
12161
|
+
flags?: string;
|
|
12162
|
+
} | string));
|
|
12163
|
+
selector?: "literal";
|
|
12164
|
+
}, ...({
|
|
12165
|
+
elementNamePattern?: (({
|
|
12166
|
+
pattern: string;
|
|
12167
|
+
flags?: string;
|
|
12168
|
+
} | string)[] | ({
|
|
12169
|
+
pattern: string;
|
|
12170
|
+
flags?: string;
|
|
12171
|
+
} | string));
|
|
12172
|
+
selector?: "literal";
|
|
12173
|
+
})[]];
|
|
12174
|
+
} | {
|
|
12175
|
+
fallbackSort?: {
|
|
12176
|
+
type: ("alphabetical" | "natural" | "line-length" | "custom" | "unsorted" | "subgroup-order");
|
|
12177
|
+
order?: ("asc" | "desc");
|
|
12178
|
+
};
|
|
12179
|
+
type?: ("alphabetical" | "natural" | "line-length" | "custom" | "unsorted" | "subgroup-order");
|
|
12180
|
+
groupName: string;
|
|
12181
|
+
newlinesInside?: ("ignore" | number);
|
|
12182
|
+
order?: ("asc" | "desc");
|
|
12183
|
+
elementNamePattern?: (({
|
|
12184
|
+
pattern: string;
|
|
12185
|
+
flags?: string;
|
|
12186
|
+
} | string)[] | ({
|
|
12187
|
+
pattern: string;
|
|
12188
|
+
flags?: string;
|
|
12189
|
+
} | string));
|
|
12190
|
+
selector?: "literal";
|
|
12191
|
+
})[];
|
|
12192
|
+
newlinesInside?: (("ignore" | number) | "newlinesBetween");
|
|
12193
|
+
groups?: (string | [string, ...(string)[]] | {
|
|
12194
|
+
newlinesBetween: ("ignore" | number);
|
|
12195
|
+
} | {
|
|
12196
|
+
group: (string | [string, ...(string)[]]);
|
|
12197
|
+
fallbackSort?: {
|
|
12198
|
+
type: ("alphabetical" | "natural" | "line-length" | "custom" | "unsorted" | "subgroup-order");
|
|
12199
|
+
order?: ("asc" | "desc");
|
|
12200
|
+
};
|
|
12201
|
+
commentAbove?: string;
|
|
12202
|
+
type?: ("alphabetical" | "natural" | "line-length" | "custom" | "unsorted" | "subgroup-order");
|
|
12203
|
+
newlinesInside?: ("ignore" | number);
|
|
12204
|
+
order?: ("asc" | "desc");
|
|
12205
|
+
})[];
|
|
12206
|
+
newlinesBetween?: ("ignore" | number);
|
|
12207
|
+
useConfigurationIf?: {
|
|
12208
|
+
allNamesMatchPattern?: (({
|
|
12209
|
+
pattern: string;
|
|
12210
|
+
flags?: string;
|
|
12211
|
+
} | string)[] | ({
|
|
12212
|
+
pattern: string;
|
|
12213
|
+
flags?: string;
|
|
12214
|
+
} | string));
|
|
12215
|
+
matchesAstSelector?: string;
|
|
12216
|
+
};
|
|
12217
|
+
partitionByComment?: (boolean | (({
|
|
12218
|
+
pattern: string;
|
|
12219
|
+
flags?: string;
|
|
12220
|
+
} | string)[] | ({
|
|
12221
|
+
pattern: string;
|
|
12222
|
+
flags?: string;
|
|
12223
|
+
} | string)) | {
|
|
12224
|
+
block?: (boolean | (({
|
|
12225
|
+
pattern: string;
|
|
12226
|
+
flags?: string;
|
|
12227
|
+
} | string)[] | ({
|
|
12228
|
+
pattern: string;
|
|
12229
|
+
flags?: string;
|
|
12230
|
+
} | string)));
|
|
12231
|
+
line?: (boolean | (({
|
|
12232
|
+
pattern: string;
|
|
12233
|
+
flags?: string;
|
|
12234
|
+
} | string)[] | ({
|
|
12235
|
+
pattern: string;
|
|
12236
|
+
flags?: string;
|
|
12237
|
+
} | string)));
|
|
12238
|
+
});
|
|
12239
|
+
partitionByNewLine?: boolean;
|
|
12240
|
+
}[]; // ----- perfectionist/sort-arrays -----
|
|
12241
|
+
type PerfectionistSortArrays = {
|
|
11947
12242
|
fallbackSort?: {
|
|
11948
12243
|
type: ("alphabetical" | "natural" | "line-length" | "custom" | "unsorted" | "subgroup-order");
|
|
11949
12244
|
order?: ("asc" | "desc");
|
|
@@ -12015,7 +12310,7 @@ type PerfectionistSortArrayIncludes = {
|
|
|
12015
12310
|
order?: ("asc" | "desc");
|
|
12016
12311
|
})[];
|
|
12017
12312
|
newlinesBetween?: ("ignore" | number);
|
|
12018
|
-
useConfigurationIf
|
|
12313
|
+
useConfigurationIf: {
|
|
12019
12314
|
allNamesMatchPattern?: (({
|
|
12020
12315
|
pattern: string;
|
|
12021
12316
|
flags?: string;
|
|
@@ -12023,6 +12318,7 @@ type PerfectionistSortArrayIncludes = {
|
|
|
12023
12318
|
pattern: string;
|
|
12024
12319
|
flags?: string;
|
|
12025
12320
|
} | string));
|
|
12321
|
+
matchesAstSelector?: string;
|
|
12026
12322
|
};
|
|
12027
12323
|
partitionByComment?: (boolean | (({
|
|
12028
12324
|
pattern: string;
|
|
@@ -12048,7 +12344,7 @@ type PerfectionistSortArrayIncludes = {
|
|
|
12048
12344
|
});
|
|
12049
12345
|
partitionByNewLine?: boolean;
|
|
12050
12346
|
}[]; // ----- perfectionist/sort-classes -----
|
|
12051
|
-
type PerfectionistSortClasses =
|
|
12347
|
+
type PerfectionistSortClasses = {
|
|
12052
12348
|
fallbackSort?: {
|
|
12053
12349
|
type: ("alphabetical" | "natural" | "line-length" | "custom" | "unsorted" | "subgroup-order");
|
|
12054
12350
|
order?: ("asc" | "desc");
|
|
@@ -12165,6 +12461,16 @@ type PerfectionistSortClasses = [] | [{
|
|
|
12165
12461
|
order?: ("asc" | "desc");
|
|
12166
12462
|
})[];
|
|
12167
12463
|
newlinesBetween?: ("ignore" | number);
|
|
12464
|
+
useConfigurationIf?: {
|
|
12465
|
+
allNamesMatchPattern?: (({
|
|
12466
|
+
pattern: string;
|
|
12467
|
+
flags?: string;
|
|
12468
|
+
} | string)[] | ({
|
|
12469
|
+
pattern: string;
|
|
12470
|
+
flags?: string;
|
|
12471
|
+
} | string));
|
|
12472
|
+
matchesAstSelector?: string;
|
|
12473
|
+
};
|
|
12168
12474
|
useExperimentalDependencyDetection?: boolean;
|
|
12169
12475
|
ignoreCallbackDependenciesPatterns?: (({
|
|
12170
12476
|
pattern: string;
|
|
@@ -12196,7 +12502,7 @@ type PerfectionistSortClasses = [] | [{
|
|
|
12196
12502
|
} | string)));
|
|
12197
12503
|
});
|
|
12198
12504
|
partitionByNewLine?: boolean;
|
|
12199
|
-
}]; // ----- perfectionist/sort-decorators -----
|
|
12505
|
+
}[]; // ----- perfectionist/sort-decorators -----
|
|
12200
12506
|
type PerfectionistSortDecorators = {
|
|
12201
12507
|
fallbackSort?: {
|
|
12202
12508
|
type: ("alphabetical" | "natural" | "line-length" | "custom" | "unsorted" | "subgroup-order");
|
|
@@ -12295,7 +12601,7 @@ type PerfectionistSortDecorators = {
|
|
|
12295
12601
|
});
|
|
12296
12602
|
partitionByNewLine?: boolean;
|
|
12297
12603
|
}[]; // ----- perfectionist/sort-enums -----
|
|
12298
|
-
type PerfectionistSortEnums =
|
|
12604
|
+
type PerfectionistSortEnums = {
|
|
12299
12605
|
fallbackSort?: {
|
|
12300
12606
|
type: ("alphabetical" | "natural" | "line-length" | "custom" | "unsorted" | "subgroup-order");
|
|
12301
12607
|
order?: ("asc" | "desc");
|
|
@@ -12385,6 +12691,16 @@ type PerfectionistSortEnums = [] | [{
|
|
|
12385
12691
|
order?: ("asc" | "desc");
|
|
12386
12692
|
})[];
|
|
12387
12693
|
newlinesBetween?: ("ignore" | number);
|
|
12694
|
+
useConfigurationIf?: {
|
|
12695
|
+
allNamesMatchPattern?: (({
|
|
12696
|
+
pattern: string;
|
|
12697
|
+
flags?: string;
|
|
12698
|
+
} | string)[] | ({
|
|
12699
|
+
pattern: string;
|
|
12700
|
+
flags?: string;
|
|
12701
|
+
} | string));
|
|
12702
|
+
matchesAstSelector?: string;
|
|
12703
|
+
};
|
|
12388
12704
|
sortByValue?: ("always" | "ifNumericEnum" | "never");
|
|
12389
12705
|
useExperimentalDependencyDetection?: boolean;
|
|
12390
12706
|
partitionByComment?: (boolean | (({
|
|
@@ -12410,7 +12726,7 @@ type PerfectionistSortEnums = [] | [{
|
|
|
12410
12726
|
} | string)));
|
|
12411
12727
|
});
|
|
12412
12728
|
partitionByNewLine?: boolean;
|
|
12413
|
-
}]; // ----- perfectionist/sort-export-attributes -----
|
|
12729
|
+
}[]; // ----- perfectionist/sort-export-attributes -----
|
|
12414
12730
|
type PerfectionistSortExportAttributes = {
|
|
12415
12731
|
fallbackSort?: {
|
|
12416
12732
|
type: ("alphabetical" | "natural" | "line-length" | "custom" | "unsorted" | "subgroup-order");
|
|
@@ -12480,6 +12796,16 @@ type PerfectionistSortExportAttributes = {
|
|
|
12480
12796
|
order?: ("asc" | "desc");
|
|
12481
12797
|
})[];
|
|
12482
12798
|
newlinesBetween?: ("ignore" | number);
|
|
12799
|
+
useConfigurationIf?: {
|
|
12800
|
+
allNamesMatchPattern?: (({
|
|
12801
|
+
pattern: string;
|
|
12802
|
+
flags?: string;
|
|
12803
|
+
} | string)[] | ({
|
|
12804
|
+
pattern: string;
|
|
12805
|
+
flags?: string;
|
|
12806
|
+
} | string));
|
|
12807
|
+
matchesAstSelector?: string;
|
|
12808
|
+
};
|
|
12483
12809
|
partitionByComment?: (boolean | (({
|
|
12484
12810
|
pattern: string;
|
|
12485
12811
|
flags?: string;
|
|
@@ -12672,6 +12998,16 @@ type PerfectionistSortHeritageClauses = {
|
|
|
12672
12998
|
order?: ("asc" | "desc");
|
|
12673
12999
|
})[];
|
|
12674
13000
|
newlinesBetween?: ("ignore" | number);
|
|
13001
|
+
useConfigurationIf?: {
|
|
13002
|
+
allNamesMatchPattern?: (({
|
|
13003
|
+
pattern: string;
|
|
13004
|
+
flags?: string;
|
|
13005
|
+
} | string)[] | ({
|
|
13006
|
+
pattern: string;
|
|
13007
|
+
flags?: string;
|
|
13008
|
+
} | string));
|
|
13009
|
+
matchesAstSelector?: string;
|
|
13010
|
+
};
|
|
12675
13011
|
partitionByNewLine?: boolean;
|
|
12676
13012
|
partitionByComment?: (boolean | (({
|
|
12677
13013
|
pattern: string;
|
|
@@ -12765,6 +13101,16 @@ type PerfectionistSortImportAttributes = {
|
|
|
12765
13101
|
order?: ("asc" | "desc");
|
|
12766
13102
|
})[];
|
|
12767
13103
|
newlinesBetween?: ("ignore" | number);
|
|
13104
|
+
useConfigurationIf?: {
|
|
13105
|
+
allNamesMatchPattern?: (({
|
|
13106
|
+
pattern: string;
|
|
13107
|
+
flags?: string;
|
|
13108
|
+
} | string)[] | ({
|
|
13109
|
+
pattern: string;
|
|
13110
|
+
flags?: string;
|
|
13111
|
+
} | string));
|
|
13112
|
+
matchesAstSelector?: string;
|
|
13113
|
+
};
|
|
12768
13114
|
partitionByComment?: (boolean | (({
|
|
12769
13115
|
pattern: string;
|
|
12770
13116
|
flags?: string;
|
|
@@ -13033,6 +13379,7 @@ type PerfectionistSortInterfaces = {
|
|
|
13033
13379
|
pattern: string;
|
|
13034
13380
|
flags?: string;
|
|
13035
13381
|
} | string));
|
|
13382
|
+
matchesAstSelector?: string;
|
|
13036
13383
|
declarationMatchesPattern?: (({
|
|
13037
13384
|
scope?: ("shallow" | "deep");
|
|
13038
13385
|
pattern: string;
|
|
@@ -13139,6 +13486,16 @@ type PerfectionistSortIntersectionTypes = {
|
|
|
13139
13486
|
order?: ("asc" | "desc");
|
|
13140
13487
|
})[];
|
|
13141
13488
|
newlinesBetween?: ("ignore" | number);
|
|
13489
|
+
useConfigurationIf?: {
|
|
13490
|
+
allNamesMatchPattern?: (({
|
|
13491
|
+
pattern: string;
|
|
13492
|
+
flags?: string;
|
|
13493
|
+
} | string)[] | ({
|
|
13494
|
+
pattern: string;
|
|
13495
|
+
flags?: string;
|
|
13496
|
+
} | string));
|
|
13497
|
+
matchesAstSelector?: string;
|
|
13498
|
+
};
|
|
13142
13499
|
partitionByComment?: (boolean | (({
|
|
13143
13500
|
pattern: string;
|
|
13144
13501
|
flags?: string;
|
|
@@ -13267,6 +13624,7 @@ type PerfectionistSortJsxProps = {
|
|
|
13267
13624
|
pattern: string;
|
|
13268
13625
|
flags?: string;
|
|
13269
13626
|
} | string));
|
|
13627
|
+
matchesAstSelector?: string;
|
|
13270
13628
|
tagMatchesPattern?: (({
|
|
13271
13629
|
pattern: string;
|
|
13272
13630
|
flags?: string;
|
|
@@ -13354,6 +13712,7 @@ type PerfectionistSortMaps = {
|
|
|
13354
13712
|
pattern: string;
|
|
13355
13713
|
flags?: string;
|
|
13356
13714
|
} | string));
|
|
13715
|
+
matchesAstSelector?: string;
|
|
13357
13716
|
};
|
|
13358
13717
|
partitionByComment?: (boolean | (({
|
|
13359
13718
|
pattern: string;
|
|
@@ -13575,6 +13934,16 @@ type PerfectionistSortNamedExports = {
|
|
|
13575
13934
|
order?: ("asc" | "desc");
|
|
13576
13935
|
})[];
|
|
13577
13936
|
newlinesBetween?: ("ignore" | number);
|
|
13937
|
+
useConfigurationIf?: {
|
|
13938
|
+
allNamesMatchPattern?: (({
|
|
13939
|
+
pattern: string;
|
|
13940
|
+
flags?: string;
|
|
13941
|
+
} | string)[] | ({
|
|
13942
|
+
pattern: string;
|
|
13943
|
+
flags?: string;
|
|
13944
|
+
} | string));
|
|
13945
|
+
matchesAstSelector?: string;
|
|
13946
|
+
};
|
|
13578
13947
|
ignoreAlias?: boolean;
|
|
13579
13948
|
partitionByComment?: (boolean | (({
|
|
13580
13949
|
pattern: string;
|
|
@@ -13675,6 +14044,16 @@ type PerfectionistSortNamedImports = {
|
|
|
13675
14044
|
order?: ("asc" | "desc");
|
|
13676
14045
|
})[];
|
|
13677
14046
|
newlinesBetween?: ("ignore" | number);
|
|
14047
|
+
useConfigurationIf?: {
|
|
14048
|
+
allNamesMatchPattern?: (({
|
|
14049
|
+
pattern: string;
|
|
14050
|
+
flags?: string;
|
|
14051
|
+
} | string)[] | ({
|
|
14052
|
+
pattern: string;
|
|
14053
|
+
flags?: string;
|
|
14054
|
+
} | string));
|
|
14055
|
+
matchesAstSelector?: string;
|
|
14056
|
+
};
|
|
13678
14057
|
ignoreAlias?: boolean;
|
|
13679
14058
|
partitionByComment?: (boolean | (({
|
|
13680
14059
|
pattern: string;
|
|
@@ -13822,6 +14201,7 @@ type PerfectionistSortObjectTypes = {
|
|
|
13822
14201
|
pattern: string;
|
|
13823
14202
|
flags?: string;
|
|
13824
14203
|
} | string));
|
|
14204
|
+
matchesAstSelector?: string;
|
|
13825
14205
|
declarationMatchesPattern?: (({
|
|
13826
14206
|
scope?: ("shallow" | "deep");
|
|
13827
14207
|
pattern: string;
|
|
@@ -13988,6 +14368,7 @@ type PerfectionistSortObjects = {
|
|
|
13988
14368
|
pattern: string;
|
|
13989
14369
|
flags?: string;
|
|
13990
14370
|
} | string));
|
|
14371
|
+
matchesAstSelector?: string;
|
|
13991
14372
|
declarationMatchesPattern?: (({
|
|
13992
14373
|
scope?: ("shallow" | "deep");
|
|
13993
14374
|
pattern: string;
|
|
@@ -13998,6 +14379,7 @@ type PerfectionistSortObjects = {
|
|
|
13998
14379
|
flags?: string;
|
|
13999
14380
|
} | string));
|
|
14000
14381
|
};
|
|
14382
|
+
partitionByComputedKey?: boolean;
|
|
14001
14383
|
styledComponents?: boolean;
|
|
14002
14384
|
useExperimentalDependencyDetection?: boolean;
|
|
14003
14385
|
partitionByComment?: (boolean | (({
|
|
@@ -14104,6 +14486,7 @@ type PerfectionistSortSets = {
|
|
|
14104
14486
|
pattern: string;
|
|
14105
14487
|
flags?: string;
|
|
14106
14488
|
} | string));
|
|
14489
|
+
matchesAstSelector?: string;
|
|
14107
14490
|
};
|
|
14108
14491
|
partitionByComment?: (boolean | (({
|
|
14109
14492
|
pattern: string;
|
|
@@ -14213,6 +14596,16 @@ type PerfectionistSortUnionTypes = {
|
|
|
14213
14596
|
order?: ("asc" | "desc");
|
|
14214
14597
|
})[];
|
|
14215
14598
|
newlinesBetween?: ("ignore" | number);
|
|
14599
|
+
useConfigurationIf?: {
|
|
14600
|
+
allNamesMatchPattern?: (({
|
|
14601
|
+
pattern: string;
|
|
14602
|
+
flags?: string;
|
|
14603
|
+
} | string)[] | ({
|
|
14604
|
+
pattern: string;
|
|
14605
|
+
flags?: string;
|
|
14606
|
+
} | string));
|
|
14607
|
+
matchesAstSelector?: string;
|
|
14608
|
+
};
|
|
14216
14609
|
partitionByComment?: (boolean | (({
|
|
14217
14610
|
pattern: string;
|
|
14218
14611
|
flags?: string;
|
|
@@ -14237,7 +14630,7 @@ type PerfectionistSortUnionTypes = {
|
|
|
14237
14630
|
});
|
|
14238
14631
|
partitionByNewLine?: boolean;
|
|
14239
14632
|
}[]; // ----- perfectionist/sort-variable-declarations -----
|
|
14240
|
-
type PerfectionistSortVariableDeclarations =
|
|
14633
|
+
type PerfectionistSortVariableDeclarations = {
|
|
14241
14634
|
fallbackSort?: {
|
|
14242
14635
|
type: ("alphabetical" | "natural" | "line-length" | "custom" | "unsorted" | "subgroup-order");
|
|
14243
14636
|
order?: ("asc" | "desc");
|
|
@@ -14309,6 +14702,16 @@ type PerfectionistSortVariableDeclarations = [] | [{
|
|
|
14309
14702
|
order?: ("asc" | "desc");
|
|
14310
14703
|
})[];
|
|
14311
14704
|
newlinesBetween?: ("ignore" | number);
|
|
14705
|
+
useConfigurationIf?: {
|
|
14706
|
+
allNamesMatchPattern?: (({
|
|
14707
|
+
pattern: string;
|
|
14708
|
+
flags?: string;
|
|
14709
|
+
} | string)[] | ({
|
|
14710
|
+
pattern: string;
|
|
14711
|
+
flags?: string;
|
|
14712
|
+
} | string));
|
|
14713
|
+
matchesAstSelector?: string;
|
|
14714
|
+
};
|
|
14312
14715
|
useExperimentalDependencyDetection?: boolean;
|
|
14313
14716
|
partitionByComment?: (boolean | (({
|
|
14314
14717
|
pattern: string;
|
|
@@ -14333,7 +14736,7 @@ type PerfectionistSortVariableDeclarations = [] | [{
|
|
|
14333
14736
|
} | string)));
|
|
14334
14737
|
});
|
|
14335
14738
|
partitionByNewLine?: boolean;
|
|
14336
|
-
}]; // ----- pnpm/json-enforce-catalog -----
|
|
14739
|
+
}[]; // ----- pnpm/json-enforce-catalog -----
|
|
14337
14740
|
type PnpmJsonEnforceCatalog = [] | [{
|
|
14338
14741
|
allowedProtocols?: string[];
|
|
14339
14742
|
autofix?: boolean;
|
|
@@ -14421,143 +14824,54 @@ type Quotes = [] | [("single" | "double" | "backtick")] | [("single" | "double"
|
|
|
14421
14824
|
avoidEscape?: boolean;
|
|
14422
14825
|
allowTemplateLiterals?: boolean;
|
|
14423
14826
|
})]; // ----- radix -----
|
|
14424
|
-
type Radix = [] | [("always" | "as-needed")]; // ----- react-
|
|
14827
|
+
type Radix = [] | [("always" | "as-needed")]; // ----- react-refresh/only-export-components -----
|
|
14828
|
+
type ReactRefreshOnlyExportComponents = [] | [{
|
|
14829
|
+
extraHOCs?: string[];
|
|
14830
|
+
allowExportNames?: string[];
|
|
14831
|
+
allowConstantExport?: boolean;
|
|
14832
|
+
checkJS?: boolean;
|
|
14833
|
+
}]; // ----- react/dom-no-unknown-property -----
|
|
14425
14834
|
type ReactDomNoUnknownProperty = [] | [{
|
|
14426
14835
|
ignore?: string[];
|
|
14427
14836
|
requireDataLowercase?: boolean;
|
|
14428
|
-
}]; // ----- react
|
|
14429
|
-
type
|
|
14430
|
-
[k: string]: unknown | undefined;
|
|
14431
|
-
}]; // ----- react-hooks/capitalized-calls -----
|
|
14432
|
-
type ReactHooksCapitalizedCalls = [] | [{
|
|
14433
|
-
[k: string]: unknown | undefined;
|
|
14434
|
-
}]; // ----- react-hooks/component-hook-factories -----
|
|
14435
|
-
type ReactHooksComponentHookFactories = [] | [{
|
|
14436
|
-
[k: string]: unknown | undefined;
|
|
14437
|
-
}]; // ----- react-hooks/config -----
|
|
14438
|
-
type ReactHooksConfig = [] | [{
|
|
14439
|
-
[k: string]: unknown | undefined;
|
|
14440
|
-
}]; // ----- react-hooks/error-boundaries -----
|
|
14441
|
-
type ReactHooksErrorBoundaries = [] | [{
|
|
14442
|
-
[k: string]: unknown | undefined;
|
|
14443
|
-
}]; // ----- react-hooks/exhaustive-deps -----
|
|
14444
|
-
type ReactHooksExhaustiveDeps = [] | [{
|
|
14837
|
+
}]; // ----- react/exhaustive-deps -----
|
|
14838
|
+
type ReactExhaustiveDeps = [] | [{
|
|
14445
14839
|
additionalHooks?: string;
|
|
14446
14840
|
enableDangerousAutofixThisMayCauseInfiniteLoops?: boolean;
|
|
14447
14841
|
experimental_autoDependenciesHooks?: string[];
|
|
14448
14842
|
requireExplicitEffectDeps?: boolean;
|
|
14449
|
-
}]; // ----- react-
|
|
14450
|
-
type
|
|
14451
|
-
|
|
14452
|
-
|
|
14453
|
-
|
|
14454
|
-
|
|
14455
|
-
|
|
14456
|
-
|
|
14457
|
-
|
|
14458
|
-
}]; // ----- react-hooks/globals -----
|
|
14459
|
-
type ReactHooksGlobals = [] | [{
|
|
14460
|
-
[k: string]: unknown | undefined;
|
|
14461
|
-
}]; // ----- react-hooks/hooks -----
|
|
14462
|
-
type ReactHooksHooks = [] | [{
|
|
14463
|
-
[k: string]: unknown | undefined;
|
|
14464
|
-
}]; // ----- react-hooks/immutability -----
|
|
14465
|
-
type ReactHooksImmutability = [] | [{
|
|
14466
|
-
[k: string]: unknown | undefined;
|
|
14467
|
-
}]; // ----- react-hooks/incompatible-library -----
|
|
14468
|
-
type ReactHooksIncompatibleLibrary = [] | [{
|
|
14469
|
-
[k: string]: unknown | undefined;
|
|
14470
|
-
}]; // ----- react-hooks/invariant -----
|
|
14471
|
-
type ReactHooksInvariant = [] | [{
|
|
14472
|
-
[k: string]: unknown | undefined;
|
|
14473
|
-
}]; // ----- react-hooks/memoized-effect-dependencies -----
|
|
14474
|
-
type ReactHooksMemoizedEffectDependencies = [] | [{
|
|
14475
|
-
[k: string]: unknown | undefined;
|
|
14476
|
-
}]; // ----- react-hooks/no-deriving-state-in-effects -----
|
|
14477
|
-
type ReactHooksNoDerivingStateInEffects = [] | [{
|
|
14478
|
-
[k: string]: unknown | undefined;
|
|
14479
|
-
}]; // ----- react-hooks/preserve-manual-memoization -----
|
|
14480
|
-
type ReactHooksPreserveManualMemoization = [] | [{
|
|
14481
|
-
[k: string]: unknown | undefined;
|
|
14482
|
-
}]; // ----- react-hooks/purity -----
|
|
14483
|
-
type ReactHooksPurity = [] | [{
|
|
14484
|
-
[k: string]: unknown | undefined;
|
|
14485
|
-
}]; // ----- react-hooks/refs -----
|
|
14486
|
-
type ReactHooksRefs = [] | [{
|
|
14487
|
-
[k: string]: unknown | undefined;
|
|
14488
|
-
}]; // ----- react-hooks/rule-suppression -----
|
|
14489
|
-
type ReactHooksRuleSuppression = [] | [{
|
|
14490
|
-
[k: string]: unknown | undefined;
|
|
14491
|
-
}]; // ----- react-hooks/rules-of-hooks -----
|
|
14492
|
-
type ReactHooksRulesOfHooks = [] | [{
|
|
14843
|
+
}]; // ----- react/jsx-no-useless-fragment -----
|
|
14844
|
+
type ReactJsxNoUselessFragment = [] | [{
|
|
14845
|
+
allowEmptyFragment?: boolean;
|
|
14846
|
+
allowExpressions?: boolean;
|
|
14847
|
+
}]; // ----- react/no-unstable-default-props -----
|
|
14848
|
+
type ReactNoUnstableDefaultProps = [] | [{
|
|
14849
|
+
safeDefaultProps?: string[];
|
|
14850
|
+
}]; // ----- react/rules-of-hooks -----
|
|
14851
|
+
type ReactRulesOfHooks = [] | [{
|
|
14493
14852
|
additionalHooks?: string;
|
|
14494
|
-
}]; // ----- react
|
|
14495
|
-
type
|
|
14496
|
-
[k: string]: unknown | undefined;
|
|
14497
|
-
}]; // ----- react-hooks/set-state-in-render -----
|
|
14498
|
-
type ReactHooksSetStateInRender = [] | [{
|
|
14499
|
-
[k: string]: unknown | undefined;
|
|
14500
|
-
}]; // ----- react-hooks/static-components -----
|
|
14501
|
-
type ReactHooksStaticComponents = [] | [{
|
|
14502
|
-
[k: string]: unknown | undefined;
|
|
14503
|
-
}]; // ----- react-hooks/syntax -----
|
|
14504
|
-
type ReactHooksSyntax = [] | [{
|
|
14505
|
-
[k: string]: unknown | undefined;
|
|
14506
|
-
}]; // ----- react-hooks/todo -----
|
|
14507
|
-
type ReactHooksTodo = [] | [{
|
|
14508
|
-
[k: string]: unknown | undefined;
|
|
14509
|
-
}]; // ----- react-hooks/unsupported-syntax -----
|
|
14510
|
-
type ReactHooksUnsupportedSyntax = [] | [{
|
|
14511
|
-
[k: string]: unknown | undefined;
|
|
14512
|
-
}]; // ----- react-hooks/use-memo -----
|
|
14513
|
-
type ReactHooksUseMemo = [] | [{
|
|
14514
|
-
[k: string]: unknown | undefined;
|
|
14515
|
-
}]; // ----- react-hooks/void-use-memo -----
|
|
14516
|
-
type ReactHooksVoidUseMemo = [] | [{
|
|
14517
|
-
[k: string]: unknown | undefined;
|
|
14518
|
-
}]; // ----- react-naming-convention/component-name -----
|
|
14519
|
-
type ReactNamingConventionComponentName = [] | [(("PascalCase" | "CONSTANT_CASE") | {
|
|
14520
|
-
allowAllCaps?: boolean;
|
|
14521
|
-
excepts?: string[];
|
|
14522
|
-
rule?: ("PascalCase" | "CONSTANT_CASE");
|
|
14523
|
-
})]; // ----- react-naming-convention/filename -----
|
|
14524
|
-
type ReactNamingConventionFilename = [] | [(("PascalCase" | "camelCase" | "kebab-case" | "snake_case") | {
|
|
14525
|
-
excepts?: string[];
|
|
14526
|
-
extensions?: string[];
|
|
14527
|
-
rule?: ("PascalCase" | "camelCase" | "kebab-case" | "snake_case");
|
|
14528
|
-
})]; // ----- react-naming-convention/filename-extension -----
|
|
14529
|
-
type ReactNamingConventionFilenameExtension = [] | [(("always" | "as-needed") | {
|
|
14530
|
-
allow?: ("always" | "as-needed");
|
|
14531
|
-
extensions?: string[];
|
|
14532
|
-
ignoreFilesWithoutCode?: boolean;
|
|
14533
|
-
})]; // ----- react-naming-convention/use-state -----
|
|
14534
|
-
type ReactNamingConventionUseState = [] | [{
|
|
14853
|
+
}]; // ----- react/use-state -----
|
|
14854
|
+
type ReactUseState = [] | [{
|
|
14535
14855
|
enforceAssignment?: boolean;
|
|
14856
|
+
enforceLazyInitialization?: boolean;
|
|
14536
14857
|
enforceSetterName?: boolean;
|
|
14537
|
-
}]; // ----- react
|
|
14538
|
-
type
|
|
14539
|
-
|
|
14540
|
-
|
|
14541
|
-
|
|
14542
|
-
|
|
14543
|
-
}]; // ----- react/
|
|
14544
|
-
type
|
|
14545
|
-
type ReactJsxShorthandFragment = [] | [(-1 | 1)]; // ----- react/no-forbidden-props -----
|
|
14546
|
-
type ReactNoForbiddenProps = [] | [{
|
|
14547
|
-
forbid?: (string | {
|
|
14548
|
-
excludedNodes?: string[];
|
|
14549
|
-
prop: string;
|
|
14550
|
-
} | {
|
|
14551
|
-
includedNodes?: string[];
|
|
14552
|
-
prop: string;
|
|
14553
|
-
})[];
|
|
14554
|
-
}]; // ----- react/no-unstable-default-props -----
|
|
14555
|
-
type ReactNoUnstableDefaultProps = [] | [{
|
|
14858
|
+
}]; // ----- react/x-exhaustive-deps -----
|
|
14859
|
+
type ReactXExhaustiveDeps = [] | [{
|
|
14860
|
+
additionalHooks?: string;
|
|
14861
|
+
enableDangerousAutofixThisMayCauseInfiniteLoops?: boolean;
|
|
14862
|
+
experimental_autoDependenciesHooks?: string[];
|
|
14863
|
+
requireExplicitEffectDeps?: boolean;
|
|
14864
|
+
}]; // ----- react/x-no-unstable-default-props -----
|
|
14865
|
+
type ReactXNoUnstableDefaultProps = [] | [{
|
|
14556
14866
|
safeDefaultProps?: string[];
|
|
14557
|
-
}]; // ----- react/
|
|
14558
|
-
type
|
|
14559
|
-
|
|
14560
|
-
|
|
14867
|
+
}]; // ----- react/x-rules-of-hooks -----
|
|
14868
|
+
type ReactXRulesOfHooks = [] | [{
|
|
14869
|
+
additionalHooks?: string;
|
|
14870
|
+
}]; // ----- react/x-use-state -----
|
|
14871
|
+
type ReactXUseState = [] | [{
|
|
14872
|
+
enforceAssignment?: boolean;
|
|
14873
|
+
enforceLazyInitialization?: boolean;
|
|
14874
|
+
enforceSetterName?: boolean;
|
|
14561
14875
|
}]; // ----- regexp/hexadecimal-escape -----
|
|
14562
14876
|
type RegexpHexadecimalEscape = [] | [("always" | "never")]; // ----- regexp/letter-case -----
|
|
14563
14877
|
type RegexpLetterCase = [] | [{
|
|
@@ -15995,6 +16309,13 @@ type SvelteIndent = [] | [{
|
|
|
15995
16309
|
type SvelteMaxAttributesPerLine = [] | [{
|
|
15996
16310
|
multiline?: number;
|
|
15997
16311
|
singleline?: number;
|
|
16312
|
+
}]; // ----- svelte/max-lines-per-block -----
|
|
16313
|
+
type SvelteMaxLinesPerBlock = [] | [{
|
|
16314
|
+
script?: number;
|
|
16315
|
+
template?: number;
|
|
16316
|
+
style?: number;
|
|
16317
|
+
skipBlankLines?: boolean;
|
|
16318
|
+
skipComments?: boolean;
|
|
15998
16319
|
}]; // ----- svelte/mustache-spacing -----
|
|
15999
16320
|
type SvelteMustacheSpacing = [] | [{
|
|
16000
16321
|
textExpressions?: ("never" | "always");
|
|
@@ -16178,6 +16499,9 @@ type TestRequireMockTypeParameters = [] | [{
|
|
|
16178
16499
|
}]; // ----- test/require-top-level-describe -----
|
|
16179
16500
|
type TestRequireTopLevelDescribe = [] | [{
|
|
16180
16501
|
maxNumberOfTopLevelDescribes?: number;
|
|
16502
|
+
}]; // ----- test/unbound-method -----
|
|
16503
|
+
type TestUnboundMethod = [] | [{
|
|
16504
|
+
ignoreStatic?: boolean;
|
|
16181
16505
|
}]; // ----- test/valid-expect -----
|
|
16182
16506
|
type TestValidExpect = [] | [{
|
|
16183
16507
|
alwaysAwait?: boolean;
|
|
@@ -17222,6 +17546,7 @@ type UnicornEscapeCase = [] | [("uppercase" | "lowercase")]; // ----- unicorn/ex
|
|
|
17222
17546
|
type UnicornExpiringTodoComments = [] | [{
|
|
17223
17547
|
terms?: string[];
|
|
17224
17548
|
ignore?: unknown[];
|
|
17549
|
+
ignoreDates?: boolean;
|
|
17225
17550
|
ignoreDatesOnPullRequests?: boolean;
|
|
17226
17551
|
allowWarningComments?: boolean;
|
|
17227
17552
|
date?: string;
|
|
@@ -17378,6 +17703,9 @@ type _UnicornPreventAbbreviationsReplacements = (false | _UnicornPreventAbbrevia
|
|
|
17378
17703
|
interface _UnicornPreventAbbreviations_Abbreviations {
|
|
17379
17704
|
[k: string]: _UnicornPreventAbbreviationsReplacements | undefined;
|
|
17380
17705
|
}
|
|
17706
|
+
interface _UnicornPreventAbbreviations_BooleanObject {
|
|
17707
|
+
[k: string]: boolean | undefined;
|
|
17708
|
+
}
|
|
17381
17709
|
interface _UnicornPreventAbbreviations_BooleanObject {
|
|
17382
17710
|
[k: string]: boolean | undefined;
|
|
17383
17711
|
} // ----- unicorn/relative-url-style -----
|
|
@@ -19179,9 +19507,7 @@ interface OptionsTailwindCSS extends OptionsOverrides {
|
|
|
19179
19507
|
*/
|
|
19180
19508
|
customClassNames?: boolean;
|
|
19181
19509
|
}
|
|
19182
|
-
interface OptionsReact extends OptionsOverrides {
|
|
19183
|
-
reactCompiler?: boolean;
|
|
19184
|
-
}
|
|
19510
|
+
interface OptionsReact extends OptionsOverrides {}
|
|
19185
19511
|
interface OptionsConfig extends OptionsComponentExts, OptionsProjectType {
|
|
19186
19512
|
/**
|
|
19187
19513
|
* Enable gitignore support.
|
|
@@ -19338,7 +19664,6 @@ interface OptionsConfig extends OptionsComponentExts, OptionsProjectType {
|
|
|
19338
19664
|
*
|
|
19339
19665
|
* Requires installing:
|
|
19340
19666
|
* - `@eslint-react/eslint-plugin`
|
|
19341
|
-
* - `eslint-plugin-react-hooks`
|
|
19342
19667
|
* - `eslint-plugin-react-refresh`
|
|
19343
19668
|
*
|
|
19344
19669
|
* @default false
|
|
@@ -19427,8 +19752,9 @@ interface OptionsConfig extends OptionsComponentExts, OptionsProjectType {
|
|
|
19427
19752
|
declare const defaultPluginRenaming: {
|
|
19428
19753
|
"@eslint-react": string;
|
|
19429
19754
|
"@eslint-react/dom": string;
|
|
19430
|
-
"@eslint-react/hooks-extra": string;
|
|
19431
19755
|
"@eslint-react/naming-convention": string;
|
|
19756
|
+
"@eslint-react/rsc": string;
|
|
19757
|
+
"@eslint-react/web-api": string;
|
|
19432
19758
|
"@next/next": string;
|
|
19433
19759
|
"@stylistic": string;
|
|
19434
19760
|
"@typescript-eslint": string;
|