@2digits/eslint-config 4.2.0 → 4.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +95 -95
- package/dist/index.d.ts +95 -95
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +5 -5
package/dist/index.d.cts
CHANGED
|
@@ -2796,427 +2796,427 @@ Backward pagination arguments
|
|
|
2796
2796
|
*/
|
|
2797
2797
|
'react-compiler/react-compiler'?: Linter.RuleEntry<ReactCompilerReactCompiler>
|
|
2798
2798
|
/**
|
|
2799
|
-
*
|
|
2799
|
+
* Disallow `children` in void DOM elements.
|
|
2800
2800
|
* @see https://eslint-react.xyz/docs/rules/dom-no-void-elements-with-children
|
|
2801
2801
|
*/
|
|
2802
2802
|
'react-dom/no-children-in-void-dom-elements'?: Linter.RuleEntry<[]>
|
|
2803
2803
|
/**
|
|
2804
|
-
*
|
|
2804
|
+
* Disallow `dangerouslySetInnerHTML`.
|
|
2805
2805
|
* @see https://eslint-react.xyz/docs/rules/dom-no-dangerously-set-innerhtml
|
|
2806
2806
|
*/
|
|
2807
2807
|
'react-dom/no-dangerously-set-innerhtml'?: Linter.RuleEntry<[]>
|
|
2808
2808
|
/**
|
|
2809
|
-
*
|
|
2809
|
+
* Disallow `dangerouslySetInnerHTML` and `children` at the same time.
|
|
2810
2810
|
* @see https://eslint-react.xyz/docs/rules/dom-no-dangerously-set-innerhtml-with-children
|
|
2811
2811
|
*/
|
|
2812
2812
|
'react-dom/no-dangerously-set-innerhtml-with-children'?: Linter.RuleEntry<[]>
|
|
2813
2813
|
/**
|
|
2814
|
-
*
|
|
2814
|
+
* Disallow `findDOMNode`.
|
|
2815
2815
|
* @see https://eslint-react.xyz/docs/rules/dom-no-find-dom-node
|
|
2816
2816
|
*/
|
|
2817
2817
|
'react-dom/no-find-dom-node'?: Linter.RuleEntry<[]>
|
|
2818
2818
|
/**
|
|
2819
|
-
*
|
|
2819
|
+
* Disallow `flushSync`.
|
|
2820
2820
|
* @see https://eslint-react.xyz/docs/rules/dom-no-flush-sync
|
|
2821
2821
|
*/
|
|
2822
2822
|
'react-dom/no-flush-sync'?: Linter.RuleEntry<[]>
|
|
2823
2823
|
/**
|
|
2824
|
-
*
|
|
2824
|
+
* Replaces usages of `ReactDom.hydrate()` with `hydrateRoot()`.
|
|
2825
2825
|
* @see https://eslint-react.xyz/docs/rules/dom-no-hydrate
|
|
2826
2826
|
*/
|
|
2827
2827
|
'react-dom/no-hydrate'?: Linter.RuleEntry<[]>
|
|
2828
2828
|
/**
|
|
2829
|
-
*
|
|
2829
|
+
* Enforces explicit `type` attribute for `button` elements.
|
|
2830
2830
|
* @see https://eslint-react.xyz/docs/rules/dom-no-missing-button-type
|
|
2831
2831
|
*/
|
|
2832
2832
|
'react-dom/no-missing-button-type'?: Linter.RuleEntry<[]>
|
|
2833
2833
|
/**
|
|
2834
|
-
*
|
|
2834
|
+
* Enforces explicit `sandbox` attribute for `iframe` elements.
|
|
2835
2835
|
* @see https://eslint-react.xyz/docs/rules/dom-no-missing-iframe-sandbox
|
|
2836
2836
|
*/
|
|
2837
2837
|
'react-dom/no-missing-iframe-sandbox'?: Linter.RuleEntry<[]>
|
|
2838
2838
|
/**
|
|
2839
|
-
*
|
|
2839
|
+
* Enforces the absence of a `namespace` in React elements.
|
|
2840
2840
|
* @see https://eslint-react.xyz/docs/rules/dom-no-namespace
|
|
2841
2841
|
*/
|
|
2842
2842
|
'react-dom/no-namespace'?: Linter.RuleEntry<[]>
|
|
2843
2843
|
/**
|
|
2844
|
-
*
|
|
2844
|
+
* Replaces usages of `ReactDom.render()` with `createRoot(node).render()`.
|
|
2845
2845
|
* @see https://eslint-react.xyz/docs/rules/dom-no-render
|
|
2846
2846
|
*/
|
|
2847
2847
|
'react-dom/no-render'?: Linter.RuleEntry<[]>
|
|
2848
2848
|
/**
|
|
2849
|
-
*
|
|
2849
|
+
* Disallow the return value of `ReactDOM.render`.
|
|
2850
2850
|
* @see https://eslint-react.xyz/docs/rules/dom-no-render-return-value
|
|
2851
2851
|
*/
|
|
2852
2852
|
'react-dom/no-render-return-value'?: Linter.RuleEntry<[]>
|
|
2853
2853
|
/**
|
|
2854
|
-
*
|
|
2854
|
+
* Disallow `javascript:` URLs as attribute values.
|
|
2855
2855
|
* @see https://eslint-react.xyz/docs/rules/dom-no-script-url
|
|
2856
2856
|
*/
|
|
2857
2857
|
'react-dom/no-script-url'?: Linter.RuleEntry<[]>
|
|
2858
2858
|
/**
|
|
2859
|
-
*
|
|
2859
|
+
* Disallow unknown `DOM` property.
|
|
2860
2860
|
* @see https://eslint-react.xyz/docs/rules/dom-no-unknown-property
|
|
2861
2861
|
*/
|
|
2862
2862
|
'react-dom/no-unknown-property'?: Linter.RuleEntry<ReactDomNoUnknownProperty>
|
|
2863
2863
|
/**
|
|
2864
|
-
*
|
|
2864
|
+
* Enforces `sandbox` attribute for `iframe` elements is not set to unsafe combinations.
|
|
2865
2865
|
* @see https://eslint-react.xyz/docs/rules/dom-no-unsafe-iframe-sandbox
|
|
2866
2866
|
*/
|
|
2867
2867
|
'react-dom/no-unsafe-iframe-sandbox'?: Linter.RuleEntry<[]>
|
|
2868
2868
|
/**
|
|
2869
|
-
*
|
|
2869
|
+
* Disallow `target="_blank"` without `rel="noreferrer noopener"`.
|
|
2870
2870
|
* @see https://eslint-react.xyz/docs/rules/dom-no-unsafe-target-blank
|
|
2871
2871
|
*/
|
|
2872
2872
|
'react-dom/no-unsafe-target-blank'?: Linter.RuleEntry<[]>
|
|
2873
2873
|
/**
|
|
2874
|
-
*
|
|
2874
|
+
* Replaces usages of `useFormState` with `useActionState`.
|
|
2875
2875
|
* @see https://eslint-react.xyz/docs/rules/dom-no-use-form-state
|
|
2876
2876
|
*/
|
|
2877
2877
|
'react-dom/no-use-form-state'?: Linter.RuleEntry<[]>
|
|
2878
2878
|
/**
|
|
2879
|
-
*
|
|
2879
|
+
* Disallow `children` in void DOM elements.
|
|
2880
2880
|
* @see https://eslint-react.xyz/docs/rules/dom-no-void-elements-with-children
|
|
2881
2881
|
*/
|
|
2882
2882
|
'react-dom/no-void-elements-with-children'?: Linter.RuleEntry<[]>
|
|
2883
2883
|
/**
|
|
2884
|
-
*
|
|
2884
|
+
* Enforces explicit boolean values for boolean attributes.
|
|
2885
2885
|
* @see https://eslint-react.xyz/docs/rules/avoid-shorthand-boolean
|
|
2886
2886
|
*/
|
|
2887
2887
|
'react-extra/avoid-shorthand-boolean'?: Linter.RuleEntry<[]>
|
|
2888
2888
|
/**
|
|
2889
|
-
*
|
|
2889
|
+
* Enforces explicit `<Fragment>` components instead of the shorthand `<>` or `</>` syntax.
|
|
2890
2890
|
* @see https://eslint-react.xyz/docs/rules/avoid-shorthand-fragment
|
|
2891
2891
|
*/
|
|
2892
2892
|
'react-extra/avoid-shorthand-fragment'?: Linter.RuleEntry<[]>
|
|
2893
2893
|
/**
|
|
2894
|
-
*
|
|
2894
|
+
* Disallow useless `forwardRef` calls on components that don't use `ref`s.
|
|
2895
2895
|
* @see https://eslint-react.xyz/docs/rules/no-useless-forward-ref
|
|
2896
2896
|
*/
|
|
2897
2897
|
'react-extra/ensure-forward-ref-using-ref'?: Linter.RuleEntry<[]>
|
|
2898
2898
|
/**
|
|
2899
|
-
*
|
|
2899
|
+
* Disallow duplicate props in JSX elements.
|
|
2900
2900
|
* @see https://eslint-react.xyz/docs/rules/no-duplicate-jsx-props
|
|
2901
2901
|
*/
|
|
2902
2902
|
'react-extra/jsx-no-duplicate-props'?: Linter.RuleEntry<[]>
|
|
2903
2903
|
/**
|
|
2904
|
-
*
|
|
2904
|
+
* Marks variables used in JSX as used.
|
|
2905
2905
|
* @see https://eslint-react.xyz/docs/rules/use-jsx-vars
|
|
2906
2906
|
*/
|
|
2907
2907
|
'react-extra/jsx-uses-vars'?: Linter.RuleEntry<[]>
|
|
2908
2908
|
/**
|
|
2909
|
-
*
|
|
2909
|
+
* Disallow accessing `this.state` inside `setState` calls.
|
|
2910
2910
|
* @see https://eslint-react.xyz/docs/rules/no-access-state-in-setstate
|
|
2911
2911
|
*/
|
|
2912
2912
|
'react-extra/no-access-state-in-setstate'?: Linter.RuleEntry<[]>
|
|
2913
2913
|
/**
|
|
2914
|
-
*
|
|
2914
|
+
* Disallow an item's index in the array as its key.
|
|
2915
2915
|
* @see https://eslint-react.xyz/docs/rules/no-array-index-key
|
|
2916
2916
|
*/
|
|
2917
2917
|
'react-extra/no-array-index-key'?: Linter.RuleEntry<[]>
|
|
2918
2918
|
/**
|
|
2919
|
-
*
|
|
2919
|
+
* Disallow `Children.count`.
|
|
2920
2920
|
* @see https://eslint-react.xyz/docs/rules/no-children-count
|
|
2921
2921
|
*/
|
|
2922
2922
|
'react-extra/no-children-count'?: Linter.RuleEntry<[]>
|
|
2923
2923
|
/**
|
|
2924
|
-
*
|
|
2924
|
+
* Disallow 'Children.forEach'.
|
|
2925
2925
|
* @see https://eslint-react.xyz/docs/rules/no-children-for-each
|
|
2926
2926
|
*/
|
|
2927
2927
|
'react-extra/no-children-for-each'?: Linter.RuleEntry<[]>
|
|
2928
2928
|
/**
|
|
2929
|
-
*
|
|
2929
|
+
* Disallow `Children.map`.
|
|
2930
2930
|
* @see https://eslint-react.xyz/docs/rules/no-children-map
|
|
2931
2931
|
*/
|
|
2932
2932
|
'react-extra/no-children-map'?: Linter.RuleEntry<[]>
|
|
2933
2933
|
/**
|
|
2934
|
-
*
|
|
2934
|
+
* Disallow `Children.only`.
|
|
2935
2935
|
* @see https://eslint-react.xyz/docs/rules/no-children-only
|
|
2936
2936
|
*/
|
|
2937
2937
|
'react-extra/no-children-only'?: Linter.RuleEntry<[]>
|
|
2938
2938
|
/**
|
|
2939
|
-
*
|
|
2939
|
+
* Disallow passing `children` as a prop.
|
|
2940
2940
|
* @see https://eslint-react.xyz/docs/rules/no-children-prop
|
|
2941
2941
|
*/
|
|
2942
2942
|
'react-extra/no-children-prop'?: Linter.RuleEntry<[]>
|
|
2943
2943
|
/**
|
|
2944
|
-
*
|
|
2944
|
+
* Disallow `Children.toArray`.
|
|
2945
2945
|
* @see https://eslint-react.xyz/docs/rules/no-children-to-array
|
|
2946
2946
|
*/
|
|
2947
2947
|
'react-extra/no-children-to-array'?: Linter.RuleEntry<[]>
|
|
2948
2948
|
/**
|
|
2949
|
-
*
|
|
2949
|
+
* Disallow class components.
|
|
2950
2950
|
* @see https://eslint-react.xyz/docs/rules/no-class-component
|
|
2951
2951
|
*/
|
|
2952
2952
|
'react-extra/no-class-component'?: Linter.RuleEntry<[]>
|
|
2953
2953
|
/**
|
|
2954
|
-
*
|
|
2954
|
+
* Disallow `cloneElement`.
|
|
2955
2955
|
* @see https://eslint-react.xyz/docs/rules/no-clone-element
|
|
2956
2956
|
*/
|
|
2957
2957
|
'react-extra/no-clone-element'?: Linter.RuleEntry<[]>
|
|
2958
2958
|
/**
|
|
2959
|
-
*
|
|
2959
|
+
* Prevents comments from being inserted as text nodes.
|
|
2960
2960
|
* @see https://eslint-react.xyz/docs/rules/no-comment-textnodes
|
|
2961
2961
|
*/
|
|
2962
2962
|
'react-extra/no-comment-textnodes'?: Linter.RuleEntry<[]>
|
|
2963
2963
|
/**
|
|
2964
|
-
*
|
|
2964
|
+
* Disallow complex conditional rendering in JSX expressions.
|
|
2965
2965
|
* @see https://eslint-react.xyz/docs/rules/no-complex-conditional-rendering
|
|
2966
2966
|
*/
|
|
2967
2967
|
'react-extra/no-complex-conditional-rendering'?: Linter.RuleEntry<[]>
|
|
2968
2968
|
/**
|
|
2969
|
-
*
|
|
2969
|
+
* Disallow complex conditional rendering in JSX expressions.
|
|
2970
2970
|
* @see https://eslint-react.xyz/docs/rules/no-complex-conditional-rendering
|
|
2971
2971
|
*/
|
|
2972
2972
|
'react-extra/no-complicated-conditional-rendering'?: Linter.RuleEntry<[]>
|
|
2973
2973
|
/**
|
|
2974
|
-
*
|
|
2974
|
+
* Replace usages of `componentWillMount` with `UNSAFE_componentWillMount`.
|
|
2975
2975
|
* @see https://eslint-react.xyz/docs/rules/no-component-will-mount
|
|
2976
2976
|
*/
|
|
2977
2977
|
'react-extra/no-component-will-mount'?: Linter.RuleEntry<[]>
|
|
2978
2978
|
/**
|
|
2979
|
-
*
|
|
2979
|
+
* Replace usages of `componentWillReceiveProps` with `UNSAFE_componentWillReceiveProps`.
|
|
2980
2980
|
* @see https://eslint-react.xyz/docs/rules/no-component-will-receive-props
|
|
2981
2981
|
*/
|
|
2982
2982
|
'react-extra/no-component-will-receive-props'?: Linter.RuleEntry<[]>
|
|
2983
2983
|
/**
|
|
2984
|
-
*
|
|
2984
|
+
* Replace usages of `componentWillUpdate` with `UNSAFE_componentWillUpdate`.
|
|
2985
2985
|
* @see https://eslint-react.xyz/docs/rules/no-component-will-update
|
|
2986
2986
|
*/
|
|
2987
2987
|
'react-extra/no-component-will-update'?: Linter.RuleEntry<[]>
|
|
2988
2988
|
/**
|
|
2989
|
-
*
|
|
2989
|
+
* Replace usages of `<Context.Provider>` with `<Context>`.
|
|
2990
2990
|
* @see https://eslint-react.xyz/docs/rules/no-context-provider
|
|
2991
2991
|
*/
|
|
2992
2992
|
'react-extra/no-context-provider'?: Linter.RuleEntry<[]>
|
|
2993
2993
|
/**
|
|
2994
|
-
*
|
|
2994
|
+
* Disallow `createRef` in function components.
|
|
2995
2995
|
* @see https://eslint-react.xyz/docs/rules/no-create-ref
|
|
2996
2996
|
*/
|
|
2997
2997
|
'react-extra/no-create-ref'?: Linter.RuleEntry<[]>
|
|
2998
2998
|
/**
|
|
2999
|
-
*
|
|
2999
|
+
* Disallow `defaultProps` property in favor of ES6 default parameters.
|
|
3000
3000
|
* @see https://eslint-react.xyz/docs/rules/no-default-props
|
|
3001
3001
|
*/
|
|
3002
3002
|
'react-extra/no-default-props'?: Linter.RuleEntry<[]>
|
|
3003
3003
|
/**
|
|
3004
|
-
*
|
|
3004
|
+
* Disallow direct mutation of `this.state`.
|
|
3005
3005
|
* @see https://eslint-react.xyz/docs/rules/no-direct-mutation-state
|
|
3006
3006
|
*/
|
|
3007
3007
|
'react-extra/no-direct-mutation-state'?: Linter.RuleEntry<[]>
|
|
3008
3008
|
/**
|
|
3009
|
-
*
|
|
3009
|
+
* Disallow duplicate props in JSX elements.
|
|
3010
3010
|
* @see https://eslint-react.xyz/docs/rules/no-duplicate-jsx-props
|
|
3011
3011
|
*/
|
|
3012
3012
|
'react-extra/no-duplicate-jsx-props'?: Linter.RuleEntry<[]>
|
|
3013
3013
|
/**
|
|
3014
|
-
*
|
|
3014
|
+
* Disallow duplicate `key` on elements in the same array or a list of `children`.
|
|
3015
3015
|
* @see https://eslint-react.xyz/docs/rules/no-duplicate-key
|
|
3016
3016
|
*/
|
|
3017
3017
|
'react-extra/no-duplicate-key'?: Linter.RuleEntry<[]>
|
|
3018
3018
|
/**
|
|
3019
|
-
*
|
|
3019
|
+
* Replaces usages of `forwardRef` with passing `ref` as a prop.
|
|
3020
3020
|
* @see https://eslint-react.xyz/docs/rules/no-forward-ref
|
|
3021
3021
|
*/
|
|
3022
3022
|
'react-extra/no-forward-ref'?: Linter.RuleEntry<[]>
|
|
3023
3023
|
/**
|
|
3024
|
-
*
|
|
3024
|
+
* Prevents `key` from not being explicitly specified (e.g. spreading `key` from objects).
|
|
3025
3025
|
* @see https://eslint-react.xyz/docs/rules/no-implicit-key
|
|
3026
3026
|
*/
|
|
3027
3027
|
'react-extra/no-implicit-key'?: Linter.RuleEntry<[]>
|
|
3028
3028
|
/**
|
|
3029
|
-
*
|
|
3029
|
+
* Prevents problematic leaked values from being rendered.
|
|
3030
3030
|
* @see https://eslint-react.xyz/docs/rules/no-leaked-conditional-rendering
|
|
3031
3031
|
*/
|
|
3032
3032
|
'react-extra/no-leaked-conditional-rendering'?: Linter.RuleEntry<[]>
|
|
3033
3033
|
/**
|
|
3034
|
-
*
|
|
3034
|
+
* Enforces that all components have a `displayName` which can be used in devtools.
|
|
3035
3035
|
* @see https://eslint-react.xyz/docs/rules/no-missing-component-display-name
|
|
3036
3036
|
*/
|
|
3037
3037
|
'react-extra/no-missing-component-display-name'?: Linter.RuleEntry<[]>
|
|
3038
3038
|
/**
|
|
3039
|
-
*
|
|
3039
|
+
* Enforces that all contexts have a `displayName` which can be used in devtools.
|
|
3040
3040
|
* @see https://eslint-react.xyz/docs/rules/no-missing-context-display-name
|
|
3041
3041
|
*/
|
|
3042
3042
|
'react-extra/no-missing-context-display-name'?: Linter.RuleEntry<[]>
|
|
3043
3043
|
/**
|
|
3044
|
-
*
|
|
3044
|
+
* Disallow missing `key` on items in list rendering.
|
|
3045
3045
|
* @see https://eslint-react.xyz/docs/rules/no-missing-key
|
|
3046
3046
|
*/
|
|
3047
3047
|
'react-extra/no-missing-key'?: Linter.RuleEntry<[]>
|
|
3048
3048
|
/**
|
|
3049
|
-
*
|
|
3049
|
+
* Disallow nesting component definitions inside other components.
|
|
3050
3050
|
* @see https://eslint-react.xyz/docs/rules/no-nested-component-definitions
|
|
3051
3051
|
*/
|
|
3052
3052
|
'react-extra/no-nested-component-definitions'?: Linter.RuleEntry<[]>
|
|
3053
3053
|
/**
|
|
3054
|
-
*
|
|
3054
|
+
* Disallow nesting component definitions inside other components.
|
|
3055
3055
|
* @see https://eslint-react.xyz/docs/rules/no-nested-component-definitions
|
|
3056
3056
|
*/
|
|
3057
3057
|
'react-extra/no-nested-components'?: Linter.RuleEntry<[]>
|
|
3058
3058
|
/**
|
|
3059
|
-
*
|
|
3059
|
+
* Disallow `propTypes` in favor of TypeScript or another type-checking solution.
|
|
3060
3060
|
* @see https://eslint-react.xyz/docs/rules/no-prop-types
|
|
3061
3061
|
*/
|
|
3062
3062
|
'react-extra/no-prop-types'?: Linter.RuleEntry<[]>
|
|
3063
3063
|
/**
|
|
3064
|
-
*
|
|
3064
|
+
* Disallow `shouldComponentUpdate` when extending `React.PureComponent`.
|
|
3065
3065
|
* @see https://eslint-react.xyz/docs/rules/no-redundant-should-component-update
|
|
3066
3066
|
*/
|
|
3067
3067
|
'react-extra/no-redundant-should-component-update'?: Linter.RuleEntry<[]>
|
|
3068
3068
|
/**
|
|
3069
|
-
*
|
|
3069
|
+
* Disallow calling `this.setState` in `componentDidMount` outside of functions, such as callbacks.
|
|
3070
3070
|
* @see https://eslint-react.xyz/docs/rules/no-set-state-in-component-did-mount
|
|
3071
3071
|
*/
|
|
3072
3072
|
'react-extra/no-set-state-in-component-did-mount'?: Linter.RuleEntry<[]>
|
|
3073
3073
|
/**
|
|
3074
|
-
*
|
|
3074
|
+
* Disallows calling `this.setState` in `componentDidUpdate` outside of functions, such as callbacks.
|
|
3075
3075
|
* @see https://eslint-react.xyz/docs/rules/no-set-state-in-component-did-update
|
|
3076
3076
|
*/
|
|
3077
3077
|
'react-extra/no-set-state-in-component-did-update'?: Linter.RuleEntry<[]>
|
|
3078
3078
|
/**
|
|
3079
|
-
*
|
|
3079
|
+
* Disallows calling `this.setState` in `componentWillUpdate` outside of functions, such as callbacks.
|
|
3080
3080
|
* @see https://eslint-react.xyz/docs/rules/no-set-state-in-component-will-update
|
|
3081
3081
|
*/
|
|
3082
3082
|
'react-extra/no-set-state-in-component-will-update'?: Linter.RuleEntry<[]>
|
|
3083
3083
|
/**
|
|
3084
|
-
*
|
|
3084
|
+
* Disallow deprecated string `refs`.
|
|
3085
3085
|
* @see https://eslint-react.xyz/docs/rules/no-string-refs
|
|
3086
3086
|
*/
|
|
3087
3087
|
'react-extra/no-string-refs'?: Linter.RuleEntry<[]>
|
|
3088
3088
|
/**
|
|
3089
|
-
*
|
|
3089
|
+
* Warns the usage of `UNSAFE_componentWillMount` in class components.
|
|
3090
3090
|
* @see https://eslint-react.xyz/docs/rules/no-unsafe-component-will-mount
|
|
3091
3091
|
*/
|
|
3092
3092
|
'react-extra/no-unsafe-component-will-mount'?: Linter.RuleEntry<[]>
|
|
3093
3093
|
/**
|
|
3094
|
-
*
|
|
3094
|
+
* Warns the usage of `UNSAFE_componentWillReceiveProps` in class components.
|
|
3095
3095
|
* @see https://eslint-react.xyz/docs/rules/no-unsafe-component-will-receive-props
|
|
3096
3096
|
*/
|
|
3097
3097
|
'react-extra/no-unsafe-component-will-receive-props'?: Linter.RuleEntry<[]>
|
|
3098
3098
|
/**
|
|
3099
|
-
*
|
|
3099
|
+
* Warns the usage of `UNSAFE_componentWillUpdate` in class components.
|
|
3100
3100
|
* @see https://eslint-react.xyz/docs/rules/no-unsafe-component-will-update
|
|
3101
3101
|
*/
|
|
3102
3102
|
'react-extra/no-unsafe-component-will-update'?: Linter.RuleEntry<[]>
|
|
3103
3103
|
/**
|
|
3104
|
-
*
|
|
3104
|
+
* Prevents non-stable values (i.e. object literals) from being used as a value for `Context.Provider`.
|
|
3105
3105
|
* @see https://eslint-react.xyz/docs/rules/no-unstable-context-value
|
|
3106
3106
|
*/
|
|
3107
3107
|
'react-extra/no-unstable-context-value'?: Linter.RuleEntry<[]>
|
|
3108
3108
|
/**
|
|
3109
|
-
*
|
|
3109
|
+
* Prevents using referential-type values as default props in object destructuring.
|
|
3110
3110
|
* @see https://eslint-react.xyz/docs/rules/no-unstable-default-props
|
|
3111
3111
|
*/
|
|
3112
3112
|
'react-extra/no-unstable-default-props'?: Linter.RuleEntry<[]>
|
|
3113
3113
|
/**
|
|
3114
|
-
*
|
|
3114
|
+
* Warns unused class component methods and properties.
|
|
3115
3115
|
* @see https://eslint-react.xyz/docs/rules/no-unused-class-component-members
|
|
3116
3116
|
*/
|
|
3117
3117
|
'react-extra/no-unused-class-component-members'?: Linter.RuleEntry<[]>
|
|
3118
3118
|
/**
|
|
3119
|
-
*
|
|
3119
|
+
* Warns unused class component state.
|
|
3120
3120
|
* @see https://eslint-react.xyz/docs/rules/no-unused-state
|
|
3121
3121
|
*/
|
|
3122
3122
|
'react-extra/no-unused-state'?: Linter.RuleEntry<[]>
|
|
3123
3123
|
/**
|
|
3124
|
-
*
|
|
3124
|
+
* Replaces usages of `useContext` with `use`.
|
|
3125
3125
|
* @see https://eslint-react.xyz/docs/rules/no-use-context
|
|
3126
3126
|
*/
|
|
3127
3127
|
'react-extra/no-use-context'?: Linter.RuleEntry<[]>
|
|
3128
3128
|
/**
|
|
3129
|
-
*
|
|
3129
|
+
* Disallow useless `forwardRef` calls on components that don't use `ref`s.
|
|
3130
3130
|
* @see https://eslint-react.xyz/docs/rules/no-useless-forward-ref
|
|
3131
3131
|
*/
|
|
3132
3132
|
'react-extra/no-useless-forward-ref'?: Linter.RuleEntry<[]>
|
|
3133
3133
|
/**
|
|
3134
|
-
*
|
|
3134
|
+
* Disallow useless fragment elements.
|
|
3135
3135
|
* @see https://eslint-react.xyz/docs/rules/no-useless-fragment
|
|
3136
3136
|
*/
|
|
3137
3137
|
'react-extra/no-useless-fragment'?: Linter.RuleEntry<ReactExtraNoUselessFragment>
|
|
3138
3138
|
/**
|
|
3139
|
-
*
|
|
3139
|
+
* Enforces destructuring assignment for component props and context.
|
|
3140
3140
|
* @see https://eslint-react.xyz/docs/rules/prefer-destructuring-assignment
|
|
3141
3141
|
*/
|
|
3142
3142
|
'react-extra/prefer-destructuring-assignment'?: Linter.RuleEntry<[]>
|
|
3143
3143
|
/**
|
|
3144
|
-
*
|
|
3144
|
+
* Enforces React is imported via a namespace import.
|
|
3145
3145
|
* @see https://eslint-react.xyz/docs/rules/prefer-react-namespace-import
|
|
3146
3146
|
*/
|
|
3147
3147
|
'react-extra/prefer-react-namespace-import'?: Linter.RuleEntry<[]>
|
|
3148
3148
|
/**
|
|
3149
|
-
*
|
|
3149
|
+
* Enforces read-only props in components.
|
|
3150
3150
|
* @see https://eslint-react.xyz/docs/rules/prefer-read-only-props
|
|
3151
3151
|
*/
|
|
3152
3152
|
'react-extra/prefer-read-only-props'?: Linter.RuleEntry<[]>
|
|
3153
3153
|
/**
|
|
3154
|
-
*
|
|
3154
|
+
* Enforces shorthand syntax for boolean attributes.
|
|
3155
3155
|
* @see https://eslint-react.xyz/docs/rules/prefer-shorthand-boolean
|
|
3156
3156
|
*/
|
|
3157
3157
|
'react-extra/prefer-shorthand-boolean'?: Linter.RuleEntry<[]>
|
|
3158
3158
|
/**
|
|
3159
|
-
*
|
|
3159
|
+
* Enforces shorthand syntax for fragments.
|
|
3160
3160
|
* @see https://eslint-react.xyz/docs/rules/prefer-shorthand-fragment
|
|
3161
3161
|
*/
|
|
3162
3162
|
'react-extra/prefer-shorthand-fragment'?: Linter.RuleEntry<[]>
|
|
3163
3163
|
/**
|
|
3164
|
-
*
|
|
3164
|
+
* Marks variables used in JSX as used.
|
|
3165
3165
|
* @see https://eslint-react.xyz/docs/rules/use-jsx-vars
|
|
3166
3166
|
*/
|
|
3167
3167
|
'react-extra/use-jsx-vars'?: Linter.RuleEntry<[]>
|
|
3168
3168
|
/**
|
|
3169
|
-
*
|
|
3169
|
+
* Enforces that a function with the `use` prefix should use at least one Hook inside of it.
|
|
3170
3170
|
* @see https://eslint-react.xyz/docs/rules/hooks-extra-no-unnecessary-use-prefix
|
|
3171
3171
|
*/
|
|
3172
3172
|
'react-hooks-extra/ensure-custom-hooks-using-other-hooks'?: Linter.RuleEntry<[]>
|
|
3173
3173
|
/**
|
|
3174
|
-
*
|
|
3174
|
+
* Disallow unnecessary usage of `useCallback`.
|
|
3175
3175
|
* @see https://eslint-react.xyz/docs/rules/hooks-extra-no-unnecessary-use-callback
|
|
3176
3176
|
*/
|
|
3177
3177
|
'react-hooks-extra/ensure-use-callback-has-non-empty-deps'?: Linter.RuleEntry<[]>
|
|
3178
3178
|
/**
|
|
3179
|
-
*
|
|
3179
|
+
* Disallow unnecessary usage of `useMemo`.
|
|
3180
3180
|
* @see https://eslint-react.xyz/docs/rules/hooks-extra-no-unnecessary-use-memo
|
|
3181
3181
|
*/
|
|
3182
3182
|
'react-hooks-extra/ensure-use-memo-has-non-empty-deps'?: Linter.RuleEntry<[]>
|
|
3183
3183
|
/**
|
|
3184
|
-
*
|
|
3184
|
+
* Disallow direct calls to the `set` function of `useState` in `useEffect`.
|
|
3185
3185
|
* @see https://eslint-react.xyz/docs/rules/hooks-extra-no-direct-set-state-in-use-effect
|
|
3186
3186
|
*/
|
|
3187
3187
|
'react-hooks-extra/no-direct-set-state-in-use-effect'?: Linter.RuleEntry<[]>
|
|
3188
3188
|
/**
|
|
3189
|
-
*
|
|
3189
|
+
* Disallow direct calls to the `set` function of `useState` in `useLayoutEffect`.
|
|
3190
3190
|
* @see https://eslint-react.xyz/docs/rules/hooks-extra-no-direct-set-state-in-use-layout-effect
|
|
3191
3191
|
*/
|
|
3192
3192
|
'react-hooks-extra/no-direct-set-state-in-use-layout-effect'?: Linter.RuleEntry<[]>
|
|
3193
3193
|
/**
|
|
3194
|
-
*
|
|
3194
|
+
* Enforces that a function with the `use` prefix should use at least one Hook inside of it.
|
|
3195
3195
|
* @see https://eslint-react.xyz/docs/rules/hooks-extra-no-unnecessary-use-prefix
|
|
3196
3196
|
*/
|
|
3197
3197
|
'react-hooks-extra/no-redundant-custom-hook'?: Linter.RuleEntry<[]>
|
|
3198
3198
|
/**
|
|
3199
|
-
*
|
|
3199
|
+
* Disallow unnecessary usage of `useCallback`.
|
|
3200
3200
|
* @see https://eslint-react.xyz/docs/rules/hooks-extra-no-unnecessary-use-callback
|
|
3201
3201
|
*/
|
|
3202
3202
|
'react-hooks-extra/no-unnecessary-use-callback'?: Linter.RuleEntry<[]>
|
|
3203
3203
|
/**
|
|
3204
|
-
*
|
|
3204
|
+
* Disallow unnecessary usage of `useMemo`.
|
|
3205
3205
|
* @see https://eslint-react.xyz/docs/rules/hooks-extra-no-unnecessary-use-memo
|
|
3206
3206
|
*/
|
|
3207
3207
|
'react-hooks-extra/no-unnecessary-use-memo'?: Linter.RuleEntry<[]>
|
|
3208
3208
|
/**
|
|
3209
|
-
*
|
|
3209
|
+
* Enforces that a function with the `use` prefix should use at least one Hook inside of it.
|
|
3210
3210
|
* @see https://eslint-react.xyz/docs/rules/hooks-extra-no-unnecessary-use-prefix
|
|
3211
3211
|
*/
|
|
3212
3212
|
'react-hooks-extra/no-unnecessary-use-prefix'?: Linter.RuleEntry<[]>
|
|
3213
3213
|
/**
|
|
3214
|
-
*
|
|
3214
|
+
* Enforces that a function with the `use` prefix should use at least one Hook inside of it.
|
|
3215
3215
|
* @see https://eslint-react.xyz/docs/rules/hooks-extra-no-unnecessary-use-prefix
|
|
3216
3216
|
*/
|
|
3217
3217
|
'react-hooks-extra/no-useless-custom-hooks'?: Linter.RuleEntry<[]>
|
|
3218
3218
|
/**
|
|
3219
|
-
*
|
|
3219
|
+
* Enforces function calls made inside `useState` to be wrapped in an `initializer function`.
|
|
3220
3220
|
* @see https://eslint-react.xyz/docs/rules/hooks-extra-prefer-use-state-lazy-initialization
|
|
3221
3221
|
*/
|
|
3222
3222
|
'react-hooks-extra/prefer-use-state-lazy-initialization'?: Linter.RuleEntry<[]>
|
|
@@ -3231,47 +3231,47 @@ Backward pagination arguments
|
|
|
3231
3231
|
*/
|
|
3232
3232
|
'react-hooks/rules-of-hooks'?: Linter.RuleEntry<[]>
|
|
3233
3233
|
/**
|
|
3234
|
-
*
|
|
3234
|
+
* Enforces naming conventions for components.
|
|
3235
3235
|
* @see https://eslint-react.xyz/docs/rules/naming-convention-component-name
|
|
3236
3236
|
*/
|
|
3237
3237
|
'react-naming-convention/component-name'?: Linter.RuleEntry<ReactNamingConventionComponentName>
|
|
3238
3238
|
/**
|
|
3239
|
-
*
|
|
3239
|
+
* Enforces context name to be a valid component name with the suffix `Context`.
|
|
3240
3240
|
* @see https://eslint-react.xyz/docs/rules/naming-convention-context-name
|
|
3241
3241
|
*/
|
|
3242
3242
|
'react-naming-convention/context-name'?: Linter.RuleEntry<[]>
|
|
3243
3243
|
/**
|
|
3244
|
-
*
|
|
3244
|
+
* Enforces consistent file naming conventions.
|
|
3245
3245
|
* @see https://eslint-react.xyz/docs/rules/naming-convention-filename
|
|
3246
3246
|
*/
|
|
3247
3247
|
'react-naming-convention/filename'?: Linter.RuleEntry<ReactNamingConventionFilename>
|
|
3248
3248
|
/**
|
|
3249
|
-
*
|
|
3249
|
+
* Enforces consistent file naming conventions.
|
|
3250
3250
|
* @see https://eslint-react.xyz/docs/rules/naming-convention-filename-extension
|
|
3251
3251
|
*/
|
|
3252
3252
|
'react-naming-convention/filename-extension'?: Linter.RuleEntry<ReactNamingConventionFilenameExtension>
|
|
3253
3253
|
/**
|
|
3254
|
-
*
|
|
3254
|
+
* Enforces destructuring and symmetric naming of `useState` hook value and setter.
|
|
3255
3255
|
* @see https://eslint-react.xyz/docs/rules/naming-convention-use-state
|
|
3256
3256
|
*/
|
|
3257
3257
|
'react-naming-convention/use-state'?: Linter.RuleEntry<[]>
|
|
3258
3258
|
/**
|
|
3259
|
-
*
|
|
3259
|
+
* Prevents leaked `addEventListener` in a component or custom Hook.
|
|
3260
3260
|
* @see https://eslint-react.xyz/docs/rules/web-api-no-leaked-event-listener
|
|
3261
3261
|
*/
|
|
3262
3262
|
'react-web-api/no-leaked-event-listener'?: Linter.RuleEntry<[]>
|
|
3263
3263
|
/**
|
|
3264
|
-
*
|
|
3264
|
+
* Prevents leaked `setInterval` in a component or custom Hook.
|
|
3265
3265
|
* @see https://eslint-react.xyz/docs/rules/web-api-no-leaked-interval
|
|
3266
3266
|
*/
|
|
3267
3267
|
'react-web-api/no-leaked-interval'?: Linter.RuleEntry<[]>
|
|
3268
3268
|
/**
|
|
3269
|
-
*
|
|
3269
|
+
* Prevents leaked `ResizeObserver` in a component or custom Hook.
|
|
3270
3270
|
* @see https://eslint-react.xyz/docs/rules/web-api-no-leaked-resize-observer
|
|
3271
3271
|
*/
|
|
3272
3272
|
'react-web-api/no-leaked-resize-observer'?: Linter.RuleEntry<[]>
|
|
3273
3273
|
/**
|
|
3274
|
-
*
|
|
3274
|
+
* Prevents leaked `setTimeout` in a component or custom Hook.
|
|
3275
3275
|
* @see https://eslint-react.xyz/docs/rules/web-api-no-leaked-timeout
|
|
3276
3276
|
*/
|
|
3277
3277
|
'react-web-api/no-leaked-timeout'?: Linter.RuleEntry<[]>
|
|
@@ -13281,7 +13281,7 @@ type Yoda = []|[("always" | "never")]|[("always" | "never"), {
|
|
|
13281
13281
|
onlyEquality?: boolean
|
|
13282
13282
|
}]
|
|
13283
13283
|
// Names of all the configs
|
|
13284
|
-
type ConfigNames = '2digits:antfu' | '2digits:boolean' | '2digits:comments' | '2digits:css' | '2digits:drizzle' | '2digits:graphql' | '2digits:ignores' | '2digits:gitignore' | '2digits:javascript' | '2digits:jsdoc' | '2digits:jsonc/base' | '2digits:jsonc/base' | '2digits:jsonc/json' | '2digits:jsonc/jsonc' | '2digits:jsonc/json5' | '2digits:jsonc/package.json' | '2digits:jsonc/tsconfig.json' | '2digits:jsonc/prettier' | '2digits:jsonc/prettier' | '2digits:jsonc/prettier' | '2digits:markdown/setup' | '2digits:markdown/processor' | '2digits:markdown/parser' | '2digits:markdown/rules' | '2digits:next/setup' | '2digits:next/rules' | '2digits:node' | '2digits:pnpm/package-json' | '2digits:pnpm/pnpm-workspace-yaml' | '2digits:prettier' | '2digits:react/setup' | '2digits:react/rules' | '2digits:regexp' | '2digits:sonar' | '2digits:storybook/setup' | '2digits:storybook/rules' | '2digits:storybook/disables' | '2digits:storybook/config' | '2digits:tailwind' | '2digits:tanstack' | '2digits:turbo' | '2digits:typescript/setup' | '2digits:typescript/rules' | '2digits:typescript/disables/dts' | '2digits:typescript/disables/test' | '2digits:typescript/disables/cjs' | '2digits:unicorn' | '2digits:yaml/setup' | '2digits:yaml/base' | '2digits:yaml/recommended' | '2digits:yaml/standard' | '2digits:yaml/pnpm-workspace' | '2digits:yaml/prettier'
|
|
13284
|
+
type ConfigNames = '2digits:antfu' | '2digits:boolean' | '2digits:comments' | '2digits:css' | '2digits:drizzle' | '2digits:graphql' | '2digits:ignores' | '2digits:gitignore' | '2digits:javascript' | '2digits:jsdoc' | '2digits:jsonc/base' | '2digits:jsonc/base' | '2digits:jsonc/json' | '2digits:jsonc/jsonc' | '2digits:jsonc/json5' | '2digits:jsonc/package.json' | '2digits:jsonc/tsconfig.json' | '2digits:jsonc/prettier' | '2digits:jsonc/prettier' | '2digits:jsonc/prettier' | '2digits:markdown/setup' | '2digits:markdown/processor' | '2digits:markdown/parser' | '2digits:markdown/rules' | '2digits:markdown/disables' | '2digits:next/setup' | '2digits:next/rules' | '2digits:node' | '2digits:pnpm/package-json' | '2digits:pnpm/pnpm-workspace-yaml' | '2digits:prettier' | '2digits:react/setup' | '2digits:react/rules' | '2digits:regexp' | '2digits:sonar' | '2digits:storybook/setup' | '2digits:storybook/rules' | '2digits:storybook/disables' | '2digits:storybook/config' | '2digits:tailwind' | '2digits:tanstack' | '2digits:turbo' | '2digits:typescript/setup' | '2digits:typescript/rules' | '2digits:typescript/disables/dts' | '2digits:typescript/disables/test' | '2digits:typescript/disables/cjs' | '2digits:unicorn' | '2digits:yaml/setup' | '2digits:yaml/base' | '2digits:yaml/recommended' | '2digits:yaml/standard' | '2digits:yaml/pnpm-workspace' | '2digits:yaml/prettier'
|
|
13285
13285
|
|
|
13286
13286
|
type Rules = RuleOptions;
|
|
13287
13287
|
interface TypedFlatConfigItem extends Omit<Linter.Config<Linter.RulesRecord & Rules>, 'plugins' | 'languageOptions'> {
|