@vinicunca/eslint-config 4.1.0 → 4.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.mts CHANGED
@@ -2823,97 +2823,97 @@ interface RuleOptions {
2823
2823
  */
2824
2824
  'radix'?: Linter.RuleEntry<Radix>;
2825
2825
  /**
2826
- * Disallow `dangerouslySetInnerHTML`.
2826
+ * Disallows 'dangerouslySetInnerHTML'.
2827
2827
  * @see https://eslint-react.xyz/docs/rules/dom-no-dangerously-set-innerhtml
2828
2828
  */
2829
2829
  'react-dom/no-dangerously-set-innerhtml'?: Linter.RuleEntry<[]>;
2830
2830
  /**
2831
- * Disallow `dangerouslySetInnerHTML` and `children` at the same time.
2831
+ * Disallows 'dangerouslySetInnerHTML' and 'children' at the same time.
2832
2832
  * @see https://eslint-react.xyz/docs/rules/dom-no-dangerously-set-innerhtml-with-children
2833
2833
  */
2834
2834
  'react-dom/no-dangerously-set-innerhtml-with-children'?: Linter.RuleEntry<[]>;
2835
2835
  /**
2836
- * Disallow `findDOMNode`.
2836
+ * Disallows 'findDOMNode'.
2837
2837
  * @see https://eslint-react.xyz/docs/rules/dom-no-find-dom-node
2838
2838
  */
2839
2839
  'react-dom/no-find-dom-node'?: Linter.RuleEntry<[]>;
2840
2840
  /**
2841
- * Disallow `flushSync`.
2841
+ * Disallows 'flushSync'.
2842
2842
  * @see https://eslint-react.xyz/docs/rules/dom-no-flush-sync
2843
2843
  */
2844
2844
  'react-dom/no-flush-sync'?: Linter.RuleEntry<[]>;
2845
2845
  /**
2846
- * Replaces usages of `ReactDom.hydrate()` with `hydrateRoot()`.
2846
+ * Replaces usage of 'ReactDom.hydrate()' with 'hydrateRoot()'.
2847
2847
  * @see https://eslint-react.xyz/docs/rules/dom-no-hydrate
2848
2848
  */
2849
2849
  'react-dom/no-hydrate'?: Linter.RuleEntry<[]>;
2850
2850
  /**
2851
- * Enforces explicit `type` attribute for `button` elements.
2851
+ * Enforces explicit 'type' attribute for 'button' elements.
2852
2852
  * @see https://eslint-react.xyz/docs/rules/dom-no-missing-button-type
2853
2853
  */
2854
2854
  'react-dom/no-missing-button-type'?: Linter.RuleEntry<[]>;
2855
2855
  /**
2856
- * Enforces explicit `sandbox` prop for `iframe` elements.
2856
+ * Enforces explicit 'sandbox' attribute for 'iframe' elements.
2857
2857
  * @see https://eslint-react.xyz/docs/rules/dom-no-missing-iframe-sandbox
2858
2858
  */
2859
2859
  'react-dom/no-missing-iframe-sandbox'?: Linter.RuleEntry<[]>;
2860
2860
  /**
2861
- * Enforces the absence of a `namespace` in React elements.
2861
+ * Enforces the absence of a 'namespace' in React elements.
2862
2862
  * @see https://eslint-react.xyz/docs/rules/dom-no-namespace
2863
2863
  */
2864
2864
  'react-dom/no-namespace'?: Linter.RuleEntry<[]>;
2865
2865
  /**
2866
- * Replaces usages of `ReactDom.render()` with `createRoot(node).render()`.
2866
+ * Replaces usage of 'ReactDom.render()' with 'createRoot(node).render()'.
2867
2867
  * @see https://eslint-react.xyz/docs/rules/dom-no-render
2868
2868
  */
2869
2869
  'react-dom/no-render'?: Linter.RuleEntry<[]>;
2870
2870
  /**
2871
- * Disallow the return value of `ReactDOM.render`.
2871
+ * Disallows the return value of 'ReactDOM.render'.
2872
2872
  * @see https://eslint-react.xyz/docs/rules/dom-no-render-return-value
2873
2873
  */
2874
2874
  'react-dom/no-render-return-value'?: Linter.RuleEntry<[]>;
2875
2875
  /**
2876
- * Disallow `javascript:` URLs as attribute values.
2876
+ * Disallows 'javascript:' URLs as attribute values.
2877
2877
  * @see https://eslint-react.xyz/docs/rules/dom-no-script-url
2878
2878
  */
2879
2879
  'react-dom/no-script-url'?: Linter.RuleEntry<[]>;
2880
2880
  /**
2881
- * Disallows the use of string style prop.
2881
+ * Disallows the use of string style prop in JSX. Use an object instead.
2882
2882
  * @see https://eslint-react.xyz/docs/rules/dom-no-string-style-prop
2883
2883
  */
2884
2884
  'react-dom/no-string-style-prop'?: Linter.RuleEntry<[]>;
2885
2885
  /**
2886
- * Disallow unknown `DOM` property.
2886
+ * Disallows unknown 'DOM' property.
2887
2887
  * @see https://eslint-react.xyz/docs/rules/dom-no-unknown-property
2888
2888
  */
2889
2889
  'react-dom/no-unknown-property'?: Linter.RuleEntry<ReactDomNoUnknownProperty>;
2890
2890
  /**
2891
- * Enforces `sandbox` attribute for `iframe` elements is not set to unsafe combinations.
2891
+ * Enforces 'sandbox' attribute for 'iframe' elements is not set to unsafe combinations.
2892
2892
  * @see https://eslint-react.xyz/docs/rules/dom-no-unsafe-iframe-sandbox
2893
2893
  */
2894
2894
  'react-dom/no-unsafe-iframe-sandbox'?: Linter.RuleEntry<[]>;
2895
2895
  /**
2896
- * Disallow `target="_blank"` without `rel="noreferrer noopener"`.
2896
+ * Disallows 'target="_blank"' without 'rel="noreferrer noopener"'.
2897
2897
  * @see https://eslint-react.xyz/docs/rules/dom-no-unsafe-target-blank
2898
2898
  */
2899
2899
  'react-dom/no-unsafe-target-blank'?: Linter.RuleEntry<[]>;
2900
2900
  /**
2901
- * Replaces usages of `useFormState` with `useActionState`.
2901
+ * Replaces usage of 'useFormState' with 'useActionState'.
2902
2902
  * @see https://eslint-react.xyz/docs/rules/dom-no-use-form-state
2903
2903
  */
2904
2904
  'react-dom/no-use-form-state'?: Linter.RuleEntry<[]>;
2905
2905
  /**
2906
- * Disallow `children` in void DOM elements.
2906
+ * Disallows 'children' in void DOM elements.
2907
2907
  * @see https://eslint-react.xyz/docs/rules/dom-no-void-elements-with-children
2908
2908
  */
2909
2909
  'react-dom/no-void-elements-with-children'?: Linter.RuleEntry<[]>;
2910
2910
  /**
2911
- * Enforces React Dom is imported via a namespace import.
2911
+ * Enforces React DOM is imported via a namespace import.
2912
2912
  * @see https://eslint-react.xyz/docs/rules/dom-prefer-namespace-import
2913
2913
  */
2914
2914
  'react-dom/prefer-namespace-import'?: Linter.RuleEntry<[]>;
2915
2915
  /**
2916
- * Disallow direct calls to the `set` function of `useState` in `useEffect`.
2916
+ * Disallows **direct** calls to the 'set' function of 'useState' in 'useEffect'.
2917
2917
  * @see https://eslint-react.xyz/docs/rules/hooks-extra-no-direct-set-state-in-use-effect
2918
2918
  */
2919
2919
  'react-hooks-extra/no-direct-set-state-in-use-effect'?: Linter.RuleEntry<[]>;
@@ -3041,7 +3041,7 @@ interface RuleOptions {
3041
3041
  */
3042
3042
  'react-naming-convention/component-name'?: Linter.RuleEntry<ReactNamingConventionComponentName>;
3043
3043
  /**
3044
- * Enforces context name to be a valid component name with the suffix `Context`.
3044
+ * Enforces the context name to be a valid component name with the suffix 'Context'.
3045
3045
  * @see https://eslint-react.xyz/docs/rules/naming-convention-context-name
3046
3046
  */
3047
3047
  'react-naming-convention/context-name'?: Linter.RuleEntry<[]>;
@@ -3051,38 +3051,43 @@ interface RuleOptions {
3051
3051
  */
3052
3052
  'react-naming-convention/filename'?: Linter.RuleEntry<ReactNamingConventionFilename>;
3053
3053
  /**
3054
- * Enforces consistent file naming conventions.
3054
+ * Enforces consistent use of the JSX file extension.
3055
3055
  * @see https://eslint-react.xyz/docs/rules/naming-convention-filename-extension
3056
3056
  */
3057
3057
  'react-naming-convention/filename-extension'?: Linter.RuleEntry<ReactNamingConventionFilenameExtension>;
3058
3058
  /**
3059
- * Enforces destructuring and symmetric naming of `useState` hook value and setter.
3059
+ * Enforces that variables assigned from useRef calls have names ending with 'Ref'.
3060
+ * @see https://eslint-react.xyz/docs/rules/naming-convention-ref-name
3061
+ */
3062
+ 'react-naming-convention/ref-name'?: Linter.RuleEntry<[]>;
3063
+ /**
3064
+ * Enforces destructuring and symmetric naming of the 'useState' hook value and setter.
3060
3065
  * @see https://eslint-react.xyz/docs/rules/naming-convention-use-state
3061
3066
  */
3062
- 'react-naming-convention/use-state'?: Linter.RuleEntry<[]>;
3067
+ 'react-naming-convention/use-state'?: Linter.RuleEntry<ReactNamingConventionUseState>;
3063
3068
  'react-refresh/only-export-components'?: Linter.RuleEntry<ReactRefreshOnlyExportComponents>;
3064
3069
  /**
3065
- * Prevents leaked `addEventListener` in a component or custom Hook.
3070
+ * Enforces that every 'addEventListener' in a component or custom hook has a corresponding 'removeEventListener'.
3066
3071
  * @see https://eslint-react.xyz/docs/rules/web-api-no-leaked-event-listener
3067
3072
  */
3068
3073
  'react-web-api/no-leaked-event-listener'?: Linter.RuleEntry<[]>;
3069
3074
  /**
3070
- * Prevents leaked `setInterval` in a component or custom Hook.
3075
+ * Enforces that every 'setInterval' in a component or custom hook has a corresponding 'clearInterval'.
3071
3076
  * @see https://eslint-react.xyz/docs/rules/web-api-no-leaked-interval
3072
3077
  */
3073
3078
  'react-web-api/no-leaked-interval'?: Linter.RuleEntry<[]>;
3074
3079
  /**
3075
- * Prevents leaked `ResizeObserver` in a component or custom Hook.
3080
+ * Enforces that every 'ResizeObserver' created in a component or custom hook has a corresponding 'ResizeObserver.disconnect()'.
3076
3081
  * @see https://eslint-react.xyz/docs/rules/web-api-no-leaked-resize-observer
3077
3082
  */
3078
3083
  'react-web-api/no-leaked-resize-observer'?: Linter.RuleEntry<[]>;
3079
3084
  /**
3080
- * Prevents leaked `setTimeout` in a component or custom Hook.
3085
+ * Enforces that every 'setTimeout' in a component or custom hook has a corresponding 'clearTimeout'.
3081
3086
  * @see https://eslint-react.xyz/docs/rules/web-api-no-leaked-timeout
3082
3087
  */
3083
3088
  'react-web-api/no-leaked-timeout'?: Linter.RuleEntry<[]>;
3084
3089
  /**
3085
- * Prevents dollar signs from being inserted as text nodes before expressions.
3090
+ * Prevents unnecessary dollar signs ('$') from being inserted before an expression in JSX.
3086
3091
  * @see https://eslint-react.xyz/docs/rules/jsx-dollar
3087
3092
  */
3088
3093
  'react/jsx-dollar'?: Linter.RuleEntry<[]>;
@@ -3092,37 +3097,37 @@ interface RuleOptions {
3092
3097
  */
3093
3098
  'react/jsx-key-before-spread'?: Linter.RuleEntry<[]>;
3094
3099
  /**
3095
- * Prevents comments from being inserted as text nodes.
3100
+ * Prevents comment strings (e.g., beginning with '//' or '/*') from being accidentally inserted into a JSX element's text nodes.
3096
3101
  * @see https://eslint-react.xyz/docs/rules/jsx-no-comment-textnodes
3097
3102
  */
3098
3103
  'react/jsx-no-comment-textnodes'?: Linter.RuleEntry<[]>;
3099
3104
  /**
3100
- * Disallow duplicate props in JSX elements.
3105
+ * Disallows duplicate props in JSX elements.
3101
3106
  * @see https://eslint-react.xyz/docs/rules/jsx-no-duplicate-props
3102
3107
  */
3103
3108
  'react/jsx-no-duplicate-props'?: Linter.RuleEntry<[]>;
3104
3109
  /**
3105
- * Disallows 'IIFE' in JSX elements.
3110
+ * Disallows 'IIFE' in JSX.
3106
3111
  * @see https://eslint-react.xyz/docs/rules/jsx-no-iife
3107
3112
  */
3108
3113
  'react/jsx-no-iife'?: Linter.RuleEntry<[]>;
3109
3114
  /**
3110
- * Disallow undefined variables in JSX.
3115
+ * Prevents using variables in JSX that are not defined in the scope.
3111
3116
  * @see https://eslint-react.xyz/docs/rules/jsx-no-undef
3112
3117
  */
3113
3118
  'react/jsx-no-undef'?: Linter.RuleEntry<[]>;
3114
3119
  /**
3115
- * Enforces shorthand syntax for boolean attributes.
3120
+ * Enforces the use of shorthand syntax for boolean attributes.
3116
3121
  * @see https://eslint-react.xyz/docs/rules/jsx-shorthand-boolean
3117
3122
  */
3118
3123
  'react/jsx-shorthand-boolean'?: Linter.RuleEntry<ReactJsxShorthandBoolean>;
3119
3124
  /**
3120
- * Enforces shorthand syntax for fragments.
3125
+ * Enforces the use of shorthand syntax for fragments.
3121
3126
  * @see https://eslint-react.xyz/docs/rules/jsx-shorthand-fragment
3122
3127
  */
3123
3128
  'react/jsx-shorthand-fragment'?: Linter.RuleEntry<ReactJsxShorthandFragment>;
3124
3129
  /**
3125
- * Marks React variables as used when JSX is used.
3130
+ * Marks React variables as used when JSX is present.
3126
3131
  * @see https://eslint-react.xyz/docs/rules/jsx-uses-react
3127
3132
  */
3128
3133
  'react/jsx-uses-react'?: Linter.RuleEntry<[]>;
@@ -3132,108 +3137,108 @@ interface RuleOptions {
3132
3137
  */
3133
3138
  'react/jsx-uses-vars'?: Linter.RuleEntry<[]>;
3134
3139
  /**
3135
- * Disallow accessing `this.state` inside `setState` calls.
3140
+ * Disallows accessing 'this.state' inside 'setState' calls.
3136
3141
  * @see https://eslint-react.xyz/docs/rules/no-access-state-in-setstate
3137
3142
  */
3138
3143
  'react/no-access-state-in-setstate'?: Linter.RuleEntry<[]>;
3139
3144
  /**
3140
- * Disallow an item's index in the array as its key.
3145
+ * Disallows using an item's index in the array as its key.
3141
3146
  * @see https://eslint-react.xyz/docs/rules/no-array-index-key
3142
3147
  */
3143
3148
  'react/no-array-index-key'?: Linter.RuleEntry<[]>;
3144
3149
  /**
3145
- * Disallow `Children.count`.
3150
+ * Disallows the use of 'Children.count' from the 'react' package.
3146
3151
  * @see https://eslint-react.xyz/docs/rules/no-children-count
3147
3152
  */
3148
3153
  'react/no-children-count'?: Linter.RuleEntry<[]>;
3149
3154
  /**
3150
- * Disallow 'Children.forEach'.
3155
+ * Disallows the use of 'Children.forEach' from the 'react' package.
3151
3156
  * @see https://eslint-react.xyz/docs/rules/no-children-for-each
3152
3157
  */
3153
3158
  'react/no-children-for-each'?: Linter.RuleEntry<[]>;
3154
3159
  /**
3155
- * Disallow `Children.map`.
3160
+ * Disallows the use of 'Children.map' from the 'react' package.
3156
3161
  * @see https://eslint-react.xyz/docs/rules/no-children-map
3157
3162
  */
3158
3163
  'react/no-children-map'?: Linter.RuleEntry<[]>;
3159
3164
  /**
3160
- * Disallow `Children.only`.
3165
+ * Disallows the use of 'Children.only' from the 'react' package.
3161
3166
  * @see https://eslint-react.xyz/docs/rules/no-children-only
3162
3167
  */
3163
3168
  'react/no-children-only'?: Linter.RuleEntry<[]>;
3164
3169
  /**
3165
- * Disallow passing `children` as a prop.
3170
+ * Disallows passing 'children' as a prop.
3166
3171
  * @see https://eslint-react.xyz/docs/rules/no-children-prop
3167
3172
  */
3168
3173
  'react/no-children-prop'?: Linter.RuleEntry<[]>;
3169
3174
  /**
3170
- * Disallow `Children.toArray`.
3175
+ * Disallows the use of 'Children.toArray' from the 'react' package.
3171
3176
  * @see https://eslint-react.xyz/docs/rules/no-children-to-array
3172
3177
  */
3173
3178
  'react/no-children-to-array'?: Linter.RuleEntry<[]>;
3174
3179
  /**
3175
- * Disallow class components except for error boundaries.
3180
+ * Disallows class components except for error boundaries.
3176
3181
  * @see https://eslint-react.xyz/docs/rules/no-class-component
3177
3182
  */
3178
3183
  'react/no-class-component'?: Linter.RuleEntry<[]>;
3179
3184
  /**
3180
- * Disallow `cloneElement`.
3185
+ * Disallows 'cloneElement'.
3181
3186
  * @see https://eslint-react.xyz/docs/rules/no-clone-element
3182
3187
  */
3183
3188
  'react/no-clone-element'?: Linter.RuleEntry<[]>;
3184
3189
  /**
3185
- * Replace usages of `componentWillMount` with `UNSAFE_componentWillMount`.
3190
+ * Replaces usage of 'componentWillMount' with 'UNSAFE_componentWillMount'.
3186
3191
  * @see https://eslint-react.xyz/docs/rules/no-component-will-mount
3187
3192
  */
3188
3193
  'react/no-component-will-mount'?: Linter.RuleEntry<[]>;
3189
3194
  /**
3190
- * Replace usages of `componentWillReceiveProps` with `UNSAFE_componentWillReceiveProps`.
3195
+ * Replaces usage of 'componentWillReceiveProps' with 'UNSAFE_componentWillReceiveProps'.
3191
3196
  * @see https://eslint-react.xyz/docs/rules/no-component-will-receive-props
3192
3197
  */
3193
3198
  'react/no-component-will-receive-props'?: Linter.RuleEntry<[]>;
3194
3199
  /**
3195
- * Replace usages of `componentWillUpdate` with `UNSAFE_componentWillUpdate`.
3200
+ * Replaces usage of 'componentWillUpdate' with 'UNSAFE_componentWillUpdate'.
3196
3201
  * @see https://eslint-react.xyz/docs/rules/no-component-will-update
3197
3202
  */
3198
3203
  'react/no-component-will-update'?: Linter.RuleEntry<[]>;
3199
3204
  /**
3200
- * Replace usages of `<Context.Provider>` with `<Context>`.
3205
+ * Replaces usage of '<Context.Provider>' with '<Context>'.
3201
3206
  * @see https://eslint-react.xyz/docs/rules/no-context-provider
3202
3207
  */
3203
3208
  'react/no-context-provider'?: Linter.RuleEntry<[]>;
3204
3209
  /**
3205
- * Disallow `createRef` in function components.
3210
+ * Disallows 'createRef' in function components.
3206
3211
  * @see https://eslint-react.xyz/docs/rules/no-create-ref
3207
3212
  */
3208
3213
  'react/no-create-ref'?: Linter.RuleEntry<[]>;
3209
3214
  /**
3210
- * Disallow `defaultProps` property in favor of ES6 default parameters.
3215
+ * Disallows the 'defaultProps' property in favor of ES6 default parameters.
3211
3216
  * @see https://eslint-react.xyz/docs/rules/no-default-props
3212
3217
  */
3213
3218
  'react/no-default-props'?: Linter.RuleEntry<[]>;
3214
3219
  /**
3215
- * Disallow direct mutation of `this.state`.
3220
+ * Disallows direct mutation of 'this.state'.
3216
3221
  * @see https://eslint-react.xyz/docs/rules/no-direct-mutation-state
3217
3222
  */
3218
3223
  'react/no-direct-mutation-state'?: Linter.RuleEntry<[]>;
3219
3224
  /**
3220
- * Disallow duplicate `key` on elements in the same array or a list of `children`.
3225
+ * Disallows duplicate 'key' on elements in the same array or a list of 'children'.
3221
3226
  * @see https://eslint-react.xyz/docs/rules/no-duplicate-key
3222
3227
  */
3223
3228
  'react/no-duplicate-key'?: Linter.RuleEntry<[]>;
3224
3229
  /**
3225
- * Disallow certain props on components.
3230
+ * Disallows certain props on components.
3226
3231
  * @see https://eslint-react.xyz/docs/rules/no-forbidden-props
3227
3232
  * @deprecated
3228
3233
  */
3229
3234
  'react/no-forbidden-props'?: Linter.RuleEntry<ReactNoForbiddenProps>;
3230
3235
  /**
3231
- * Replaces usages of `forwardRef` with passing `ref` as a prop.
3236
+ * Replaces usage of 'forwardRef' with passing 'ref' as a prop.
3232
3237
  * @see https://eslint-react.xyz/docs/rules/no-forward-ref
3233
3238
  */
3234
3239
  'react/no-forward-ref'?: Linter.RuleEntry<[]>;
3235
3240
  /**
3236
- * Prevents `key` from not being explicitly specified (e.g. spreading `key` from objects).
3241
+ * Prevents 'key' from not being explicitly specified (e.g., spreading 'key' from objects).
3237
3242
  * @see https://eslint-react.xyz/docs/rules/no-implicit-key
3238
3243
  */
3239
3244
  'react/no-implicit-key'?: Linter.RuleEntry<[]>;
@@ -3243,57 +3248,57 @@ interface RuleOptions {
3243
3248
  */
3244
3249
  'react/no-leaked-conditional-rendering'?: Linter.RuleEntry<[]>;
3245
3250
  /**
3246
- * Enforces that all components have a `displayName` which can be used in devtools.
3251
+ * Enforces that all components have a 'displayName' that can be used in devtools.
3247
3252
  * @see https://eslint-react.xyz/docs/rules/no-missing-component-display-name
3248
3253
  */
3249
3254
  'react/no-missing-component-display-name'?: Linter.RuleEntry<[]>;
3250
3255
  /**
3251
- * Enforces that all contexts have a `displayName` which can be used in devtools.
3256
+ * Enforces that all contexts have a 'displayName' that can be used in devtools.
3252
3257
  * @see https://eslint-react.xyz/docs/rules/no-missing-context-display-name
3253
3258
  */
3254
3259
  'react/no-missing-context-display-name'?: Linter.RuleEntry<[]>;
3255
3260
  /**
3256
- * Disallow missing `key` on items in list rendering.
3261
+ * Disallows missing 'key' on items in list rendering.
3257
3262
  * @see https://eslint-react.xyz/docs/rules/no-missing-key
3258
3263
  */
3259
3264
  'react/no-missing-key'?: Linter.RuleEntry<[]>;
3260
3265
  /**
3261
- * Prevents incorrect usage of `captureOwnerStack`.
3266
+ * Prevents incorrect usage of 'captureOwnerStack'.
3262
3267
  * @see https://eslint-react.xyz/docs/rules/no-misused-capture-owner-stack
3263
3268
  */
3264
3269
  'react/no-misused-capture-owner-stack'?: Linter.RuleEntry<[]>;
3265
3270
  /**
3266
- * Disallow nesting component definitions inside other components.
3271
+ * Disallows nesting component definitions inside other components.
3267
3272
  * @see https://eslint-react.xyz/docs/rules/no-nested-component-definitions
3268
3273
  */
3269
3274
  'react/no-nested-component-definitions'?: Linter.RuleEntry<[]>;
3270
3275
  /**
3271
- * Disallow nesting lazy component declarations inside other components.
3276
+ * Disallows nesting lazy component declarations inside other components.
3272
3277
  * @see https://eslint-react.xyz/docs/rules/no-nested-lazy-component-declarations
3273
3278
  */
3274
3279
  'react/no-nested-lazy-component-declarations'?: Linter.RuleEntry<[]>;
3275
3280
  /**
3276
- * Disallow `propTypes` in favor of TypeScript or another type-checking solution.
3281
+ * Disallows 'propTypes' in favor of TypeScript or another type-checking solution.
3277
3282
  * @see https://eslint-react.xyz/docs/rules/no-prop-types
3278
3283
  */
3279
3284
  'react/no-prop-types'?: Linter.RuleEntry<[]>;
3280
3285
  /**
3281
- * Disallow `shouldComponentUpdate` when extending `React.PureComponent`.
3286
+ * Disallows 'shouldComponentUpdate' when extending 'React.PureComponent'.
3282
3287
  * @see https://eslint-react.xyz/docs/rules/no-redundant-should-component-update
3283
3288
  */
3284
3289
  'react/no-redundant-should-component-update'?: Linter.RuleEntry<[]>;
3285
3290
  /**
3286
- * Disallow calling `this.setState` in `componentDidMount` outside of functions, such as callbacks.
3291
+ * Disallows calling 'this.setState' in 'componentDidMount' outside functions such as callbacks.
3287
3292
  * @see https://eslint-react.xyz/docs/rules/no-set-state-in-component-did-mount
3288
3293
  */
3289
3294
  'react/no-set-state-in-component-did-mount'?: Linter.RuleEntry<[]>;
3290
3295
  /**
3291
- * Disallow calling `this.setState` in `componentDidUpdate` outside of functions, such as callbacks.
3296
+ * Disallows calling 'this.setState' in 'componentDidUpdate' outside functions such as callbacks.
3292
3297
  * @see https://eslint-react.xyz/docs/rules/no-set-state-in-component-did-update
3293
3298
  */
3294
3299
  'react/no-set-state-in-component-did-update'?: Linter.RuleEntry<[]>;
3295
3300
  /**
3296
- * Disallow calling `this.setState` in `componentWillUpdate` outside of functions, such as callbacks.
3301
+ * Disallows calling 'this.setState' in 'componentWillUpdate' outside functions such as callbacks.
3297
3302
  * @see https://eslint-react.xyz/docs/rules/no-set-state-in-component-will-update
3298
3303
  */
3299
3304
  'react/no-set-state-in-component-will-update'?: Linter.RuleEntry<[]>;
@@ -3303,42 +3308,42 @@ interface RuleOptions {
3303
3308
  */
3304
3309
  'react/no-string-refs'?: Linter.RuleEntry<[]>;
3305
3310
  /**
3306
- * Prevents the use of unnecessary `key` props on JSX elements when rendering lists.
3311
+ * Prevents 'key' from being placed on non-top-level elements in list rendering.
3307
3312
  * @see https://eslint-react.xyz/docs/rules/no-unnecessary-key
3308
3313
  */
3309
3314
  'react/no-unnecessary-key'?: Linter.RuleEntry<[]>;
3310
3315
  /**
3311
- * Disallow unnecessary usage of `useCallback`.
3316
+ * Disallows unnecessary usage of 'useCallback'.
3312
3317
  * @see https://eslint-react.xyz/docs/rules/no-unnecessary-use-callback
3313
3318
  */
3314
3319
  'react/no-unnecessary-use-callback'?: Linter.RuleEntry<[]>;
3315
3320
  /**
3316
- * Disallow unnecessary usage of `useMemo`.
3321
+ * Disallows unnecessary usage of 'useMemo'.
3317
3322
  * @see https://eslint-react.xyz/docs/rules/no-unnecessary-use-memo
3318
3323
  */
3319
3324
  'react/no-unnecessary-use-memo'?: Linter.RuleEntry<[]>;
3320
3325
  /**
3321
- * Enforces that a function with the `use` prefix should use at least one Hook inside of it.
3326
+ * Enforces that a function with the 'use' prefix uses at least one Hook inside it.
3322
3327
  * @see https://eslint-react.xyz/docs/rules/no-unnecessary-use-prefix
3323
3328
  */
3324
3329
  'react/no-unnecessary-use-prefix'?: Linter.RuleEntry<[]>;
3325
3330
  /**
3326
- * Warns the usage of `UNSAFE_componentWillMount` in class components.
3331
+ * Warns about the use of 'UNSAFE_componentWillMount' in class components.
3327
3332
  * @see https://eslint-react.xyz/docs/rules/no-unsafe-component-will-mount
3328
3333
  */
3329
3334
  'react/no-unsafe-component-will-mount'?: Linter.RuleEntry<[]>;
3330
3335
  /**
3331
- * Warns the usage of `UNSAFE_componentWillReceiveProps` in class components.
3336
+ * Warns about the use of 'UNSAFE_componentWillReceiveProps' in class components.
3332
3337
  * @see https://eslint-react.xyz/docs/rules/no-unsafe-component-will-receive-props
3333
3338
  */
3334
3339
  'react/no-unsafe-component-will-receive-props'?: Linter.RuleEntry<[]>;
3335
3340
  /**
3336
- * Warns the usage of `UNSAFE_componentWillUpdate` in class components.
3341
+ * Warns about the use of 'UNSAFE_componentWillUpdate' in class components.
3337
3342
  * @see https://eslint-react.xyz/docs/rules/no-unsafe-component-will-update
3338
3343
  */
3339
3344
  'react/no-unsafe-component-will-update'?: Linter.RuleEntry<[]>;
3340
3345
  /**
3341
- * Prevents non-stable values (i.e. object literals) from being used as a value for `Context.Provider`.
3346
+ * Prevents non-stable values (i.e., object literals) from being used as a value for 'Context.Provider'.
3342
3347
  * @see https://eslint-react.xyz/docs/rules/no-unstable-context-value
3343
3348
  */
3344
3349
  'react/no-unstable-context-value'?: Linter.RuleEntry<[]>;
@@ -3348,32 +3353,32 @@ interface RuleOptions {
3348
3353
  */
3349
3354
  'react/no-unstable-default-props'?: Linter.RuleEntry<ReactNoUnstableDefaultProps>;
3350
3355
  /**
3351
- * Warns unused class component methods and properties.
3356
+ * Warns about unused class component methods and properties.
3352
3357
  * @see https://eslint-react.xyz/docs/rules/no-unused-class-component-members
3353
3358
  */
3354
3359
  'react/no-unused-class-component-members'?: Linter.RuleEntry<[]>;
3355
3360
  /**
3356
- * Warns component props that are defined but never used.
3361
+ * Warns about component props that are defined but never used.
3357
3362
  * @see https://eslint-react.xyz/docs/rules/no-unused-props
3358
3363
  */
3359
3364
  'react/no-unused-props'?: Linter.RuleEntry<[]>;
3360
3365
  /**
3361
- * Warns unused class component state.
3366
+ * Warns about unused class component state.
3362
3367
  * @see https://eslint-react.xyz/docs/rules/no-unused-state
3363
3368
  */
3364
3369
  'react/no-unused-state'?: Linter.RuleEntry<[]>;
3365
3370
  /**
3366
- * Replaces usages of `useContext` with `use`.
3371
+ * Replaces usage of 'useContext' with 'use'.
3367
3372
  * @see https://eslint-react.xyz/docs/rules/no-use-context
3368
3373
  */
3369
3374
  'react/no-use-context'?: Linter.RuleEntry<[]>;
3370
3375
  /**
3371
- * Disallow useless `forwardRef` calls on components that don't use `ref`s.
3376
+ * Disallows useless 'forwardRef' calls on components that don't use 'ref's.
3372
3377
  * @see https://eslint-react.xyz/docs/rules/no-useless-forward-ref
3373
3378
  */
3374
3379
  'react/no-useless-forward-ref'?: Linter.RuleEntry<[]>;
3375
3380
  /**
3376
- * Disallow useless fragment elements.
3381
+ * Disallows useless fragment elements.
3377
3382
  * @see https://eslint-react.xyz/docs/rules/no-useless-fragment
3378
3383
  */
3379
3384
  'react/no-useless-fragment'?: Linter.RuleEntry<ReactNoUselessFragment>;
@@ -3383,7 +3388,7 @@ interface RuleOptions {
3383
3388
  */
3384
3389
  'react/prefer-destructuring-assignment'?: Linter.RuleEntry<[]>;
3385
3390
  /**
3386
- * Enforces React is imported via a namespace import.
3391
+ * Enforces importing React via a namespace import.
3387
3392
  * @see https://eslint-react.xyz/docs/rules/prefer-namespace-import
3388
3393
  */
3389
3394
  'react/prefer-namespace-import'?: Linter.RuleEntry<[]>;
@@ -3393,7 +3398,7 @@ interface RuleOptions {
3393
3398
  */
3394
3399
  'react/prefer-read-only-props'?: Linter.RuleEntry<[]>;
3395
3400
  /**
3396
- * Enforces function calls made inside `useState` to be wrapped in an `initializer function`.
3401
+ * Enforces wrapping function calls made inside 'useState' in an 'initializer function'.
3397
3402
  * @see https://eslint-react.xyz/docs/rules/prefer-use-state-lazy-initialization
3398
3403
  */
3399
3404
  'react/prefer-use-state-lazy-initialization'?: Linter.RuleEntry<[]>;
@@ -6540,6 +6545,11 @@ interface RuleOptions {
6540
6545
  * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-mock-promise-shorthand.md
6541
6546
  */
6542
6547
  'test/prefer-mock-promise-shorthand'?: Linter.RuleEntry<[]>;
6548
+ /**
6549
+ * Prefer mock return shorthands
6550
+ * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-mock-return-shorthand.md
6551
+ */
6552
+ 'test/prefer-mock-return-shorthand'?: Linter.RuleEntry<[]>;
6543
6553
  /**
6544
6554
  * enforce including a hint with external snapshots
6545
6555
  * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-snapshot-hint.md
@@ -14255,6 +14265,11 @@ type ReactNamingConventionFilenameExtension = [] | [(("always" | "as-needed") |
14255
14265
  extensions?: string[];
14256
14266
  ignoreFilesWithoutCode?: boolean;
14257
14267
  })];
14268
+ // ----- react-naming-convention/use-state -----
14269
+ type ReactNamingConventionUseState = [] | [{
14270
+ enforceAssignment?: boolean;
14271
+ enforceSetterName?: boolean;
14272
+ }];
14258
14273
  // ----- react-refresh/only-export-components -----
14259
14274
  type ReactRefreshOnlyExportComponents = [] | [{
14260
14275
  allowExportNames?: string[];
package/dist/index.mjs CHANGED
@@ -15,19 +15,19 @@ import globals from "globals";
15
15
  import { mergeProcessors, processorPassThrough } from "eslint-merge-processors";
16
16
  import { configs } from "eslint-plugin-regexp";
17
17
 
18
- //#region node_modules/.pnpm/@vinicunca+perkakas@1.9.0/node_modules/@vinicunca/perkakas/dist/is-boolean-CZKz4ij3.js
18
+ //#region node_modules/.pnpm/@vinicunca+perkakas@1.12.0/node_modules/@vinicunca/perkakas/dist/is-boolean.js
19
19
  function e$2(e$3) {
20
20
  return typeof e$3 == `boolean`;
21
21
  }
22
22
 
23
23
  //#endregion
24
- //#region node_modules/.pnpm/@vinicunca+perkakas@1.9.0/node_modules/@vinicunca/perkakas/dist/is-function-BwWA5uZn.js
24
+ //#region node_modules/.pnpm/@vinicunca+perkakas@1.12.0/node_modules/@vinicunca/perkakas/dist/is-function.js
25
25
  function e$1(e$3) {
26
26
  return typeof e$3 == `function`;
27
27
  }
28
28
 
29
29
  //#endregion
30
- //#region node_modules/.pnpm/@vinicunca+perkakas@1.9.0/node_modules/@vinicunca/perkakas/dist/is-number-D5aNK4nm.js
30
+ //#region node_modules/.pnpm/@vinicunca+perkakas@1.12.0/node_modules/@vinicunca/perkakas/dist/is-number.js
31
31
  function e(e$3) {
32
32
  return typeof e$3 == `number` && !Number.isNaN(e$3);
33
33
  }
@@ -2033,7 +2033,7 @@ async function typescript(options = {}) {
2033
2033
  }] : [],
2034
2034
  ...erasableOnly ? [{
2035
2035
  name: "antfu/typescript/erasable-syntax-only",
2036
- plugins: { "erasable-syntax-only": await interopDefault(import("./lib-pv9DSAcX.mjs")) },
2036
+ plugins: { "erasable-syntax-only": await interopDefault(import("./lib-DEAC6Tpv.mjs")) },
2037
2037
  rules: {
2038
2038
  "erasable-syntax-only/enums": "error",
2039
2039
  "erasable-syntax-only/import-aliases": "error",
@@ -10932,12 +10932,12 @@ var require_dist = /* @__PURE__ */ __commonJSMin(((exports) => {
10932
10932
  }));
10933
10933
 
10934
10934
  //#endregion
10935
- //#region node_modules/.pnpm/eslint-plugin-erasable-syntax-only@0.4.0_@typescript-eslint+parser@8.50.1_eslint@9.39.2_6dfb35d252511ae2431e4d4447b4e524/node_modules/eslint-plugin-erasable-syntax-only/lib/utils.js
10935
+ //#region node_modules/.pnpm/eslint-plugin-erasable-syntax-only@0.4.0_@typescript-eslint+parser@8.51.0_eslint@9.39.2_cf29194064209686a107fd196092e0a1/node_modules/eslint-plugin-erasable-syntax-only/lib/utils.js
10936
10936
  var import_dist = require_dist();
10937
10937
  const createRule = import_dist.ESLintUtils.RuleCreator((name$1) => `https://github.com/JoshuaKGoldberg/eslint-plugin-erasable-syntax-only/blob/main/docs/rules/${name$1}.md`);
10938
10938
 
10939
10939
  //#endregion
10940
- //#region node_modules/.pnpm/eslint-plugin-erasable-syntax-only@0.4.0_@typescript-eslint+parser@8.50.1_eslint@9.39.2_6dfb35d252511ae2431e4d4447b4e524/node_modules/eslint-plugin-erasable-syntax-only/lib/rules/enums.js
10940
+ //#region node_modules/.pnpm/eslint-plugin-erasable-syntax-only@0.4.0_@typescript-eslint+parser@8.51.0_eslint@9.39.2_cf29194064209686a107fd196092e0a1/node_modules/eslint-plugin-erasable-syntax-only/lib/rules/enums.js
10941
10941
  const rule$3 = createRule({
10942
10942
  create(context) {
10943
10943
  return { TSEnumDeclaration(node) {
@@ -10998,7 +10998,7 @@ ${isExported ? "export " : ""}type ${name$1} = typeof ${name$1}[keyof typeof ${n
10998
10998
  });
10999
10999
 
11000
11000
  //#endregion
11001
- //#region node_modules/.pnpm/eslint-plugin-erasable-syntax-only@0.4.0_@typescript-eslint+parser@8.50.1_eslint@9.39.2_6dfb35d252511ae2431e4d4447b4e524/node_modules/eslint-plugin-erasable-syntax-only/lib/rules/import-aliases.js
11001
+ //#region node_modules/.pnpm/eslint-plugin-erasable-syntax-only@0.4.0_@typescript-eslint+parser@8.51.0_eslint@9.39.2_cf29194064209686a107fd196092e0a1/node_modules/eslint-plugin-erasable-syntax-only/lib/rules/import-aliases.js
11002
11002
  const rule$2 = createRule({
11003
11003
  create(context) {
11004
11004
  return { TSImportEqualsDeclaration(node) {
@@ -11062,7 +11062,7 @@ var CachedFactory = class {
11062
11062
  };
11063
11063
 
11064
11064
  //#endregion
11065
- //#region node_modules/.pnpm/eslint-plugin-erasable-syntax-only@0.4.0_@typescript-eslint+parser@8.50.1_eslint@9.39.2_6dfb35d252511ae2431e4d4447b4e524/node_modules/eslint-plugin-erasable-syntax-only/lib/rules/namespaces.js
11065
+ //#region node_modules/.pnpm/eslint-plugin-erasable-syntax-only@0.4.0_@typescript-eslint+parser@8.51.0_eslint@9.39.2_cf29194064209686a107fd196092e0a1/node_modules/eslint-plugin-erasable-syntax-only/lib/rules/namespaces.js
11066
11066
  function skipExportParent(node) {
11067
11067
  return node.parent.type == import_dist.AST_NODE_TYPES.ExportNamedDeclaration ? node.parent : node;
11068
11068
  }
@@ -11099,7 +11099,7 @@ const rule$1 = createRule({
11099
11099
  });
11100
11100
 
11101
11101
  //#endregion
11102
- //#region node_modules/.pnpm/eslint-plugin-erasable-syntax-only@0.4.0_@typescript-eslint+parser@8.50.1_eslint@9.39.2_6dfb35d252511ae2431e4d4447b4e524/node_modules/eslint-plugin-erasable-syntax-only/lib/rules/parameter-properties.js
11102
+ //#region node_modules/.pnpm/eslint-plugin-erasable-syntax-only@0.4.0_@typescript-eslint+parser@8.51.0_eslint@9.39.2_cf29194064209686a107fd196092e0a1/node_modules/eslint-plugin-erasable-syntax-only/lib/rules/parameter-properties.js
11103
11103
  const rule = createRule({
11104
11104
  create(context) {
11105
11105
  return { TSParameterProperty(node) {
@@ -11120,7 +11120,7 @@ const rule = createRule({
11120
11120
  });
11121
11121
 
11122
11122
  //#endregion
11123
- //#region node_modules/.pnpm/eslint-plugin-erasable-syntax-only@0.4.0_@typescript-eslint+parser@8.50.1_eslint@9.39.2_6dfb35d252511ae2431e4d4447b4e524/node_modules/eslint-plugin-erasable-syntax-only/lib/rules/index.js
11123
+ //#region node_modules/.pnpm/eslint-plugin-erasable-syntax-only@0.4.0_@typescript-eslint+parser@8.51.0_eslint@9.39.2_cf29194064209686a107fd196092e0a1/node_modules/eslint-plugin-erasable-syntax-only/lib/rules/index.js
11124
11124
  const rules = {
11125
11125
  enums: rule$3,
11126
11126
  "import-aliases": rule$2,
@@ -11129,7 +11129,7 @@ const rules = {
11129
11129
  };
11130
11130
 
11131
11131
  //#endregion
11132
- //#region node_modules/.pnpm/eslint-plugin-erasable-syntax-only@0.4.0_@typescript-eslint+parser@8.50.1_eslint@9.39.2_6dfb35d252511ae2431e4d4447b4e524/node_modules/eslint-plugin-erasable-syntax-only/lib/index.js
11132
+ //#region node_modules/.pnpm/eslint-plugin-erasable-syntax-only@0.4.0_@typescript-eslint+parser@8.51.0_eslint@9.39.2_cf29194064209686a107fd196092e0a1/node_modules/eslint-plugin-erasable-syntax-only/lib/index.js
11133
11133
  const { name, version } = Module.createRequire(import.meta.url)("../package.json");
11134
11134
  const plugin = {
11135
11135
  configs: { get recommended() {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@vinicunca/eslint-config",
3
3
  "type": "module",
4
- "version": "4.1.0",
4
+ "version": "4.2.0",
5
5
  "description": "Vinicunca ESLint config",
6
6
  "author": {
7
7
  "name": "praburangki",
@@ -125,10 +125,10 @@
125
125
  "@eslint-community/eslint-plugin-eslint-comments": "^4.5.0",
126
126
  "@eslint/markdown": "^7.5.1",
127
127
  "@stylistic/eslint-plugin": "^5.6.1",
128
- "@typescript-eslint/eslint-plugin": "^8.50.1",
129
- "@typescript-eslint/parser": "^8.50.1",
130
- "@unocss/eslint-plugin": "^66.5.10",
131
- "@vitest/eslint-plugin": "^1.6.3",
128
+ "@typescript-eslint/eslint-plugin": "^8.51.0",
129
+ "@typescript-eslint/parser": "^8.51.0",
130
+ "@unocss/eslint-plugin": "^66.5.12",
131
+ "@vitest/eslint-plugin": "^1.6.4",
132
132
  "eslint-config-flat-gitignore": "^2.1.0",
133
133
  "eslint-flat-config-utils": "^2.1.4",
134
134
  "eslint-merge-processors": "^2.0.0",
@@ -159,14 +159,14 @@
159
159
  },
160
160
  "devDependencies": {
161
161
  "@antfu/ni": "^28.0.0",
162
- "@eslint-react/eslint-plugin": "^2.3.13",
162
+ "@eslint-react/eslint-plugin": "^2.5.0",
163
163
  "@eslint/config-inspector": "^1.4.2",
164
164
  "@next/eslint-plugin-next": "^16.1.1",
165
165
  "@prettier/plugin-xml": "^3.4.2",
166
166
  "@types/eslint-plugin-jsx-a11y": "^6.10.1",
167
167
  "@types/node": "^25.0.3",
168
168
  "@types/yargs": "^17.0.35",
169
- "@vinicunca/perkakas": "^1.9.0",
169
+ "@vinicunca/perkakas": "^1.12.0",
170
170
  "astro-eslint-parser": "^1.2.2",
171
171
  "bumpp": "^10.3.2",
172
172
  "bundle-require": "^5.1.0",
@@ -188,11 +188,11 @@
188
188
  "prettier-plugin-slidev": "^1.0.5",
189
189
  "react": "^19.2.3",
190
190
  "simple-git-hooks": "^2.13.1",
191
- "svelte": "^5.46.0",
191
+ "svelte": "^5.46.1",
192
192
  "svelte-eslint-parser": "^1.4.1",
193
193
  "taze": "^19.9.2",
194
194
  "tinyglobby": "^0.2.15",
195
- "tsdown": "^0.18.2",
195
+ "tsdown": "^0.18.4",
196
196
  "tsx": "^4.21.0",
197
197
  "typescript": "^5.9.3",
198
198
  "vitest": "^4.0.16",