@lincy/eslint-config 4.4.0 → 4.5.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.cts CHANGED
@@ -1421,7 +1421,7 @@ interface RuleOptions {
1421
1421
  * Disallow returning value from constructor
1422
1422
  * @see https://eslint.org/docs/latest/rules/no-constructor-return
1423
1423
  */
1424
- 'no-constructor-return'?: Linter.RuleEntry<NoConstructorReturn>
1424
+ 'no-constructor-return'?: Linter.RuleEntry<[]>
1425
1425
  /**
1426
1426
  * Disallow `continue` statements
1427
1427
  * @see https://eslint.org/docs/latest/rules/no-continue
@@ -1757,6 +1757,7 @@ interface RuleOptions {
1757
1757
  /**
1758
1758
  * Disallow `new` operators with the `Symbol` object
1759
1759
  * @see https://eslint.org/docs/latest/rules/no-new-symbol
1760
+ * @deprecated
1760
1761
  */
1761
1762
  'no-new-symbol'?: Linter.RuleEntry<[]>
1762
1763
  /**
@@ -2053,6 +2054,11 @@ interface RuleOptions {
2053
2054
  * @see https://eslint.org/docs/latest/rules/no-use-before-define
2054
2055
  */
2055
2056
  'no-use-before-define'?: Linter.RuleEntry<NoUseBeforeDefine>
2057
+ /**
2058
+ * Disallow variable assignments when the value is not used
2059
+ * @see https://eslint.org/docs/latest/rules/no-useless-assignment
2060
+ */
2061
+ 'no-useless-assignment'?: Linter.RuleEntry<[]>
2056
2062
  /**
2057
2063
  * Disallow useless backreferences in regular expressions
2058
2064
  * @see https://eslint.org/docs/latest/rules/no-useless-backreference
@@ -2563,523 +2569,311 @@ interface RuleOptions {
2563
2569
  */
2564
2570
  'radix'?: Linter.RuleEntry<Radix>
2565
2571
  /**
2566
- * verifies the list of dependencies for Hooks like useEffect and similar
2567
- * @see https://github.com/facebook/react/issues/14920
2568
- */
2569
- 'react-hooks/exhaustive-deps'?: Linter.RuleEntry<ReactHooksExhaustiveDeps>
2570
- /**
2571
- * enforces the Rules of Hooks
2572
- * @see https://reactjs.org/docs/hooks-rules.html
2573
- */
2574
- 'react-hooks/rules-of-hooks'?: Linter.RuleEntry<[]>
2575
- 'react-refresh/only-export-components'?: Linter.RuleEntry<ReactRefreshOnlyExportComponents>
2576
- /**
2577
- * Enforces consistent naming for boolean props
2578
- * @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/boolean-prop-naming.md
2579
- */
2580
- 'react/boolean-prop-naming'?: Linter.RuleEntry<ReactBooleanPropNaming>
2581
- /**
2582
- * Disallow usage of `button` elements without an explicit `type` attribute
2583
- * @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/button-has-type.md
2584
- */
2585
- 'react/button-has-type'?: Linter.RuleEntry<ReactButtonHasType>
2586
- /**
2587
- * Enforce using `onChange` or `readonly` attribute when `checked` is used
2588
- * @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/checked-requires-onchange-or-readonly.md
2589
- */
2590
- 'react/checked-requires-onchange-or-readonly'?: Linter.RuleEntry<ReactCheckedRequiresOnchangeOrReadonly>
2591
- /**
2592
- * Enforce all defaultProps have a corresponding non-required PropType
2593
- * @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/default-props-match-prop-types.md
2594
- */
2595
- 'react/default-props-match-prop-types'?: Linter.RuleEntry<ReactDefaultPropsMatchPropTypes>
2596
- /**
2597
- * Enforce consistent usage of destructuring assignment of props, state, and context
2598
- * @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/destructuring-assignment.md
2599
- */
2600
- 'react/destructuring-assignment'?: Linter.RuleEntry<ReactDestructuringAssignment>
2601
- /**
2602
- * Disallow missing displayName in a React component definition
2603
- * @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/display-name.md
2604
- */
2605
- 'react/display-name'?: Linter.RuleEntry<ReactDisplayName>
2606
- /**
2607
- * Disallow certain props on components
2608
- * @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/forbid-component-props.md
2609
- */
2610
- 'react/forbid-component-props'?: Linter.RuleEntry<ReactForbidComponentProps>
2611
- /**
2612
- * Disallow certain props on DOM Nodes
2613
- * @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/forbid-dom-props.md
2614
- */
2615
- 'react/forbid-dom-props'?: Linter.RuleEntry<ReactForbidDomProps>
2616
- /**
2617
- * Disallow certain elements
2618
- * @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/forbid-elements.md
2619
- */
2620
- 'react/forbid-elements'?: Linter.RuleEntry<ReactForbidElements>
2621
- /**
2622
- * Disallow using another component's propTypes
2623
- * @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/forbid-foreign-prop-types.md
2624
- */
2625
- 'react/forbid-foreign-prop-types'?: Linter.RuleEntry<ReactForbidForeignPropTypes>
2626
- /**
2627
- * Disallow certain propTypes
2628
- * @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/forbid-prop-types.md
2629
- */
2630
- 'react/forbid-prop-types'?: Linter.RuleEntry<ReactForbidPropTypes>
2631
- /**
2632
- * Enforce a specific function type for function components
2633
- * @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/function-component-definition.md
2634
- */
2635
- 'react/function-component-definition'?: Linter.RuleEntry<ReactFunctionComponentDefinition>
2636
- /**
2637
- * Ensure destructuring and symmetric naming of useState hook value and setter variables
2638
- * @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/hook-use-state.md
2639
- */
2640
- 'react/hook-use-state'?: Linter.RuleEntry<ReactHookUseState>
2641
- /**
2642
- * Enforce sandbox attribute on iframe elements
2643
- * @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/iframe-missing-sandbox.md
2644
- */
2645
- 'react/iframe-missing-sandbox'?: Linter.RuleEntry<[]>
2646
- /**
2647
- * Enforce boolean attributes notation in JSX
2648
- * @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-boolean-value.md
2649
- */
2650
- 'react/jsx-boolean-value'?: Linter.RuleEntry<ReactJsxBooleanValue>
2651
- /**
2652
- * Enforce or disallow spaces inside of curly braces in JSX attributes and expressions
2653
- * @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-child-element-spacing.md
2572
+ * disallow passing 'children' to void DOM elements
2573
+ * @see https://eslint-react.xyz/rules/dom-no-children-in-void-dom-elements
2654
2574
  */
2655
- 'react/jsx-child-element-spacing'?: Linter.RuleEntry<[]>
2575
+ 'react-dom/no-children-in-void-dom-elements'?: Linter.RuleEntry<[]>
2656
2576
  /**
2657
- * Enforce closing bracket location in JSX
2658
- * @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-closing-bracket-location.md
2659
- */
2660
- 'react/jsx-closing-bracket-location'?: Linter.RuleEntry<ReactJsxClosingBracketLocation>
2661
- /**
2662
- * Enforce closing tag location for multiline JSX
2663
- * @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-closing-tag-location.md
2577
+ * disallow when a DOM component is using 'dangerouslySetInnerHTML'
2578
+ * @see https://eslint-react.xyz/rules/dom-no-dangerously-set-innerhtml
2664
2579
  */
2665
- 'react/jsx-closing-tag-location'?: Linter.RuleEntry<[]>
2580
+ 'react-dom/no-dangerously-set-innerhtml'?: Linter.RuleEntry<[]>
2666
2581
  /**
2667
- * Disallow unnecessary JSX expressions when literals alone are sufficient or enforce JSX expressions on literals in JSX children or attributes
2668
- * @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-curly-brace-presence.md
2582
+ * disallow when a DOM component is using both 'children' and 'dangerouslySetInnerHTML'
2583
+ * @see https://eslint-react.xyz/rules/dom-no-dangerously-set-innerhtml-with-children
2669
2584
  */
2670
- 'react/jsx-curly-brace-presence'?: Linter.RuleEntry<ReactJsxCurlyBracePresence>
2585
+ 'react-dom/no-dangerously-set-innerhtml-with-children'?: Linter.RuleEntry<[]>
2671
2586
  /**
2672
- * Enforce consistent linebreaks in curly braces in JSX attributes and expressions
2673
- * @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-curly-newline.md
2587
+ * disallow 'findDOMNode'
2588
+ * @see https://eslint-react.xyz/rules/dom-no-find-dom-node
2674
2589
  */
2675
- 'react/jsx-curly-newline'?: Linter.RuleEntry<ReactJsxCurlyNewline>
2590
+ 'react-dom/no-find-dom-node'?: Linter.RuleEntry<[]>
2676
2591
  /**
2677
- * Enforce or disallow spaces inside of curly braces in JSX attributes and expressions
2678
- * @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-curly-spacing.md
2592
+ * enforce that button component have an explicit 'type' attribute
2593
+ * @see https://eslint-react.xyz/rules/dom-no-missing-button-type
2679
2594
  */
2680
- 'react/jsx-curly-spacing'?: Linter.RuleEntry<ReactJsxCurlySpacing>
2595
+ 'react-dom/no-missing-button-type'?: Linter.RuleEntry<[]>
2681
2596
  /**
2682
- * Enforce or disallow spaces around equal signs in JSX attributes
2683
- * @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-equals-spacing.md
2597
+ * enforce that 'iframe' component have an explicit 'sandbox' attribute
2598
+ * @see https://eslint-react.xyz/rules/dom-no-missing-iframe-sandbox
2684
2599
  */
2685
- 'react/jsx-equals-spacing'?: Linter.RuleEntry<ReactJsxEqualsSpacing>
2600
+ 'react-dom/no-missing-iframe-sandbox'?: Linter.RuleEntry<[]>
2686
2601
  /**
2687
- * Disallow file extensions that may contain JSX
2688
- * @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-filename-extension.md
2602
+ * enforce that namespaces are not used in React elements
2603
+ * @see https://eslint-react.xyz/rules/dom-no-namespace
2689
2604
  */
2690
- 'react/jsx-filename-extension'?: Linter.RuleEntry<ReactJsxFilenameExtension>
2605
+ 'react-dom/no-namespace'?: Linter.RuleEntry<[]>
2691
2606
  /**
2692
- * Enforce proper position of the first property in JSX
2693
- * @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-first-prop-new-line.md
2607
+ * disallow usage of the return value of 'ReactDOM.render'
2608
+ * @see https://eslint-react.xyz/rules/dom-no-render-return-value
2694
2609
  */
2695
- 'react/jsx-first-prop-new-line'?: Linter.RuleEntry<ReactJsxFirstPropNewLine>
2610
+ 'react-dom/no-render-return-value'?: Linter.RuleEntry<[]>
2696
2611
  /**
2697
- * Enforce shorthand or standard form for React fragments
2698
- * @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-fragments.md
2612
+ * disallow 'javascript:' URLs as JSX event handler prop's value
2613
+ * @see https://eslint-react.xyz/rules/dom-no-script-url
2699
2614
  */
2700
- 'react/jsx-fragments'?: Linter.RuleEntry<ReactJsxFragments>
2615
+ 'react-dom/no-script-url'?: Linter.RuleEntry<[]>
2701
2616
  /**
2702
- * Enforce event handler naming conventions in JSX
2703
- * @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-handler-names.md
2617
+ * disallow unsafe iframe 'sandbox' attribute combinations
2618
+ * @see https://eslint-react.xyz/rules/dom-no-unsafe-iframe-sandbox
2704
2619
  */
2705
- 'react/jsx-handler-names'?: Linter.RuleEntry<ReactJsxHandlerNames>
2620
+ 'react-dom/no-unsafe-iframe-sandbox'?: Linter.RuleEntry<[]>
2706
2621
  /**
2707
- * Enforce JSX indentation
2708
- * @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-indent.md
2622
+ * disallow 'target="_blank"' on an external link without 'rel="noreferrer noopener"'.
2623
+ * @see https://eslint-react.xyz/rules/dom-no-unsafe-target-blank
2709
2624
  */
2710
- 'react/jsx-indent'?: Linter.RuleEntry<ReactJsxIndent>
2625
+ 'react-dom/no-unsafe-target-blank'?: Linter.RuleEntry<[]>
2711
2626
  /**
2712
- * Enforce props indentation in JSX
2713
- * @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-indent-props.md
2627
+ * enforce custom hooks using other hooks
2628
+ * @see https://eslint-react.xyz/rules/hooks-extra-ensure-custom-hooks-using-other-hooks
2714
2629
  */
2715
- 'react/jsx-indent-props'?: Linter.RuleEntry<ReactJsxIndentProps>
2630
+ 'react-hooks-extra/ensure-custom-hooks-using-other-hooks'?: Linter.RuleEntry<[]>
2716
2631
  /**
2717
- * Disallow missing `key` props in iterators/collection literals
2718
- * @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-key.md
2632
+ * enforce 'useCallback' has non-empty dependencies array
2633
+ * @see https://eslint-react.xyz/rules/hooks-extra-ensure-use-callback-has-non-empty-deps
2719
2634
  */
2720
- 'react/jsx-key'?: Linter.RuleEntry<ReactJsxKey>
2635
+ 'react-hooks-extra/ensure-use-callback-has-non-empty-deps'?: Linter.RuleEntry<[]>
2721
2636
  /**
2722
- * Enforce JSX maximum depth
2723
- * @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-max-depth.md
2637
+ * enforce 'useMemo' has non-empty dependencies array
2638
+ * @see https://eslint-react.xyz/rules/hooks-extra-ensure-use-memo-has-non-empty-deps
2724
2639
  */
2725
- 'react/jsx-max-depth'?: Linter.RuleEntry<ReactJsxMaxDepth>
2640
+ 'react-hooks-extra/ensure-use-memo-has-non-empty-deps'?: Linter.RuleEntry<[]>
2726
2641
  /**
2727
- * Enforce maximum of props on a single line in JSX
2728
- * @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-max-props-per-line.md
2642
+ * disallow function calls in 'useState' that aren't wrapped in an initializer function
2643
+ * @see https://eslint-react.xyz/rules/hooks-extra-prefer-use-state-lazy-initialization
2729
2644
  */
2730
- 'react/jsx-max-props-per-line'?: Linter.RuleEntry<ReactJsxMaxPropsPerLine>
2645
+ 'react-hooks-extra/prefer-use-state-lazy-initialization'?: Linter.RuleEntry<[]>
2731
2646
  /**
2732
- * Require or prevent a new line after jsx elements and expressions.
2733
- * @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-newline.md
2734
- */
2735
- 'react/jsx-newline'?: Linter.RuleEntry<ReactJsxNewline>
2736
- /**
2737
- * Disallow `.bind()` or arrow functions in JSX props
2738
- * @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-no-bind.md
2739
- */
2740
- 'react/jsx-no-bind'?: Linter.RuleEntry<ReactJsxNoBind>
2741
- /**
2742
- * Disallow comments from being inserted as text nodes
2743
- * @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-no-comment-textnodes.md
2744
- */
2745
- 'react/jsx-no-comment-textnodes'?: Linter.RuleEntry<[]>
2746
- /**
2747
- * Disallows JSX context provider values from taking values that will cause needless rerenders
2748
- * @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-no-constructed-context-values.md
2749
- */
2750
- 'react/jsx-no-constructed-context-values'?: Linter.RuleEntry<ReactJsxNoConstructedContextValues>
2751
- /**
2752
- * Disallow duplicate properties in JSX
2753
- * @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-no-duplicate-props.md
2754
- */
2755
- 'react/jsx-no-duplicate-props'?: Linter.RuleEntry<ReactJsxNoDuplicateProps>
2756
- /**
2757
- * Disallow problematic leaked values from being rendered
2758
- * @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-no-leaked-render.md
2759
- */
2760
- 'react/jsx-no-leaked-render'?: Linter.RuleEntry<ReactJsxNoLeakedRender>
2761
- /**
2762
- * Disallow usage of string literals in JSX
2763
- * @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-no-literals.md
2764
- */
2765
- 'react/jsx-no-literals'?: Linter.RuleEntry<ReactJsxNoLiterals>
2766
- /**
2767
- * Disallow usage of `javascript:` URLs
2768
- * @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-no-script-url.md
2769
- */
2770
- 'react/jsx-no-script-url'?: Linter.RuleEntry<ReactJsxNoScriptUrl>
2771
- /**
2772
- * Disallow `target="_blank"` attribute without `rel="noreferrer"`
2773
- * @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-no-target-blank.md
2774
- */
2775
- 'react/jsx-no-target-blank'?: Linter.RuleEntry<ReactJsxNoTargetBlank>
2776
- /**
2777
- * Disallow undeclared variables in JSX
2778
- * @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-no-undef.md
2647
+ * verifies the list of dependencies for Hooks like useEffect and similar
2648
+ * @see https://github.com/facebook/react/issues/14920
2779
2649
  */
2780
- 'react/jsx-no-undef'?: Linter.RuleEntry<ReactJsxNoUndef>
2650
+ 'react-hooks/exhaustive-deps'?: Linter.RuleEntry<ReactHooksExhaustiveDeps>
2781
2651
  /**
2782
- * Disallow unnecessary fragments
2783
- * @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-no-useless-fragment.md
2652
+ * enforces the Rules of Hooks
2653
+ * @see https://reactjs.org/docs/hooks-rules.html
2784
2654
  */
2785
- 'react/jsx-no-useless-fragment'?: Linter.RuleEntry<ReactJsxNoUselessFragment>
2655
+ 'react-hooks/rules-of-hooks'?: Linter.RuleEntry<[]>
2786
2656
  /**
2787
- * Require one JSX element per line
2788
- * @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-one-expression-per-line.md
2657
+ * enforce component naming convention to 'PascalCase' or 'CONSTANT_CASE'
2658
+ * @see https://eslint-react.xyz/rules/naming-convention-component-name
2789
2659
  */
2790
- 'react/jsx-one-expression-per-line'?: Linter.RuleEntry<ReactJsxOneExpressionPerLine>
2660
+ 'react-naming-convention/component-name'?: Linter.RuleEntry<ReactNamingConventionComponentName>
2791
2661
  /**
2792
- * Enforce PascalCase for user-defined JSX components
2793
- * @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-pascal-case.md
2662
+ * enforce naming convention for JSX filenames
2663
+ * @see https://eslint-react.xyz/rules/naming-convention-filename
2794
2664
  */
2795
- 'react/jsx-pascal-case'?: Linter.RuleEntry<ReactJsxPascalCase>
2665
+ 'react-naming-convention/filename'?: Linter.RuleEntry<ReactNamingConventionFilename>
2796
2666
  /**
2797
- * Disallow multiple spaces between inline JSX props
2798
- * @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-props-no-multi-spaces.md
2667
+ * enforce naming convention for JSX file extensions
2668
+ * @see https://eslint-react.xyz/rules/naming-convention-filename-extension
2799
2669
  */
2800
- 'react/jsx-props-no-multi-spaces'?: Linter.RuleEntry<[]>
2670
+ 'react-naming-convention/filename-extension'?: Linter.RuleEntry<ReactNamingConventionFilenameExtension>
2801
2671
  /**
2802
- * Disallow JSX prop spreading
2803
- * @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-props-no-spreading.md
2672
+ * enforce destructuring and symmetric naming of 'useState' hook value and setter variables
2673
+ * @see https://eslint-react.xyz/rules/naming-convention-use-state
2804
2674
  */
2805
- 'react/jsx-props-no-spreading'?: Linter.RuleEntry<ReactJsxPropsNoSpreading>
2675
+ 'react-naming-convention/use-state'?: Linter.RuleEntry<[]>
2676
+ 'react-refresh/only-export-components'?: Linter.RuleEntry<ReactRefreshOnlyExportComponents>
2806
2677
  /**
2807
- * Enforce defaultProps declarations alphabetical sorting
2808
- * @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-sort-default-props.md
2809
- * @deprecated
2678
+ * require all 'forwardRef' components include a 'ref' parameter
2679
+ * @see https://eslint-react.xyz/rules/ensure-forward-ref-using-ref
2810
2680
  */
2811
- 'react/jsx-sort-default-props'?: Linter.RuleEntry<ReactJsxSortDefaultProps>
2681
+ 'react/ensure-forward-ref-using-ref'?: Linter.RuleEntry<[]>
2812
2682
  /**
2813
- * Enforce props alphabetical sorting
2814
- * @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-sort-props.md
2683
+ * disallow accessing 'this.state' within 'setState'
2684
+ * @see https://eslint-react.xyz/rules/no-access-state-in-setstate
2815
2685
  */
2816
- 'react/jsx-sort-props'?: Linter.RuleEntry<ReactJsxSortProps>
2686
+ 'react/no-access-state-in-setstate'?: Linter.RuleEntry<[]>
2817
2687
  /**
2818
- * Enforce spacing before closing bracket in JSX
2819
- * @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-space-before-closing.md
2820
- * @deprecated
2688
+ * disallow using Array index as key
2689
+ * @see https://eslint-react.xyz/rules/no-array-index-key
2821
2690
  */
2822
- 'react/jsx-space-before-closing'?: Linter.RuleEntry<ReactJsxSpaceBeforeClosing>
2691
+ 'react/no-array-index-key'?: Linter.RuleEntry<[]>
2823
2692
  /**
2824
- * Enforce whitespace in and around the JSX opening and closing brackets
2825
- * @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-tag-spacing.md
2693
+ * disallow 'Children.count'
2694
+ * @see https://eslint-react.xyz/rules/no-children-count
2826
2695
  */
2827
- 'react/jsx-tag-spacing'?: Linter.RuleEntry<ReactJsxTagSpacing>
2696
+ 'react/no-children-count'?: Linter.RuleEntry<[]>
2828
2697
  /**
2829
- * Disallow React to be incorrectly marked as unused
2830
- * @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-uses-react.md
2698
+ * disallow 'Children.forEach'
2699
+ * @see https://eslint-react.xyz/rules/no-children-for-each
2831
2700
  */
2832
- 'react/jsx-uses-react'?: Linter.RuleEntry<[]>
2701
+ 'react/no-children-for-each'?: Linter.RuleEntry<[]>
2833
2702
  /**
2834
- * Disallow variables used in JSX to be incorrectly marked as unused
2835
- * @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-uses-vars.md
2703
+ * disallow 'Children.map'
2704
+ * @see https://eslint-react.xyz/rules/no-children-map
2836
2705
  */
2837
- 'react/jsx-uses-vars'?: Linter.RuleEntry<[]>
2706
+ 'react/no-children-map'?: Linter.RuleEntry<[]>
2838
2707
  /**
2839
- * Disallow missing parentheses around multiline JSX
2840
- * @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-wrap-multilines.md
2708
+ * disallow 'Children.only'
2709
+ * @see https://eslint-react.xyz/rules/no-children-only
2841
2710
  */
2842
- 'react/jsx-wrap-multilines'?: Linter.RuleEntry<ReactJsxWrapMultilines>
2711
+ 'react/no-children-only'?: Linter.RuleEntry<[]>
2843
2712
  /**
2844
- * Disallow when this.state is accessed within setState
2845
- * @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/no-access-state-in-setstate.md
2713
+ * disallow passing of 'children' as props
2714
+ * @see https://eslint-react.xyz/rules/no-children-prop
2846
2715
  */
2847
- 'react/no-access-state-in-setstate'?: Linter.RuleEntry<[]>
2716
+ 'react/no-children-prop'?: Linter.RuleEntry<[]>
2848
2717
  /**
2849
- * Disallow adjacent inline elements not separated by whitespace.
2850
- * @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/no-adjacent-inline-elements.md
2718
+ * disallow 'Children.toArray'
2719
+ * @see https://eslint-react.xyz/rules/no-children-to-array
2851
2720
  */
2852
- 'react/no-adjacent-inline-elements'?: Linter.RuleEntry<[]>
2721
+ 'react/no-children-to-array'?: Linter.RuleEntry<[]>
2853
2722
  /**
2854
- * Disallow usage of Array index in keys
2855
- * @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/no-array-index-key.md
2723
+ * disallow class component
2724
+ * @see https://eslint-react.xyz/rules/no-class-component
2856
2725
  */
2857
- 'react/no-array-index-key'?: Linter.RuleEntry<[]>
2726
+ 'react/no-class-component'?: Linter.RuleEntry<[]>
2858
2727
  /**
2859
- * Lifecycle methods should be methods on the prototype, not class fields
2860
- * @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/no-arrow-function-lifecycle.md
2728
+ * disallow 'cloneElement'
2729
+ * @see https://eslint-react.xyz/rules/no-clone-element
2861
2730
  */
2862
- 'react/no-arrow-function-lifecycle'?: Linter.RuleEntry<[]>
2731
+ 'react/no-clone-element'?: Linter.RuleEntry<[]>
2863
2732
  /**
2864
- * Disallow passing of children as props
2865
- * @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/no-children-prop.md
2733
+ * disallow comments from being inserted as text nodes
2734
+ * @see https://eslint-react.xyz/rules/no-comment-textnodes
2866
2735
  */
2867
- 'react/no-children-prop'?: Linter.RuleEntry<ReactNoChildrenProp>
2736
+ 'react/no-comment-textnodes'?: Linter.RuleEntry<[]>
2868
2737
  /**
2869
- * Disallow usage of dangerous JSX properties
2870
- * @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/no-danger.md
2738
+ * disallow complicated conditional rendering
2739
+ * @see https://eslint-react.xyz/rules/no-complicated-conditional-rendering
2871
2740
  */
2872
- 'react/no-danger'?: Linter.RuleEntry<[]>
2741
+ 'react/no-complicated-conditional-rendering'?: Linter.RuleEntry<[]>
2873
2742
  /**
2874
- * Disallow when a DOM element is using both children and dangerouslySetInnerHTML
2875
- * @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/no-danger-with-children.md
2743
+ * disallow usage of 'componentWillMount'
2744
+ * @see https://eslint-react.xyz/rules/no-component-will-mount
2876
2745
  */
2877
- 'react/no-danger-with-children'?: Linter.RuleEntry<[]>
2746
+ 'react/no-component-will-mount'?: Linter.RuleEntry<[]>
2878
2747
  /**
2879
- * Disallow usage of deprecated methods
2880
- * @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/no-deprecated.md
2748
+ * disallow usage of 'componentWillReceiveProps'
2749
+ * @see https://eslint-react.xyz/rules/no-component-will-receive-props
2881
2750
  */
2882
- 'react/no-deprecated'?: Linter.RuleEntry<[]>
2751
+ 'react/no-component-will-receive-props'?: Linter.RuleEntry<[]>
2883
2752
  /**
2884
- * Disallow usage of setState in componentDidMount
2885
- * @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/no-did-mount-set-state.md
2753
+ * disallow usage of 'componentWillUpdate'
2754
+ * @see https://eslint-react.xyz/rules/no-component-will-update
2886
2755
  */
2887
- 'react/no-did-mount-set-state'?: Linter.RuleEntry<ReactNoDidMountSetState>
2756
+ 'react/no-component-will-update'?: Linter.RuleEntry<[]>
2888
2757
  /**
2889
- * Disallow usage of setState in componentDidUpdate
2890
- * @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/no-did-update-set-state.md
2758
+ * disallow 'createRef' in function components
2759
+ * @see https://eslint-react.xyz/rules/no-create-ref
2891
2760
  */
2892
- 'react/no-did-update-set-state'?: Linter.RuleEntry<ReactNoDidUpdateSetState>
2761
+ 'react/no-create-ref'?: Linter.RuleEntry<[]>
2893
2762
  /**
2894
- * Disallow direct mutation of this.state
2895
- * @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/no-direct-mutation-state.md
2763
+ * disallow direct mutation of state
2764
+ * @see https://eslint-react.xyz/rules/no-direct-mutation-state
2896
2765
  */
2897
2766
  'react/no-direct-mutation-state'?: Linter.RuleEntry<[]>
2898
2767
  /**
2899
- * Disallow usage of findDOMNode
2900
- * @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/no-find-dom-node.md
2768
+ * disallow duplicate keys in 'key' prop when rendering list
2769
+ * @see https://eslint-react.xyz/rules/no-duplicate-key
2901
2770
  */
2902
- 'react/no-find-dom-node'?: Linter.RuleEntry<[]>
2771
+ 'react/no-duplicate-key'?: Linter.RuleEntry<[]>
2903
2772
  /**
2904
- * Disallow usage of invalid attributes
2905
- * @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/no-invalid-html-attribute.md
2773
+ * disallow spreading 'key' from objects.
2774
+ * @see https://eslint-react.xyz/rules/no-implicit-key
2906
2775
  */
2907
- 'react/no-invalid-html-attribute'?: Linter.RuleEntry<ReactNoInvalidHtmlAttribute>
2776
+ 'react/no-implicit-key'?: Linter.RuleEntry<[]>
2908
2777
  /**
2909
- * Disallow usage of isMounted
2910
- * @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/no-is-mounted.md
2778
+ * disallow problematic leaked values from being rendered
2779
+ * @see https://eslint-react.xyz/rules/no-leaked-conditional-rendering
2911
2780
  */
2912
- 'react/no-is-mounted'?: Linter.RuleEntry<[]>
2781
+ 'react/no-leaked-conditional-rendering'?: Linter.RuleEntry<[]>
2913
2782
  /**
2914
- * Disallow multiple component definition per file
2915
- * @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/no-multi-comp.md
2783
+ * require 'displayName' for memo and forwardRef components
2784
+ * @see https://eslint-react.xyz/rules/no-missing-component-display-name
2916
2785
  */
2917
- 'react/no-multi-comp'?: Linter.RuleEntry<ReactNoMultiComp>
2786
+ 'react/no-missing-component-display-name'?: Linter.RuleEntry<[]>
2918
2787
  /**
2919
- * Enforce that namespaces are not used in React elements
2920
- * @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/no-namespace.md
2788
+ * require 'key' prop when rendering list
2789
+ * @see https://eslint-react.xyz/rules/no-missing-key
2921
2790
  */
2922
- 'react/no-namespace'?: Linter.RuleEntry<[]>
2791
+ 'react/no-missing-key'?: Linter.RuleEntry<[]>
2923
2792
  /**
2924
- * Disallow usage of referential-type variables as default param in functional component
2925
- * @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/no-object-type-as-default-prop.md
2793
+ * disallow usage of unstable nested components
2794
+ * @see https://eslint-react.xyz/rules/no-nested-components
2926
2795
  */
2927
- 'react/no-object-type-as-default-prop'?: Linter.RuleEntry<[]>
2796
+ 'react/no-nested-components'?: Linter.RuleEntry<[]>
2928
2797
  /**
2929
- * Disallow usage of shouldComponentUpdate when extending React.PureComponent
2930
- * @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/no-redundant-should-component-update.md
2798
+ * disallow usage of 'shouldComponentUpdate' in class component extends 'React.PureComponent'
2799
+ * @see https://eslint-react.xyz/rules/no-redundant-should-component-update
2931
2800
  */
2932
2801
  'react/no-redundant-should-component-update'?: Linter.RuleEntry<[]>
2933
2802
  /**
2934
- * Disallow usage of the return value of ReactDOM.render
2935
- * @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/no-render-return-value.md
2803
+ * disallow 'setState' in 'componentDidMount'
2804
+ * @see https://eslint-react.xyz/rules/no-set-state-in-component-did-mount
2936
2805
  */
2937
- 'react/no-render-return-value'?: Linter.RuleEntry<[]>
2806
+ 'react/no-set-state-in-component-did-mount'?: Linter.RuleEntry<[]>
2938
2807
  /**
2939
- * Disallow usage of setState
2940
- * @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/no-set-state.md
2808
+ * disallow 'setState' in 'componentDidUpdate'
2809
+ * @see https://eslint-react.xyz/rules/no-set-state-in-component-did-update
2941
2810
  */
2942
- 'react/no-set-state'?: Linter.RuleEntry<[]>
2811
+ 'react/no-set-state-in-component-did-update'?: Linter.RuleEntry<[]>
2943
2812
  /**
2944
- * Disallow using string references
2945
- * @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/no-string-refs.md
2813
+ * disallow 'setState' in 'componentWillUpdate'
2814
+ * @see https://eslint-react.xyz/rules/no-set-state-in-component-will-update
2946
2815
  */
2947
- 'react/no-string-refs'?: Linter.RuleEntry<ReactNoStringRefs>
2816
+ 'react/no-set-state-in-component-will-update'?: Linter.RuleEntry<[]>
2948
2817
  /**
2949
- * Disallow `this` from being used in stateless functional components
2950
- * @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/no-this-in-sfc.md
2818
+ * disallow using deprecated string refs
2819
+ * @see https://eslint-react.xyz/rules/no-string-refs
2951
2820
  */
2952
- 'react/no-this-in-sfc'?: Linter.RuleEntry<[]>
2821
+ 'react/no-string-refs'?: Linter.RuleEntry<[]>
2953
2822
  /**
2954
- * Disallow common typos
2955
- * @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/no-typos.md
2823
+ * disallow usage of 'UNSAFE_componentWillMount'
2824
+ * @see https://eslint-react.xyz/rules/no-unsafe-component-will-mount
2956
2825
  */
2957
- 'react/no-typos'?: Linter.RuleEntry<[]>
2826
+ 'react/no-unsafe-component-will-mount'?: Linter.RuleEntry<[]>
2958
2827
  /**
2959
- * Disallow unescaped HTML entities from appearing in markup
2960
- * @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/no-unescaped-entities.md
2828
+ * disallow usage of 'UNSAFE_componentWillReceiveProps'
2829
+ * @see https://eslint-react.xyz/rules/no-unsafe-component-will-receive-props
2961
2830
  */
2962
- 'react/no-unescaped-entities'?: Linter.RuleEntry<ReactNoUnescapedEntities>
2831
+ 'react/no-unsafe-component-will-receive-props'?: Linter.RuleEntry<[]>
2963
2832
  /**
2964
- * Disallow usage of unknown DOM property
2965
- * @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/no-unknown-property.md
2833
+ * disallow usage of 'UNSAFE_componentWillUpdate'
2834
+ * @see https://eslint-react.xyz/rules/no-unsafe-component-will-update
2966
2835
  */
2967
- 'react/no-unknown-property'?: Linter.RuleEntry<ReactNoUnknownProperty>
2836
+ 'react/no-unsafe-component-will-update'?: Linter.RuleEntry<[]>
2968
2837
  /**
2969
- * Disallow usage of unsafe lifecycle methods
2970
- * @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/no-unsafe.md
2838
+ * disallow passing constructed values to context providers
2839
+ * @see https://eslint-react.xyz/rules/no-unstable-context-value
2971
2840
  */
2972
- 'react/no-unsafe'?: Linter.RuleEntry<ReactNoUnsafe>
2841
+ 'react/no-unstable-context-value'?: Linter.RuleEntry<[]>
2973
2842
  /**
2974
- * Disallow creating unstable components inside components
2975
- * @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/no-unstable-nested-components.md
2843
+ * disallow usage of unstable value as default param in function component
2844
+ * @see https://eslint-react.xyz/rules/no-unstable-default-props
2976
2845
  */
2977
- 'react/no-unstable-nested-components'?: Linter.RuleEntry<ReactNoUnstableNestedComponents>
2846
+ 'react/no-unstable-default-props'?: Linter.RuleEntry<[]>
2978
2847
  /**
2979
- * Disallow declaring unused methods of component class
2980
- * @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/no-unused-class-component-methods.md
2848
+ * disallow unused class component members
2849
+ * @see https://eslint-react.xyz/rules/no-unused-class-component-members
2981
2850
  */
2982
- 'react/no-unused-class-component-methods'?: Linter.RuleEntry<[]>
2851
+ 'react/no-unused-class-component-members'?: Linter.RuleEntry<[]>
2983
2852
  /**
2984
- * Disallow definitions of unused propTypes
2985
- * @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/no-unused-prop-types.md
2986
- */
2987
- 'react/no-unused-prop-types'?: Linter.RuleEntry<ReactNoUnusedPropTypes>
2988
- /**
2989
- * Disallow definitions of unused state
2990
- * @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/no-unused-state.md
2853
+ * Prevents unused state of class component.
2854
+ * @see https://eslint-react.xyz/rules/no-unused-state
2991
2855
  */
2992
2856
  'react/no-unused-state'?: Linter.RuleEntry<[]>
2993
2857
  /**
2994
- * Disallow usage of setState in componentWillUpdate
2995
- * @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/no-will-update-set-state.md
2996
- */
2997
- 'react/no-will-update-set-state'?: Linter.RuleEntry<ReactNoWillUpdateSetState>
2998
- /**
2999
- * Enforce ES5 or ES6 class for React Components
3000
- * @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/prefer-es6-class.md
3001
- */
3002
- 'react/prefer-es6-class'?: Linter.RuleEntry<ReactPreferEs6Class>
3003
- /**
3004
- * Prefer exact proptype definitions
3005
- * @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/prefer-exact-props.md
3006
- */
3007
- 'react/prefer-exact-props'?: Linter.RuleEntry<[]>
3008
- /**
3009
- * Enforce that props are read-only
3010
- * @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/prefer-read-only-props.md
3011
- */
3012
- 'react/prefer-read-only-props'?: Linter.RuleEntry<[]>
3013
- /**
3014
- * Enforce stateless components to be written as a pure function
3015
- * @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/prefer-stateless-function.md
3016
- */
3017
- 'react/prefer-stateless-function'?: Linter.RuleEntry<ReactPreferStatelessFunction>
3018
- /**
3019
- * Disallow missing props validation in a React component definition
3020
- * @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/prop-types.md
3021
- */
3022
- 'react/prop-types'?: Linter.RuleEntry<ReactPropTypes>
3023
- /**
3024
- * Disallow missing React when using JSX
3025
- * @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/react-in-jsx-scope.md
3026
- */
3027
- 'react/react-in-jsx-scope'?: Linter.RuleEntry<[]>
3028
- /**
3029
- * Enforce a defaultProps definition for every prop that is not a required prop
3030
- * @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/require-default-props.md
3031
- */
3032
- 'react/require-default-props'?: Linter.RuleEntry<ReactRequireDefaultProps>
3033
- /**
3034
- * Enforce React components to have a shouldComponentUpdate method
3035
- * @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/require-optimization.md
3036
- */
3037
- 'react/require-optimization'?: Linter.RuleEntry<ReactRequireOptimization>
3038
- /**
3039
- * Enforce ES5 or ES6 class for returning value in render function
3040
- * @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/require-render-return.md
3041
- */
3042
- 'react/require-render-return'?: Linter.RuleEntry<[]>
3043
- /**
3044
- * Disallow extra closing tags for components without children
3045
- * @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/self-closing-comp.md
3046
- */
3047
- 'react/self-closing-comp'?: Linter.RuleEntry<ReactSelfClosingComp>
3048
- /**
3049
- * Enforce component methods order
3050
- * @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/sort-comp.md
3051
- */
3052
- 'react/sort-comp'?: Linter.RuleEntry<ReactSortComp>
3053
- /**
3054
- * Enforce defaultProps declarations alphabetical sorting
3055
- * @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/sort-default-props.md
2858
+ * disallow unnecessary fragments
2859
+ * @see https://eslint-react.xyz/rules/no-useless-fragment
3056
2860
  */
3057
- 'react/sort-default-props'?: Linter.RuleEntry<ReactSortDefaultProps>
2861
+ 'react/no-useless-fragment'?: Linter.RuleEntry<[]>
3058
2862
  /**
3059
- * Enforce propTypes declarations alphabetical sorting
3060
- * @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/sort-prop-types.md
2863
+ * enforce using destructuring assignment in component props and context
2864
+ * @see https://eslint-react.xyz/rules/prefer-destructuring-assignment
3061
2865
  */
3062
- 'react/sort-prop-types'?: Linter.RuleEntry<ReactSortPropTypes>
2866
+ 'react/prefer-destructuring-assignment'?: Linter.RuleEntry<[]>
3063
2867
  /**
3064
- * Enforce class component state initialization style
3065
- * @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/state-in-constructor.md
2868
+ * enforce boolean attributes notation in JSX
2869
+ * @see https://eslint-react.xyz/rules/prefer-shorthand-boolean
3066
2870
  */
3067
- 'react/state-in-constructor'?: Linter.RuleEntry<ReactStateInConstructor>
2871
+ 'react/prefer-shorthand-boolean'?: Linter.RuleEntry<[]>
3068
2872
  /**
3069
- * Enforces where React component static properties should be positioned.
3070
- * @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/static-property-placement.md
2873
+ * enforce using fragment syntax instead of Fragment component
2874
+ * @see https://eslint-react.xyz/rules/prefer-shorthand-fragment
3071
2875
  */
3072
- 'react/static-property-placement'?: Linter.RuleEntry<ReactStaticPropertyPlacement>
3073
- /**
3074
- * Enforce style prop value is an object
3075
- * @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/style-prop-object.md
3076
- */
3077
- 'react/style-prop-object'?: Linter.RuleEntry<ReactStylePropObject>
3078
- /**
3079
- * Disallow void DOM elements (e.g. `<img />`, `<br />`) from receiving children
3080
- * @see https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/void-dom-elements-no-children.md
3081
- */
3082
- 'react/void-dom-elements-no-children'?: Linter.RuleEntry<[]>
2876
+ 'react/prefer-shorthand-fragment'?: Linter.RuleEntry<[]>
3083
2877
  /**
3084
2878
  * Disallow assignments that can lead to race conditions due to usage of `await` or `yield`
3085
2879
  * @see https://eslint.org/docs/latest/rules/require-atomic-updates
@@ -3090,12 +2884,6 @@ interface RuleOptions {
3090
2884
  * @see https://eslint.org/docs/latest/rules/require-await
3091
2885
  */
3092
2886
  'require-await'?: Linter.RuleEntry<[]>
3093
- /**
3094
- * Require JSDoc comments
3095
- * @see https://eslint.org/docs/latest/rules/require-jsdoc
3096
- * @deprecated
3097
- */
3098
- 'require-jsdoc'?: Linter.RuleEntry<RequireJsdoc>
3099
2887
  /**
3100
2888
  * Enforce the use of `u` or `v` flag on RegExp
3101
2889
  * @see https://eslint.org/docs/latest/rules/require-unicode-regexp
@@ -5484,12 +5272,6 @@ interface RuleOptions {
5484
5272
  * @see https://eslint.org/docs/latest/rules/use-isnan
5485
5273
  */
5486
5274
  'use-isnan'?: Linter.RuleEntry<UseIsnan>
5487
- /**
5488
- * Enforce valid JSDoc comments
5489
- * @see https://eslint.org/docs/latest/rules/valid-jsdoc
5490
- * @deprecated
5491
- */
5492
- 'valid-jsdoc'?: Linter.RuleEntry<ValidJsdoc>
5493
5275
  /**
5494
5276
  * Enforce comparing `typeof` expressions against valid strings
5495
5277
  * @see https://eslint.org/docs/latest/rules/valid-typeof
@@ -6956,7 +6738,7 @@ type Camelcase = []|[{
6956
6738
  ignoreGlobals?: boolean
6957
6739
  properties?: ("always" | "never")
6958
6740
 
6959
- allow?: []|[string]
6741
+ allow?: string[]
6960
6742
  }]
6961
6743
  // ----- capitalized-comments -----
6962
6744
  type CapitalizedComments = []|[("always" | "never")]|[("always" | "never"), ({
@@ -8660,12 +8442,8 @@ type NoConsole = []|[{
8660
8442
  }]
8661
8443
  // ----- no-constant-condition -----
8662
8444
  type NoConstantCondition = []|[{
8663
- checkLoops?: boolean
8445
+ checkLoops?: ("all" | "allExceptWhileTrue" | "none" | true | false)
8664
8446
  }]
8665
- // ----- no-constructor-return -----
8666
- interface NoConstructorReturn {
8667
- [k: string]: unknown | undefined
8668
- }
8669
8447
  // ----- no-duplicate-imports -----
8670
8448
  type NoDuplicateImports = []|[{
8671
8449
  includeExports?: boolean
@@ -8715,6 +8493,7 @@ type NoExtraParens = ([]|["functions"] | []|["all"]|["all", {
8715
8493
  type NoFallthrough = []|[{
8716
8494
  commentPattern?: string
8717
8495
  allowEmptyCase?: boolean
8496
+ reportUnusedFallthroughComment?: boolean
8718
8497
  }]
8719
8498
  // ----- no-global-assign -----
8720
8499
  type NoGlobalAssign = []|[{
@@ -8726,7 +8505,7 @@ type NoImplicitCoercion = []|[{
8726
8505
  number?: boolean
8727
8506
  string?: boolean
8728
8507
  disallowTemplateShorthand?: boolean
8729
- allow?: ("~" | "!!" | "+" | "*")[]
8508
+ allow?: ("~" | "!!" | "+" | "- -" | "-" | "*")[]
8730
8509
  }]
8731
8510
  // ----- no-implicit-globals -----
8732
8511
  type NoImplicitGlobals = []|[{
@@ -8737,7 +8516,9 @@ type NoInlineComments = []|[{
8737
8516
  ignorePattern?: string
8738
8517
  }]
8739
8518
  // ----- no-inner-declarations -----
8740
- type NoInnerDeclarations = []|[("functions" | "both")]
8519
+ type NoInnerDeclarations = []|[("functions" | "both")]|[("functions" | "both"), {
8520
+ blockScopedFunctions?: ("allow" | "disallow")
8521
+ }]
8741
8522
  // ----- no-invalid-regexp -----
8742
8523
  type NoInvalidRegexp = []|[{
8743
8524
  allowConstructorFlags?: string[]
@@ -8844,18 +8625,23 @@ type NoRestrictedImports = ((string | {
8844
8625
  name: string
8845
8626
  message?: string
8846
8627
  importNames?: string[]
8628
+ allowImportNames?: string[]
8847
8629
  })[] | []|[{
8848
8630
  paths?: (string | {
8849
8631
  name: string
8850
8632
  message?: string
8851
8633
  importNames?: string[]
8634
+ allowImportNames?: string[]
8852
8635
  })[]
8853
8636
  patterns?: (string[] | {
8854
8637
 
8855
8638
  importNames?: [string, ...(string)[]]
8856
8639
 
8640
+ allowImportNames?: [string, ...(string)[]]
8641
+
8857
8642
  group: [string, ...(string)[]]
8858
8643
  importNamePattern?: string
8644
+ allowImportNamePattern?: string
8859
8645
  message?: string
8860
8646
  caseSensitive?: boolean
8861
8647
  }[])
@@ -8965,6 +8751,8 @@ type NoUnusedVars = []|[(("all" | "local") | {
8965
8751
  caughtErrors?: ("all" | "none")
8966
8752
  caughtErrorsIgnorePattern?: string
8967
8753
  destructuredArrayIgnorePattern?: string
8754
+ ignoreClassWithStaticInitBlock?: boolean
8755
+ reportUsedIgnorePattern?: boolean
8968
8756
  })]
8969
8757
  // ----- no-use-before-define -----
8970
8758
  type NoUseBeforeDefine = []|[("nofunc" | {
@@ -9565,457 +9353,32 @@ type ReactHooksExhaustiveDeps = []|[{
9565
9353
  additionalHooks?: string
9566
9354
  enableDangerousAutofixThisMayCauseInfiniteLoops?: boolean
9567
9355
  }]
9568
- // ----- react-refresh/only-export-components -----
9569
- type ReactRefreshOnlyExportComponents = []|[{
9570
- allowConstantExport?: boolean
9571
- checkJS?: boolean
9572
- allowExportNames?: string[]
9573
- }]
9574
- // ----- react/boolean-prop-naming -----
9575
- type ReactBooleanPropNaming = []|[{
9576
-
9577
- propTypeNames?: [string, ...(string)[]]
9578
- rule?: string
9579
- message?: string
9580
- validateNested?: boolean
9581
- }]
9582
- // ----- react/button-has-type -----
9583
- type ReactButtonHasType = []|[{
9584
- button?: boolean
9585
- submit?: boolean
9586
- reset?: boolean
9587
- }]
9588
- // ----- react/checked-requires-onchange-or-readonly -----
9589
- type ReactCheckedRequiresOnchangeOrReadonly = []|[{
9590
- ignoreMissingProperties?: boolean
9591
- ignoreExclusiveCheckedAttribute?: boolean
9592
- }]
9593
- // ----- react/default-props-match-prop-types -----
9594
- type ReactDefaultPropsMatchPropTypes = []|[{
9595
- allowRequiredDefaults?: boolean
9596
- }]
9597
- // ----- react/destructuring-assignment -----
9598
- type ReactDestructuringAssignment = []|[("always" | "never")]|[("always" | "never"), {
9599
- ignoreClassFields?: boolean
9600
- destructureInSignature?: ("always" | "ignore")
9601
- }]
9602
- // ----- react/display-name -----
9603
- type ReactDisplayName = []|[{
9604
- ignoreTranspilerName?: boolean
9605
- checkContextObjects?: boolean
9606
- }]
9607
- // ----- react/forbid-component-props -----
9608
- type ReactForbidComponentProps = []|[{
9609
- forbid?: (string | {
9610
- propName?: string
9611
- allowedFor?: string[]
9612
- message?: string
9613
- } | {
9614
- propName?: string
9615
-
9616
- disallowedFor: [string, ...(string)[]]
9617
- message?: string
9618
- })[]
9619
- [k: string]: unknown | undefined
9620
- }]
9621
- // ----- react/forbid-dom-props -----
9622
- type ReactForbidDomProps = []|[{
9623
- forbid?: (string | {
9624
- propName?: string
9625
- disallowedFor?: string[]
9626
- message?: string
9627
- [k: string]: unknown | undefined
9628
- })[]
9629
- }]
9630
- // ----- react/forbid-elements -----
9631
- type ReactForbidElements = []|[{
9632
- forbid?: (string | {
9633
- element: string
9634
- message?: string
9635
- })[]
9636
- }]
9637
- // ----- react/forbid-foreign-prop-types -----
9638
- type ReactForbidForeignPropTypes = []|[{
9639
- allowInPropTypes?: boolean
9640
- }]
9641
- // ----- react/forbid-prop-types -----
9642
- type ReactForbidPropTypes = []|[{
9643
- forbid?: string[]
9644
- checkContextTypes?: boolean
9645
- checkChildContextTypes?: boolean
9646
- [k: string]: unknown | undefined
9647
- }]
9648
- // ----- react/function-component-definition -----
9649
- type ReactFunctionComponentDefinition = []|[{
9650
- namedComponents?: (("function-declaration" | "arrow-function" | "function-expression") | ("function-declaration" | "arrow-function" | "function-expression")[])
9651
- unnamedComponents?: (("arrow-function" | "function-expression") | ("arrow-function" | "function-expression")[])
9652
- [k: string]: unknown | undefined
9653
- }]
9654
- // ----- react/hook-use-state -----
9655
- type ReactHookUseState = []|[{
9656
- allowDestructuredState?: boolean
9657
- }]
9658
- // ----- react/jsx-boolean-value -----
9659
- type ReactJsxBooleanValue = ([]|[("always" | "never")] | []|["always"]|["always", {
9660
- never?: string[]
9661
- assumeUndefinedIsFalse?: boolean
9662
- }] | []|["never"]|["never", {
9663
- always?: string[]
9664
- assumeUndefinedIsFalse?: boolean
9665
- }])
9666
- // ----- react/jsx-closing-bracket-location -----
9667
- type ReactJsxClosingBracketLocation = []|[(("after-props" | "props-aligned" | "tag-aligned" | "line-aligned") | {
9668
- location?: ("after-props" | "props-aligned" | "tag-aligned" | "line-aligned")
9669
- } | {
9670
- nonEmpty?: ("after-props" | "props-aligned" | "tag-aligned" | "line-aligned" | false)
9671
- selfClosing?: ("after-props" | "props-aligned" | "tag-aligned" | "line-aligned" | false)
9356
+ // ----- react-naming-convention/component-name -----
9357
+ type ReactNamingConventionComponentName = []|[(("PascalCase" | "CONSTANT_CASE") | {
9358
+ excepts?: string[]
9359
+ rule?: ("PascalCase" | "CONSTANT_CASE")
9672
9360
  })]
9673
- // ----- react/jsx-curly-brace-presence -----
9674
- type ReactJsxCurlyBracePresence = []|[({
9675
- props?: ("always" | "never" | "ignore")
9676
- children?: ("always" | "never" | "ignore")
9677
- propElementValues?: ("always" | "never" | "ignore")
9678
- } | ("always" | "never" | "ignore"))]
9679
- // ----- react/jsx-curly-newline -----
9680
- type ReactJsxCurlyNewline = []|[(("consistent" | "never") | {
9681
- singleline?: ("consistent" | "require" | "forbid")
9682
- multiline?: ("consistent" | "require" | "forbid")
9361
+ // ----- react-naming-convention/filename -----
9362
+ type ReactNamingConventionFilename = []|[(("PascalCase" | "camelCase" | "kebab-case" | "snake_case") | {
9363
+ excepts?: string[]
9364
+ extensions?: string[]
9365
+ rule?: ("PascalCase" | "camelCase" | "kebab-case" | "snake_case")
9683
9366
  })]
9684
- // ----- react/jsx-curly-spacing -----
9685
- type ReactJsxCurlySpacing = []|[((_ReactJsxCurlySpacing_BasicConfig & {
9686
- attributes?: _ReactJsxCurlySpacingBasicConfigOrBoolean
9687
- children?: _ReactJsxCurlySpacingBasicConfigOrBoolean
9688
- [k: string]: unknown | undefined
9689
- }) | ("always" | "never"))]|[((_ReactJsxCurlySpacing_BasicConfig & {
9690
- attributes?: _ReactJsxCurlySpacingBasicConfigOrBoolean
9691
- children?: _ReactJsxCurlySpacingBasicConfigOrBoolean
9692
- [k: string]: unknown | undefined
9693
- }) | ("always" | "never")), {
9694
- allowMultiline?: boolean
9695
- spacing?: {
9696
- objectLiterals?: ("always" | "never")
9697
- [k: string]: unknown | undefined
9698
- }
9699
- }]
9700
- type _ReactJsxCurlySpacingBasicConfigOrBoolean = (_ReactJsxCurlySpacing_BasicConfig | boolean)
9701
- interface _ReactJsxCurlySpacing_BasicConfig {
9702
- when?: ("always" | "never")
9703
- allowMultiline?: boolean
9704
- spacing?: {
9705
- objectLiterals?: ("always" | "never")
9706
- [k: string]: unknown | undefined
9707
- }
9708
- [k: string]: unknown | undefined
9709
- }
9710
- // ----- react/jsx-equals-spacing -----
9711
- type ReactJsxEqualsSpacing = []|[("always" | "never")]
9712
- // ----- react/jsx-filename-extension -----
9713
- type ReactJsxFilenameExtension = []|[{
9367
+ // ----- react-naming-convention/filename-extension -----
9368
+ type ReactNamingConventionFilenameExtension = []|[(("always" | "as-needed") | {
9714
9369
  allow?: ("always" | "as-needed")
9715
9370
  extensions?: string[]
9716
- ignoreFilesWithoutCode?: boolean
9717
- }]
9718
- // ----- react/jsx-first-prop-new-line -----
9719
- type ReactJsxFirstPropNewLine = []|[("always" | "never" | "multiline" | "multiline-multiprop" | "multiprop")]
9720
- // ----- react/jsx-fragments -----
9721
- type ReactJsxFragments = []|[("syntax" | "element")]
9722
- // ----- react/jsx-handler-names -----
9723
- type ReactJsxHandlerNames = []|[({
9724
- eventHandlerPrefix?: string
9725
- eventHandlerPropPrefix?: string
9726
- checkLocalVariables?: boolean
9727
- checkInlineFunction?: boolean
9728
- } | {
9729
- eventHandlerPrefix?: string
9730
- eventHandlerPropPrefix?: false
9731
- checkLocalVariables?: boolean
9732
- checkInlineFunction?: boolean
9733
- } | {
9734
- eventHandlerPrefix?: false
9735
- eventHandlerPropPrefix?: string
9736
- checkLocalVariables?: boolean
9737
- checkInlineFunction?: boolean
9738
- } | {
9739
- checkLocalVariables?: boolean
9740
- } | {
9741
- checkInlineFunction?: boolean
9742
- })]
9743
- // ----- react/jsx-indent -----
9744
- type ReactJsxIndent = []|[("tab" | number)]|[("tab" | number), {
9745
- checkAttributes?: boolean
9746
- indentLogicalExpressions?: boolean
9747
- }]
9748
- // ----- react/jsx-indent-props -----
9749
- type ReactJsxIndentProps = []|[(("tab" | "first") | number | {
9750
- indentMode?: (("tab" | "first") | number)
9751
- ignoreTernaryOperator?: boolean
9752
- [k: string]: unknown | undefined
9753
9371
  })]
9754
- // ----- react/jsx-key -----
9755
- type ReactJsxKey = []|[{
9756
- checkFragmentShorthand?: boolean
9757
- checkKeyMustBeforeSpread?: boolean
9758
- warnOnDuplicates?: boolean
9759
- }]
9760
- // ----- react/jsx-max-depth -----
9761
- type ReactJsxMaxDepth = []|[{
9762
- max?: number
9763
- }]
9764
- // ----- react/jsx-max-props-per-line -----
9765
- type ReactJsxMaxPropsPerLine = []|[({
9766
- maximum?: {
9767
- single?: number
9768
- multi?: number
9769
- [k: string]: unknown | undefined
9770
- }
9771
- } | {
9772
- maximum?: number
9773
- when?: ("always" | "multiline")
9774
- })]
9775
- // ----- react/jsx-newline -----
9776
- type ReactJsxNewline = []|[{
9777
- prevent?: boolean
9778
- allowMultilines?: boolean
9779
- }]
9780
- // ----- react/jsx-no-bind -----
9781
- type ReactJsxNoBind = []|[{
9782
- allowArrowFunctions?: boolean
9783
- allowBind?: boolean
9784
- allowFunctions?: boolean
9785
- ignoreRefs?: boolean
9786
- ignoreDOMComponents?: boolean
9787
- }]
9788
- // ----- react/jsx-no-constructed-context-values -----
9789
- interface ReactJsxNoConstructedContextValues {
9790
- [k: string]: unknown | undefined
9791
- }
9792
- // ----- react/jsx-no-duplicate-props -----
9793
- type ReactJsxNoDuplicateProps = []|[{
9794
- ignoreCase?: boolean
9795
- }]
9796
- // ----- react/jsx-no-leaked-render -----
9797
- type ReactJsxNoLeakedRender = []|[{
9798
- validStrategies?: ("ternary" | "coerce")[]
9799
- }]
9800
- // ----- react/jsx-no-literals -----
9801
- type ReactJsxNoLiterals = []|[{
9802
- noStrings?: boolean
9803
- allowedStrings?: string[]
9804
- ignoreProps?: boolean
9805
- noAttributeStrings?: boolean
9806
- }]
9807
- // ----- react/jsx-no-script-url -----
9808
- type ReactJsxNoScriptUrl = ([]|[{
9809
- name: string
9810
- props: string[]
9811
- }[]]|[{
9812
- name: string
9813
- props: string[]
9814
- }[], {
9815
- includeFromSettings?: boolean
9816
- [k: string]: unknown | undefined
9817
- }] | []|[{
9818
- includeFromSettings?: boolean
9819
- [k: string]: unknown | undefined
9820
- }])
9821
- // ----- react/jsx-no-target-blank -----
9822
- type ReactJsxNoTargetBlank = []|[{
9823
- allowReferrer?: boolean
9824
- enforceDynamicLinks?: ("always" | "never")
9825
- warnOnSpreadAttributes?: boolean
9826
- links?: boolean
9827
- forms?: boolean
9828
- }]
9829
- // ----- react/jsx-no-undef -----
9830
- type ReactJsxNoUndef = []|[{
9831
- allowGlobals?: boolean
9832
- }]
9833
- // ----- react/jsx-no-useless-fragment -----
9834
- type ReactJsxNoUselessFragment = []|[{
9835
- allowExpressions?: boolean
9836
- [k: string]: unknown | undefined
9837
- }]
9838
- // ----- react/jsx-one-expression-per-line -----
9839
- type ReactJsxOneExpressionPerLine = []|[{
9840
- allow?: ("none" | "literal" | "single-child" | "non-jsx")
9841
- }]
9842
- // ----- react/jsx-pascal-case -----
9843
- type ReactJsxPascalCase = []|[{
9844
- allowAllCaps?: boolean
9845
- allowLeadingUnderscore?: boolean
9846
- allowNamespace?: boolean
9847
-
9848
- ignore?: []|[string]
9849
- }]
9850
- // ----- react/jsx-props-no-spreading -----
9851
- type ReactJsxPropsNoSpreading = []|[({
9852
- html?: ("enforce" | "ignore")
9853
- custom?: ("enforce" | "ignore")
9854
- exceptions?: string[]
9855
- [k: string]: unknown | undefined
9856
- } & {
9857
- [k: string]: unknown | undefined
9858
- })]
9859
- // ----- react/jsx-sort-default-props -----
9860
- type ReactJsxSortDefaultProps = []|[{
9861
- ignoreCase?: boolean
9862
- }]
9863
- // ----- react/jsx-sort-props -----
9864
- type ReactJsxSortProps = []|[{
9865
- callbacksLast?: boolean
9866
- shorthandFirst?: boolean
9867
- shorthandLast?: boolean
9868
- multiline?: ("ignore" | "first" | "last")
9869
- ignoreCase?: boolean
9870
- noSortAlphabetically?: boolean
9871
- reservedFirst?: (unknown[] | boolean)
9872
- locale?: string
9873
- }]
9874
- // ----- react/jsx-space-before-closing -----
9875
- type ReactJsxSpaceBeforeClosing = []|[("always" | "never")]
9876
- // ----- react/jsx-tag-spacing -----
9877
- type ReactJsxTagSpacing = []|[{
9878
- closingSlash?: ("always" | "never" | "allow")
9879
- beforeSelfClosing?: ("always" | "proportional-always" | "never" | "allow")
9880
- afterOpening?: ("always" | "allow-multiline" | "never" | "allow")
9881
- beforeClosing?: ("always" | "proportional-always" | "never" | "allow")
9882
- }]
9883
- // ----- react/jsx-wrap-multilines -----
9884
- type ReactJsxWrapMultilines = []|[{
9885
- declaration?: (true | false | "ignore" | "parens" | "parens-new-line" | "never")
9886
- assignment?: (true | false | "ignore" | "parens" | "parens-new-line" | "never")
9887
- return?: (true | false | "ignore" | "parens" | "parens-new-line" | "never")
9888
- arrow?: (true | false | "ignore" | "parens" | "parens-new-line" | "never")
9889
- condition?: (true | false | "ignore" | "parens" | "parens-new-line" | "never")
9890
- logical?: (true | false | "ignore" | "parens" | "parens-new-line" | "never")
9891
- prop?: (true | false | "ignore" | "parens" | "parens-new-line" | "never")
9892
- }]
9893
- // ----- react/no-children-prop -----
9894
- type ReactNoChildrenProp = []|[{
9895
- allowFunctions?: boolean
9896
- }]
9897
- // ----- react/no-did-mount-set-state -----
9898
- type ReactNoDidMountSetState = []|["disallow-in-func"]
9899
- // ----- react/no-did-update-set-state -----
9900
- type ReactNoDidUpdateSetState = []|["disallow-in-func"]
9901
- // ----- react/no-invalid-html-attribute -----
9902
- type ReactNoInvalidHtmlAttribute = []|[("rel")[]]
9903
- // ----- react/no-multi-comp -----
9904
- type ReactNoMultiComp = []|[{
9905
- ignoreStateless?: boolean
9906
- }]
9907
- // ----- react/no-string-refs -----
9908
- type ReactNoStringRefs = []|[{
9909
- noTemplateLiterals?: boolean
9910
- }]
9911
- // ----- react/no-unescaped-entities -----
9912
- type ReactNoUnescapedEntities = []|[{
9913
- forbid?: (string | {
9914
- char?: string
9915
- alternatives?: string[]
9916
- [k: string]: unknown | undefined
9917
- })[]
9918
- }]
9919
- // ----- react/no-unknown-property -----
9920
- type ReactNoUnknownProperty = []|[{
9921
- ignore?: string[]
9922
- requireDataLowercase?: boolean
9923
- }]
9924
- // ----- react/no-unsafe -----
9925
- type ReactNoUnsafe = []|[{
9926
- checkAliases?: boolean
9927
- }]
9928
- // ----- react/no-unstable-nested-components -----
9929
- type ReactNoUnstableNestedComponents = []|[{
9930
- customValidators?: string[]
9931
- allowAsProps?: boolean
9932
- }]
9933
- // ----- react/no-unused-prop-types -----
9934
- type ReactNoUnusedPropTypes = []|[{
9935
- ignore?: string[]
9936
- customValidators?: string[]
9937
- skipShapeProps?: boolean
9938
- }]
9939
- // ----- react/no-will-update-set-state -----
9940
- type ReactNoWillUpdateSetState = []|["disallow-in-func"]
9941
- // ----- react/prefer-es6-class -----
9942
- type ReactPreferEs6Class = []|[("always" | "never")]
9943
- // ----- react/prefer-stateless-function -----
9944
- type ReactPreferStatelessFunction = []|[{
9945
- ignorePureComponents?: boolean
9946
- }]
9947
- // ----- react/prop-types -----
9948
- type ReactPropTypes = []|[{
9949
- ignore?: string[]
9950
- customValidators?: string[]
9951
- skipUndeclared?: boolean
9952
- }]
9953
- // ----- react/require-default-props -----
9954
- type ReactRequireDefaultProps = []|[{
9955
- forbidDefaultForRequired?: boolean
9956
- classes?: ("defaultProps" | "ignore")
9957
- functions?: ("defaultArguments" | "defaultProps" | "ignore")
9958
- ignoreFunctionalComponents?: boolean
9959
- }]
9960
- // ----- react/require-optimization -----
9961
- type ReactRequireOptimization = []|[{
9962
- allowDecorators?: string[]
9963
- }]
9964
- // ----- react/self-closing-comp -----
9965
- type ReactSelfClosingComp = []|[{
9966
- component?: boolean
9967
- html?: boolean
9968
- }]
9969
- // ----- react/sort-comp -----
9970
- type ReactSortComp = []|[{
9971
- order?: string[]
9972
- groups?: {
9973
- [k: string]: string[]
9974
- }
9975
- }]
9976
- // ----- react/sort-default-props -----
9977
- type ReactSortDefaultProps = []|[{
9978
- ignoreCase?: boolean
9979
- }]
9980
- // ----- react/sort-prop-types -----
9981
- type ReactSortPropTypes = []|[{
9982
- requiredFirst?: boolean
9983
- callbacksLast?: boolean
9984
- ignoreCase?: boolean
9985
- noSortAlphabetically?: boolean
9986
- sortShapeProp?: boolean
9987
- checkTypes?: boolean
9988
- }]
9989
- // ----- react/state-in-constructor -----
9990
- type ReactStateInConstructor = []|[("always" | "never")]
9991
- // ----- react/static-property-placement -----
9992
- type ReactStaticPropertyPlacement = []|[("static public field" | "static getter" | "property assignment")]|[("static public field" | "static getter" | "property assignment"), {
9993
- propTypes?: ("static public field" | "static getter" | "property assignment")
9994
- defaultProps?: ("static public field" | "static getter" | "property assignment")
9995
- childContextTypes?: ("static public field" | "static getter" | "property assignment")
9996
- contextTypes?: ("static public field" | "static getter" | "property assignment")
9997
- contextType?: ("static public field" | "static getter" | "property assignment")
9998
- displayName?: ("static public field" | "static getter" | "property assignment")
9999
- }]
10000
- // ----- react/style-prop-object -----
10001
- type ReactStylePropObject = []|[{
10002
- allow?: string[]
10003
- [k: string]: unknown | undefined
9372
+ // ----- react-refresh/only-export-components -----
9373
+ type ReactRefreshOnlyExportComponents = []|[{
9374
+ allowConstantExport?: boolean
9375
+ checkJS?: boolean
9376
+ allowExportNames?: string[]
10004
9377
  }]
10005
9378
  // ----- require-atomic-updates -----
10006
9379
  type RequireAtomicUpdates = []|[{
10007
9380
  allowProperties?: boolean
10008
9381
  }]
10009
- // ----- require-jsdoc -----
10010
- type RequireJsdoc = []|[{
10011
- require?: {
10012
- ClassDeclaration?: boolean
10013
- MethodDefinition?: boolean
10014
- FunctionDeclaration?: boolean
10015
- ArrowFunctionExpression?: boolean
10016
- FunctionExpression?: boolean
10017
- }
10018
- }]
10019
9382
  // ----- rest-spread-spacing -----
10020
9383
  type RestSpreadSpacing = []|[("always" | "never")]
10021
9384
  // ----- semi -----
@@ -12380,6 +11743,7 @@ type TsNoRestrictedImports = ((string | {
12380
11743
  name: string
12381
11744
  message?: string
12382
11745
  importNames?: string[]
11746
+ allowImportNames?: string[]
12383
11747
 
12384
11748
  allowTypeImports?: boolean
12385
11749
  })[] | []|[{
@@ -12387,6 +11751,7 @@ type TsNoRestrictedImports = ((string | {
12387
11751
  name: string
12388
11752
  message?: string
12389
11753
  importNames?: string[]
11754
+ allowImportNames?: string[]
12390
11755
 
12391
11756
  allowTypeImports?: boolean
12392
11757
  })[]
@@ -12394,8 +11759,11 @@ type TsNoRestrictedImports = ((string | {
12394
11759
 
12395
11760
  importNames?: [string, ...(string)[]]
12396
11761
 
11762
+ allowImportNames?: [string, ...(string)[]]
11763
+
12397
11764
  group: [string, ...(string)[]]
12398
11765
  importNamePattern?: string
11766
+ allowImportNamePattern?: string
12399
11767
  message?: string
12400
11768
  caseSensitive?: boolean
12401
11769
 
@@ -13014,21 +12382,6 @@ type UseIsnan = []|[{
13014
12382
  enforceForSwitchCase?: boolean
13015
12383
  enforceForIndexOf?: boolean
13016
12384
  }]
13017
- // ----- valid-jsdoc -----
13018
- type ValidJsdoc = []|[{
13019
- prefer?: {
13020
- [k: string]: string | undefined
13021
- }
13022
- preferType?: {
13023
- [k: string]: string | undefined
13024
- }
13025
- requireReturn?: boolean
13026
- requireParamDescription?: boolean
13027
- requireReturnDescription?: boolean
13028
- matchDescription?: string
13029
- requireReturnType?: boolean
13030
- requireParamType?: boolean
13031
- }]
13032
12385
  // ----- valid-typeof -----
13033
12386
  type ValidTypeof = []|[{
13034
12387
  requireStringLiterals?: boolean
@@ -13108,7 +12461,7 @@ type VueCamelcase = []|[{
13108
12461
  ignoreGlobals?: boolean
13109
12462
  properties?: ("always" | "never")
13110
12463
 
13111
- allow?: []|[string]
12464
+ allow?: string[]
13112
12465
  }]
13113
12466
  // ----- vue/comma-dangle -----
13114
12467
  type VueCommaDangle = []|[(_VueCommaDangleValue | {
@@ -13744,7 +13097,7 @@ type VueNoConsole = []|[{
13744
13097
  }]
13745
13098
  // ----- vue/no-constant-condition -----
13746
13099
  type VueNoConstantCondition = []|[{
13747
- checkLoops?: boolean
13100
+ checkLoops?: ("all" | "allExceptWhileTrue" | "none" | true | false)
13748
13101
  }]
13749
13102
  // ----- vue/no-deprecated-model-definition -----
13750
13103
  type VueNoDeprecatedModelDefinition = []|[{
@@ -14540,6 +13893,7 @@ interface OptionsIsInEditor {
14540
13893
  isInEditor?: boolean;
14541
13894
  }
14542
13895
  interface OptionsReact {
13896
+ tsconfigPath?: string;
14543
13897
  typescript?: boolean;
14544
13898
  jsx?: boolean;
14545
13899
  /** react 版本 */
@@ -14601,7 +13955,7 @@ interface OptionsConfig extends OptionsComponentExts {
14601
13955
  * 启用 React 支持.
14602
13956
  *
14603
13957
  * 需要安装:
14604
- * - `eslint-plugin-react`
13958
+ * - `@eslint-react/eslint-plugin`
14605
13959
  * - `eslint-plugin-react-hooks`
14606
13960
  * - `eslint-plugin-react-refresh`
14607
13961
  *
@@ -14698,6 +14052,10 @@ interface OptionsConfig extends OptionsComponentExts {
14698
14052
  }
14699
14053
 
14700
14054
  declare const defaultPluginRenaming: {
14055
+ '@eslint-react': string;
14056
+ '@eslint-react/dom': string;
14057
+ '@eslint-react/hooks-extra': string;
14058
+ '@eslint-react/naming-convention': string;
14701
14059
  '@stylistic': string;
14702
14060
  '@typescript-eslint': string;
14703
14061
  'import-x': string;