@aiou/eslint-config 3.1.0 → 3.1.1

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.
Files changed (2) hide show
  1. package/dts/typegen.d.ts +135 -335
  2. package/package.json +4 -4
package/dts/typegen.d.ts CHANGED
@@ -2254,11 +2254,6 @@ export interface Rules {
2254
2254
  * @see https://github.com/eslint-community/eslint-plugin-promise/blob/main/docs/rules/valid-params.md
2255
2255
  */
2256
2256
  'promise/valid-params'?: Linter.RuleEntry<PromiseValidParams>;
2257
- /**
2258
- * Disallows higher order functions that define components or hooks inside them.
2259
- * @see https://eslint-react.xyz/docs/rules/component-hook-factories
2260
- */
2261
- 'react-dom/component-hook-factories'?: Linter.RuleEntry<[]>;
2262
2257
  /**
2263
2258
  * Disallows DOM elements from using 'dangerouslySetInnerHTML'.
2264
2259
  * @see https://eslint-react.xyz/docs/rules/dom-no-dangerously-set-innerhtml
@@ -2339,11 +2334,6 @@ export interface Rules {
2339
2334
  * @see https://eslint-react.xyz/docs/rules/dom-no-void-elements-with-children
2340
2335
  */
2341
2336
  'react-dom/dom-no-void-elements-with-children'?: Linter.RuleEntry<[]>;
2342
- /**
2343
- * Enforces importing React DOM via a namespace import.
2344
- * @see https://eslint-react.xyz/docs/rules/dom-prefer-namespace-import
2345
- */
2346
- 'react-dom/dom-prefer-namespace-import'?: Linter.RuleEntry<[]>;
2347
2337
  /**
2348
2338
  * Validates usage of Error Boundaries instead of try/catch for errors in child components.
2349
2339
  * @see https://eslint-react.xyz/docs/rules/error-boundaries
@@ -2354,6 +2344,11 @@ export interface Rules {
2354
2344
  * @see https://github.com/facebook/react/issues/14920
2355
2345
  */
2356
2346
  'react-dom/exhaustive-deps'?: Linter.RuleEntry<ReactDomExhaustiveDeps>;
2347
+ /**
2348
+ * Validates against assignment/mutation of globals during render, part of ensuring that side effects must run outside of render.
2349
+ * @see https://eslint-react.xyz/docs/rules/globals
2350
+ */
2351
+ 'react-dom/globals'?: Linter.RuleEntry<[]>;
2357
2352
  /**
2358
2353
  * Validates against mutating props, state, and other values that are immutable.
2359
2354
  * @see https://eslint-react.xyz/docs/rules/immutability
@@ -2549,11 +2544,6 @@ export interface Rules {
2549
2544
  * @see https://eslint-react.xyz/docs/rules/no-nested-lazy-component-declarations
2550
2545
  */
2551
2546
  'react-dom/no-nested-lazy-component-declarations'?: Linter.RuleEntry<[]>;
2552
- /**
2553
- * Disallows 'shouldComponentUpdate' when extending 'React.PureComponent'.
2554
- * @see https://eslint-react.xyz/docs/rules/no-redundant-should-component-update
2555
- */
2556
- 'react-dom/no-redundant-should-component-update'?: Linter.RuleEntry<[]>;
2557
2547
  /**
2558
2548
  * Disallows calling 'this.setState' in 'componentDidMount' outside functions such as callbacks.
2559
2549
  * @see https://eslint-react.xyz/docs/rules/no-set-state-in-component-did-mount
@@ -2569,16 +2559,6 @@ export interface Rules {
2569
2559
  * @see https://eslint-react.xyz/docs/rules/no-set-state-in-component-will-update
2570
2560
  */
2571
2561
  'react-dom/no-set-state-in-component-will-update'?: Linter.RuleEntry<[]>;
2572
- /**
2573
- * Disallows unnecessary usage of 'useCallback'.
2574
- * @see https://eslint-react.xyz/docs/rules/no-unnecessary-use-callback
2575
- */
2576
- 'react-dom/no-unnecessary-use-callback'?: Linter.RuleEntry<[]>;
2577
- /**
2578
- * Disallows unnecessary usage of 'useMemo'.
2579
- * @see https://eslint-react.xyz/docs/rules/no-unnecessary-use-memo
2580
- */
2581
- 'react-dom/no-unnecessary-use-memo'?: Linter.RuleEntry<[]>;
2582
2562
  /**
2583
2563
  * Enforces that a function with the 'use' prefix uses at least one Hook inside it.
2584
2564
  * @see https://eslint-react.xyz/docs/rules/no-unnecessary-use-prefix
@@ -2620,7 +2600,7 @@ export interface Rules {
2620
2600
  */
2621
2601
  'react-dom/no-unused-props'?: Linter.RuleEntry<[]>;
2622
2602
  /**
2623
- * Warns about unused class component state.
2603
+ * Warns about state variables that are defined but never used, or only used in effects.
2624
2604
  * @see https://eslint-react.xyz/docs/rules/no-unused-state
2625
2605
  */
2626
2606
  'react-dom/no-unused-state'?: Linter.RuleEntry<[]>;
@@ -2629,16 +2609,6 @@ export interface Rules {
2629
2609
  * @see https://eslint-react.xyz/docs/rules/no-use-context
2630
2610
  */
2631
2611
  'react-dom/no-use-context'?: Linter.RuleEntry<[]>;
2632
- /**
2633
- * Enforces destructuring assignment for component props and context.
2634
- * @see https://eslint-react.xyz/docs/rules/prefer-destructuring-assignment
2635
- */
2636
- 'react-dom/prefer-destructuring-assignment'?: Linter.RuleEntry<[]>;
2637
- /**
2638
- * Enforces importing React via a namespace import.
2639
- * @see https://eslint-react.xyz/docs/rules/prefer-namespace-import
2640
- */
2641
- 'react-dom/prefer-namespace-import'?: Linter.RuleEntry<[]>;
2642
2612
  /**
2643
2613
  * Validates that components and hooks are pure by checking that they do not call known-impure functions during render.
2644
2614
  * @see https://eslint-react.xyz/docs/rules/purity
@@ -2669,6 +2639,11 @@ export interface Rules {
2669
2639
  * @see https://eslint-react.xyz/docs/rules/set-state-in-render
2670
2640
  */
2671
2641
  'react-dom/set-state-in-render'?: Linter.RuleEntry<[]>;
2642
+ /**
2643
+ * Validates that components are static, not recreated every render.
2644
+ * @see https://eslint-react.xyz/docs/rules/static-components
2645
+ */
2646
+ 'react-dom/static-components'?: Linter.RuleEntry<[]>;
2672
2647
  /**
2673
2648
  * Validates against syntax that React Compiler does not support.
2674
2649
  * @see https://eslint-react.xyz/docs/rules/unsupported-syntax
@@ -2689,6 +2664,11 @@ export interface Rules {
2689
2664
  * @see https://eslint-react.xyz/docs/rules/web-api-no-leaked-event-listener
2690
2665
  */
2691
2666
  'react-dom/web-api-no-leaked-event-listener'?: Linter.RuleEntry<[]>;
2667
+ /**
2668
+ * Enforces that every 'fetch' in a component or custom hook has a corresponding 'AbortController' abort in the cleanup function.
2669
+ * @see https://eslint-react.xyz/docs/rules/web-api-no-leaked-fetch
2670
+ */
2671
+ 'react-dom/web-api-no-leaked-fetch'?: Linter.RuleEntry<[]>;
2692
2672
  /**
2693
2673
  * Enforces that every 'setInterval' in a component or custom hook has a corresponding 'clearInterval'.
2694
2674
  * @see https://eslint-react.xyz/docs/rules/web-api-no-leaked-interval
@@ -2704,11 +2684,6 @@ export interface Rules {
2704
2684
  * @see https://eslint-react.xyz/docs/rules/web-api-no-leaked-timeout
2705
2685
  */
2706
2686
  'react-dom/web-api-no-leaked-timeout'?: Linter.RuleEntry<[]>;
2707
- /**
2708
- * Disallows higher order functions that define components or hooks inside them.
2709
- * @see https://eslint-react.xyz/docs/rules/component-hook-factories
2710
- */
2711
- 'react-dom/x-component-hook-factories'?: Linter.RuleEntry<[]>;
2712
2687
  /**
2713
2688
  * Validates usage of Error Boundaries instead of try/catch for errors in child components.
2714
2689
  * @see https://eslint-react.xyz/docs/rules/error-boundaries
@@ -2719,6 +2694,11 @@ export interface Rules {
2719
2694
  * @see https://github.com/facebook/react/issues/14920
2720
2695
  */
2721
2696
  'react-dom/x-exhaustive-deps'?: Linter.RuleEntry<ReactDomXExhaustiveDeps>;
2697
+ /**
2698
+ * Validates against assignment/mutation of globals during render, part of ensuring that side effects must run outside of render.
2699
+ * @see https://eslint-react.xyz/docs/rules/globals
2700
+ */
2701
+ 'react-dom/x-globals'?: Linter.RuleEntry<[]>;
2722
2702
  /**
2723
2703
  * Validates against mutating props, state, and other values that are immutable.
2724
2704
  * @see https://eslint-react.xyz/docs/rules/immutability
@@ -2859,11 +2839,6 @@ export interface Rules {
2859
2839
  * @see https://eslint-react.xyz/docs/rules/no-nested-lazy-component-declarations
2860
2840
  */
2861
2841
  'react-dom/x-no-nested-lazy-component-declarations'?: Linter.RuleEntry<[]>;
2862
- /**
2863
- * Disallows 'shouldComponentUpdate' when extending 'React.PureComponent'.
2864
- * @see https://eslint-react.xyz/docs/rules/no-redundant-should-component-update
2865
- */
2866
- 'react-dom/x-no-redundant-should-component-update'?: Linter.RuleEntry<[]>;
2867
2842
  /**
2868
2843
  * Disallows calling 'this.setState' in 'componentDidMount' outside functions such as callbacks.
2869
2844
  * @see https://eslint-react.xyz/docs/rules/no-set-state-in-component-did-mount
@@ -2879,16 +2854,6 @@ export interface Rules {
2879
2854
  * @see https://eslint-react.xyz/docs/rules/no-set-state-in-component-will-update
2880
2855
  */
2881
2856
  'react-dom/x-no-set-state-in-component-will-update'?: Linter.RuleEntry<[]>;
2882
- /**
2883
- * Disallows unnecessary usage of 'useCallback'.
2884
- * @see https://eslint-react.xyz/docs/rules/no-unnecessary-use-callback
2885
- */
2886
- 'react-dom/x-no-unnecessary-use-callback'?: Linter.RuleEntry<[]>;
2887
- /**
2888
- * Disallows unnecessary usage of 'useMemo'.
2889
- * @see https://eslint-react.xyz/docs/rules/no-unnecessary-use-memo
2890
- */
2891
- 'react-dom/x-no-unnecessary-use-memo'?: Linter.RuleEntry<[]>;
2892
2857
  /**
2893
2858
  * Enforces that a function with the 'use' prefix uses at least one Hook inside it.
2894
2859
  * @see https://eslint-react.xyz/docs/rules/no-unnecessary-use-prefix
@@ -2930,7 +2895,7 @@ export interface Rules {
2930
2895
  */
2931
2896
  'react-dom/x-no-unused-props'?: Linter.RuleEntry<[]>;
2932
2897
  /**
2933
- * Warns about unused class component state.
2898
+ * Warns about state variables that are defined but never used, or only used in effects.
2934
2899
  * @see https://eslint-react.xyz/docs/rules/no-unused-state
2935
2900
  */
2936
2901
  'react-dom/x-no-unused-state'?: Linter.RuleEntry<[]>;
@@ -2939,16 +2904,6 @@ export interface Rules {
2939
2904
  * @see https://eslint-react.xyz/docs/rules/no-use-context
2940
2905
  */
2941
2906
  'react-dom/x-no-use-context'?: Linter.RuleEntry<[]>;
2942
- /**
2943
- * Enforces destructuring assignment for component props and context.
2944
- * @see https://eslint-react.xyz/docs/rules/prefer-destructuring-assignment
2945
- */
2946
- 'react-dom/x-prefer-destructuring-assignment'?: Linter.RuleEntry<[]>;
2947
- /**
2948
- * Enforces importing React via a namespace import.
2949
- * @see https://eslint-react.xyz/docs/rules/prefer-namespace-import
2950
- */
2951
- 'react-dom/x-prefer-namespace-import'?: Linter.RuleEntry<[]>;
2952
2907
  /**
2953
2908
  * Validates that components and hooks are pure by checking that they do not call known-impure functions during render.
2954
2909
  * @see https://eslint-react.xyz/docs/rules/purity
@@ -2974,6 +2929,11 @@ export interface Rules {
2974
2929
  * @see https://eslint-react.xyz/docs/rules/set-state-in-render
2975
2930
  */
2976
2931
  'react-dom/x-set-state-in-render'?: Linter.RuleEntry<[]>;
2932
+ /**
2933
+ * Validates that components are static, not recreated every render.
2934
+ * @see https://eslint-react.xyz/docs/rules/static-components
2935
+ */
2936
+ 'react-dom/x-static-components'?: Linter.RuleEntry<[]>;
2977
2937
  /**
2978
2938
  * Validates against syntax that React Compiler does not support.
2979
2939
  * @see https://eslint-react.xyz/docs/rules/unsupported-syntax
@@ -2989,11 +2949,6 @@ export interface Rules {
2989
2949
  * @see https://eslint-react.xyz/docs/rules/use-state
2990
2950
  */
2991
2951
  'react-dom/x-use-state'?: Linter.RuleEntry<ReactDomXUseState>;
2992
- /**
2993
- * Disallows higher order functions that define components or hooks inside them.
2994
- * @see https://eslint-react.xyz/docs/rules/component-hook-factories
2995
- */
2996
- 'react-hooks-extra/component-hook-factories'?: Linter.RuleEntry<[]>;
2997
2952
  /**
2998
2953
  * Disallows DOM elements from using 'dangerouslySetInnerHTML'.
2999
2954
  * @see https://eslint-react.xyz/docs/rules/dom-no-dangerously-set-innerhtml
@@ -3074,11 +3029,6 @@ export interface Rules {
3074
3029
  * @see https://eslint-react.xyz/docs/rules/dom-no-void-elements-with-children
3075
3030
  */
3076
3031
  'react-hooks-extra/dom-no-void-elements-with-children'?: Linter.RuleEntry<[]>;
3077
- /**
3078
- * Enforces importing React DOM via a namespace import.
3079
- * @see https://eslint-react.xyz/docs/rules/dom-prefer-namespace-import
3080
- */
3081
- 'react-hooks-extra/dom-prefer-namespace-import'?: Linter.RuleEntry<[]>;
3082
3032
  /**
3083
3033
  * Validates usage of Error Boundaries instead of try/catch for errors in child components.
3084
3034
  * @see https://eslint-react.xyz/docs/rules/error-boundaries
@@ -3089,6 +3039,11 @@ export interface Rules {
3089
3039
  * @see https://github.com/facebook/react/issues/14920
3090
3040
  */
3091
3041
  'react-hooks-extra/exhaustive-deps'?: Linter.RuleEntry<ReactHooksExtraExhaustiveDeps>;
3042
+ /**
3043
+ * Validates against assignment/mutation of globals during render, part of ensuring that side effects must run outside of render.
3044
+ * @see https://eslint-react.xyz/docs/rules/globals
3045
+ */
3046
+ 'react-hooks-extra/globals'?: Linter.RuleEntry<[]>;
3092
3047
  /**
3093
3048
  * Validates against mutating props, state, and other values that are immutable.
3094
3049
  * @see https://eslint-react.xyz/docs/rules/immutability
@@ -3284,11 +3239,6 @@ export interface Rules {
3284
3239
  * @see https://eslint-react.xyz/docs/rules/no-nested-lazy-component-declarations
3285
3240
  */
3286
3241
  'react-hooks-extra/no-nested-lazy-component-declarations'?: Linter.RuleEntry<[]>;
3287
- /**
3288
- * Disallows 'shouldComponentUpdate' when extending 'React.PureComponent'.
3289
- * @see https://eslint-react.xyz/docs/rules/no-redundant-should-component-update
3290
- */
3291
- 'react-hooks-extra/no-redundant-should-component-update'?: Linter.RuleEntry<[]>;
3292
3242
  /**
3293
3243
  * Disallows calling 'this.setState' in 'componentDidMount' outside functions such as callbacks.
3294
3244
  * @see https://eslint-react.xyz/docs/rules/no-set-state-in-component-did-mount
@@ -3304,16 +3254,6 @@ export interface Rules {
3304
3254
  * @see https://eslint-react.xyz/docs/rules/no-set-state-in-component-will-update
3305
3255
  */
3306
3256
  'react-hooks-extra/no-set-state-in-component-will-update'?: Linter.RuleEntry<[]>;
3307
- /**
3308
- * Disallows unnecessary usage of 'useCallback'.
3309
- * @see https://eslint-react.xyz/docs/rules/no-unnecessary-use-callback
3310
- */
3311
- 'react-hooks-extra/no-unnecessary-use-callback'?: Linter.RuleEntry<[]>;
3312
- /**
3313
- * Disallows unnecessary usage of 'useMemo'.
3314
- * @see https://eslint-react.xyz/docs/rules/no-unnecessary-use-memo
3315
- */
3316
- 'react-hooks-extra/no-unnecessary-use-memo'?: Linter.RuleEntry<[]>;
3317
3257
  /**
3318
3258
  * Enforces that a function with the 'use' prefix uses at least one Hook inside it.
3319
3259
  * @see https://eslint-react.xyz/docs/rules/no-unnecessary-use-prefix
@@ -3355,7 +3295,7 @@ export interface Rules {
3355
3295
  */
3356
3296
  'react-hooks-extra/no-unused-props'?: Linter.RuleEntry<[]>;
3357
3297
  /**
3358
- * Warns about unused class component state.
3298
+ * Warns about state variables that are defined but never used, or only used in effects.
3359
3299
  * @see https://eslint-react.xyz/docs/rules/no-unused-state
3360
3300
  */
3361
3301
  'react-hooks-extra/no-unused-state'?: Linter.RuleEntry<[]>;
@@ -3364,16 +3304,6 @@ export interface Rules {
3364
3304
  * @see https://eslint-react.xyz/docs/rules/no-use-context
3365
3305
  */
3366
3306
  'react-hooks-extra/no-use-context'?: Linter.RuleEntry<[]>;
3367
- /**
3368
- * Enforces destructuring assignment for component props and context.
3369
- * @see https://eslint-react.xyz/docs/rules/prefer-destructuring-assignment
3370
- */
3371
- 'react-hooks-extra/prefer-destructuring-assignment'?: Linter.RuleEntry<[]>;
3372
- /**
3373
- * Enforces importing React via a namespace import.
3374
- * @see https://eslint-react.xyz/docs/rules/prefer-namespace-import
3375
- */
3376
- 'react-hooks-extra/prefer-namespace-import'?: Linter.RuleEntry<[]>;
3377
3307
  /**
3378
3308
  * Validates that components and hooks are pure by checking that they do not call known-impure functions during render.
3379
3309
  * @see https://eslint-react.xyz/docs/rules/purity
@@ -3404,6 +3334,11 @@ export interface Rules {
3404
3334
  * @see https://eslint-react.xyz/docs/rules/set-state-in-render
3405
3335
  */
3406
3336
  'react-hooks-extra/set-state-in-render'?: Linter.RuleEntry<[]>;
3337
+ /**
3338
+ * Validates that components are static, not recreated every render.
3339
+ * @see https://eslint-react.xyz/docs/rules/static-components
3340
+ */
3341
+ 'react-hooks-extra/static-components'?: Linter.RuleEntry<[]>;
3407
3342
  /**
3408
3343
  * Validates against syntax that React Compiler does not support.
3409
3344
  * @see https://eslint-react.xyz/docs/rules/unsupported-syntax
@@ -3424,6 +3359,11 @@ export interface Rules {
3424
3359
  * @see https://eslint-react.xyz/docs/rules/web-api-no-leaked-event-listener
3425
3360
  */
3426
3361
  'react-hooks-extra/web-api-no-leaked-event-listener'?: Linter.RuleEntry<[]>;
3362
+ /**
3363
+ * Enforces that every 'fetch' in a component or custom hook has a corresponding 'AbortController' abort in the cleanup function.
3364
+ * @see https://eslint-react.xyz/docs/rules/web-api-no-leaked-fetch
3365
+ */
3366
+ 'react-hooks-extra/web-api-no-leaked-fetch'?: Linter.RuleEntry<[]>;
3427
3367
  /**
3428
3368
  * Enforces that every 'setInterval' in a component or custom hook has a corresponding 'clearInterval'.
3429
3369
  * @see https://eslint-react.xyz/docs/rules/web-api-no-leaked-interval
@@ -3439,11 +3379,6 @@ export interface Rules {
3439
3379
  * @see https://eslint-react.xyz/docs/rules/web-api-no-leaked-timeout
3440
3380
  */
3441
3381
  'react-hooks-extra/web-api-no-leaked-timeout'?: Linter.RuleEntry<[]>;
3442
- /**
3443
- * Disallows higher order functions that define components or hooks inside them.
3444
- * @see https://eslint-react.xyz/docs/rules/component-hook-factories
3445
- */
3446
- 'react-hooks-extra/x-component-hook-factories'?: Linter.RuleEntry<[]>;
3447
3382
  /**
3448
3383
  * Validates usage of Error Boundaries instead of try/catch for errors in child components.
3449
3384
  * @see https://eslint-react.xyz/docs/rules/error-boundaries
@@ -3454,6 +3389,11 @@ export interface Rules {
3454
3389
  * @see https://github.com/facebook/react/issues/14920
3455
3390
  */
3456
3391
  'react-hooks-extra/x-exhaustive-deps'?: Linter.RuleEntry<ReactHooksExtraXExhaustiveDeps>;
3392
+ /**
3393
+ * Validates against assignment/mutation of globals during render, part of ensuring that side effects must run outside of render.
3394
+ * @see https://eslint-react.xyz/docs/rules/globals
3395
+ */
3396
+ 'react-hooks-extra/x-globals'?: Linter.RuleEntry<[]>;
3457
3397
  /**
3458
3398
  * Validates against mutating props, state, and other values that are immutable.
3459
3399
  * @see https://eslint-react.xyz/docs/rules/immutability
@@ -3594,11 +3534,6 @@ export interface Rules {
3594
3534
  * @see https://eslint-react.xyz/docs/rules/no-nested-lazy-component-declarations
3595
3535
  */
3596
3536
  'react-hooks-extra/x-no-nested-lazy-component-declarations'?: Linter.RuleEntry<[]>;
3597
- /**
3598
- * Disallows 'shouldComponentUpdate' when extending 'React.PureComponent'.
3599
- * @see https://eslint-react.xyz/docs/rules/no-redundant-should-component-update
3600
- */
3601
- 'react-hooks-extra/x-no-redundant-should-component-update'?: Linter.RuleEntry<[]>;
3602
3537
  /**
3603
3538
  * Disallows calling 'this.setState' in 'componentDidMount' outside functions such as callbacks.
3604
3539
  * @see https://eslint-react.xyz/docs/rules/no-set-state-in-component-did-mount
@@ -3614,16 +3549,6 @@ export interface Rules {
3614
3549
  * @see https://eslint-react.xyz/docs/rules/no-set-state-in-component-will-update
3615
3550
  */
3616
3551
  'react-hooks-extra/x-no-set-state-in-component-will-update'?: Linter.RuleEntry<[]>;
3617
- /**
3618
- * Disallows unnecessary usage of 'useCallback'.
3619
- * @see https://eslint-react.xyz/docs/rules/no-unnecessary-use-callback
3620
- */
3621
- 'react-hooks-extra/x-no-unnecessary-use-callback'?: Linter.RuleEntry<[]>;
3622
- /**
3623
- * Disallows unnecessary usage of 'useMemo'.
3624
- * @see https://eslint-react.xyz/docs/rules/no-unnecessary-use-memo
3625
- */
3626
- 'react-hooks-extra/x-no-unnecessary-use-memo'?: Linter.RuleEntry<[]>;
3627
3552
  /**
3628
3553
  * Enforces that a function with the 'use' prefix uses at least one Hook inside it.
3629
3554
  * @see https://eslint-react.xyz/docs/rules/no-unnecessary-use-prefix
@@ -3665,7 +3590,7 @@ export interface Rules {
3665
3590
  */
3666
3591
  'react-hooks-extra/x-no-unused-props'?: Linter.RuleEntry<[]>;
3667
3592
  /**
3668
- * Warns about unused class component state.
3593
+ * Warns about state variables that are defined but never used, or only used in effects.
3669
3594
  * @see https://eslint-react.xyz/docs/rules/no-unused-state
3670
3595
  */
3671
3596
  'react-hooks-extra/x-no-unused-state'?: Linter.RuleEntry<[]>;
@@ -3674,16 +3599,6 @@ export interface Rules {
3674
3599
  * @see https://eslint-react.xyz/docs/rules/no-use-context
3675
3600
  */
3676
3601
  'react-hooks-extra/x-no-use-context'?: Linter.RuleEntry<[]>;
3677
- /**
3678
- * Enforces destructuring assignment for component props and context.
3679
- * @see https://eslint-react.xyz/docs/rules/prefer-destructuring-assignment
3680
- */
3681
- 'react-hooks-extra/x-prefer-destructuring-assignment'?: Linter.RuleEntry<[]>;
3682
- /**
3683
- * Enforces importing React via a namespace import.
3684
- * @see https://eslint-react.xyz/docs/rules/prefer-namespace-import
3685
- */
3686
- 'react-hooks-extra/x-prefer-namespace-import'?: Linter.RuleEntry<[]>;
3687
3602
  /**
3688
3603
  * Validates that components and hooks are pure by checking that they do not call known-impure functions during render.
3689
3604
  * @see https://eslint-react.xyz/docs/rules/purity
@@ -3709,6 +3624,11 @@ export interface Rules {
3709
3624
  * @see https://eslint-react.xyz/docs/rules/set-state-in-render
3710
3625
  */
3711
3626
  'react-hooks-extra/x-set-state-in-render'?: Linter.RuleEntry<[]>;
3627
+ /**
3628
+ * Validates that components are static, not recreated every render.
3629
+ * @see https://eslint-react.xyz/docs/rules/static-components
3630
+ */
3631
+ 'react-hooks-extra/x-static-components'?: Linter.RuleEntry<[]>;
3712
3632
  /**
3713
3633
  * Validates against syntax that React Compiler does not support.
3714
3634
  * @see https://eslint-react.xyz/docs/rules/unsupported-syntax
@@ -3869,11 +3789,6 @@ export interface Rules {
3869
3789
  * @see https://react.dev/reference/eslint-plugin-react-hooks/lints/void-use-memo
3870
3790
  */
3871
3791
  'react-hooks/void-use-memo'?: Linter.RuleEntry<ReactHooksVoidUseMemo>;
3872
- /**
3873
- * Disallows higher order functions that define components or hooks inside them.
3874
- * @see https://eslint-react.xyz/docs/rules/component-hook-factories
3875
- */
3876
- 'react-naming-convention/component-hook-factories'?: Linter.RuleEntry<[]>;
3877
3792
  /**
3878
3793
  * Disallows DOM elements from using 'dangerouslySetInnerHTML'.
3879
3794
  * @see https://eslint-react.xyz/docs/rules/dom-no-dangerously-set-innerhtml
@@ -3954,11 +3869,6 @@ export interface Rules {
3954
3869
  * @see https://eslint-react.xyz/docs/rules/dom-no-void-elements-with-children
3955
3870
  */
3956
3871
  'react-naming-convention/dom-no-void-elements-with-children'?: Linter.RuleEntry<[]>;
3957
- /**
3958
- * Enforces importing React DOM via a namespace import.
3959
- * @see https://eslint-react.xyz/docs/rules/dom-prefer-namespace-import
3960
- */
3961
- 'react-naming-convention/dom-prefer-namespace-import'?: Linter.RuleEntry<[]>;
3962
3872
  /**
3963
3873
  * Validates usage of Error Boundaries instead of try/catch for errors in child components.
3964
3874
  * @see https://eslint-react.xyz/docs/rules/error-boundaries
@@ -3969,6 +3879,11 @@ export interface Rules {
3969
3879
  * @see https://github.com/facebook/react/issues/14920
3970
3880
  */
3971
3881
  'react-naming-convention/exhaustive-deps'?: Linter.RuleEntry<ReactNamingConventionExhaustiveDeps>;
3882
+ /**
3883
+ * Validates against assignment/mutation of globals during render, part of ensuring that side effects must run outside of render.
3884
+ * @see https://eslint-react.xyz/docs/rules/globals
3885
+ */
3886
+ 'react-naming-convention/globals'?: Linter.RuleEntry<[]>;
3972
3887
  /**
3973
3888
  * Validates against mutating props, state, and other values that are immutable.
3974
3889
  * @see https://eslint-react.xyz/docs/rules/immutability
@@ -4164,11 +4079,6 @@ export interface Rules {
4164
4079
  * @see https://eslint-react.xyz/docs/rules/no-nested-lazy-component-declarations
4165
4080
  */
4166
4081
  'react-naming-convention/no-nested-lazy-component-declarations'?: Linter.RuleEntry<[]>;
4167
- /**
4168
- * Disallows 'shouldComponentUpdate' when extending 'React.PureComponent'.
4169
- * @see https://eslint-react.xyz/docs/rules/no-redundant-should-component-update
4170
- */
4171
- 'react-naming-convention/no-redundant-should-component-update'?: Linter.RuleEntry<[]>;
4172
4082
  /**
4173
4083
  * Disallows calling 'this.setState' in 'componentDidMount' outside functions such as callbacks.
4174
4084
  * @see https://eslint-react.xyz/docs/rules/no-set-state-in-component-did-mount
@@ -4184,16 +4094,6 @@ export interface Rules {
4184
4094
  * @see https://eslint-react.xyz/docs/rules/no-set-state-in-component-will-update
4185
4095
  */
4186
4096
  'react-naming-convention/no-set-state-in-component-will-update'?: Linter.RuleEntry<[]>;
4187
- /**
4188
- * Disallows unnecessary usage of 'useCallback'.
4189
- * @see https://eslint-react.xyz/docs/rules/no-unnecessary-use-callback
4190
- */
4191
- 'react-naming-convention/no-unnecessary-use-callback'?: Linter.RuleEntry<[]>;
4192
- /**
4193
- * Disallows unnecessary usage of 'useMemo'.
4194
- * @see https://eslint-react.xyz/docs/rules/no-unnecessary-use-memo
4195
- */
4196
- 'react-naming-convention/no-unnecessary-use-memo'?: Linter.RuleEntry<[]>;
4197
4097
  /**
4198
4098
  * Enforces that a function with the 'use' prefix uses at least one Hook inside it.
4199
4099
  * @see https://eslint-react.xyz/docs/rules/no-unnecessary-use-prefix
@@ -4235,7 +4135,7 @@ export interface Rules {
4235
4135
  */
4236
4136
  'react-naming-convention/no-unused-props'?: Linter.RuleEntry<[]>;
4237
4137
  /**
4238
- * Warns about unused class component state.
4138
+ * Warns about state variables that are defined but never used, or only used in effects.
4239
4139
  * @see https://eslint-react.xyz/docs/rules/no-unused-state
4240
4140
  */
4241
4141
  'react-naming-convention/no-unused-state'?: Linter.RuleEntry<[]>;
@@ -4244,16 +4144,6 @@ export interface Rules {
4244
4144
  * @see https://eslint-react.xyz/docs/rules/no-use-context
4245
4145
  */
4246
4146
  'react-naming-convention/no-use-context'?: Linter.RuleEntry<[]>;
4247
- /**
4248
- * Enforces destructuring assignment for component props and context.
4249
- * @see https://eslint-react.xyz/docs/rules/prefer-destructuring-assignment
4250
- */
4251
- 'react-naming-convention/prefer-destructuring-assignment'?: Linter.RuleEntry<[]>;
4252
- /**
4253
- * Enforces importing React via a namespace import.
4254
- * @see https://eslint-react.xyz/docs/rules/prefer-namespace-import
4255
- */
4256
- 'react-naming-convention/prefer-namespace-import'?: Linter.RuleEntry<[]>;
4257
4147
  /**
4258
4148
  * Validates that components and hooks are pure by checking that they do not call known-impure functions during render.
4259
4149
  * @see https://eslint-react.xyz/docs/rules/purity
@@ -4284,6 +4174,11 @@ export interface Rules {
4284
4174
  * @see https://eslint-react.xyz/docs/rules/set-state-in-render
4285
4175
  */
4286
4176
  'react-naming-convention/set-state-in-render'?: Linter.RuleEntry<[]>;
4177
+ /**
4178
+ * Validates that components are static, not recreated every render.
4179
+ * @see https://eslint-react.xyz/docs/rules/static-components
4180
+ */
4181
+ 'react-naming-convention/static-components'?: Linter.RuleEntry<[]>;
4287
4182
  /**
4288
4183
  * Validates against syntax that React Compiler does not support.
4289
4184
  * @see https://eslint-react.xyz/docs/rules/unsupported-syntax
@@ -4304,6 +4199,11 @@ export interface Rules {
4304
4199
  * @see https://eslint-react.xyz/docs/rules/web-api-no-leaked-event-listener
4305
4200
  */
4306
4201
  'react-naming-convention/web-api-no-leaked-event-listener'?: Linter.RuleEntry<[]>;
4202
+ /**
4203
+ * Enforces that every 'fetch' in a component or custom hook has a corresponding 'AbortController' abort in the cleanup function.
4204
+ * @see https://eslint-react.xyz/docs/rules/web-api-no-leaked-fetch
4205
+ */
4206
+ 'react-naming-convention/web-api-no-leaked-fetch'?: Linter.RuleEntry<[]>;
4307
4207
  /**
4308
4208
  * Enforces that every 'setInterval' in a component or custom hook has a corresponding 'clearInterval'.
4309
4209
  * @see https://eslint-react.xyz/docs/rules/web-api-no-leaked-interval
@@ -4319,11 +4219,6 @@ export interface Rules {
4319
4219
  * @see https://eslint-react.xyz/docs/rules/web-api-no-leaked-timeout
4320
4220
  */
4321
4221
  'react-naming-convention/web-api-no-leaked-timeout'?: Linter.RuleEntry<[]>;
4322
- /**
4323
- * Disallows higher order functions that define components or hooks inside them.
4324
- * @see https://eslint-react.xyz/docs/rules/component-hook-factories
4325
- */
4326
- 'react-naming-convention/x-component-hook-factories'?: Linter.RuleEntry<[]>;
4327
4222
  /**
4328
4223
  * Validates usage of Error Boundaries instead of try/catch for errors in child components.
4329
4224
  * @see https://eslint-react.xyz/docs/rules/error-boundaries
@@ -4334,6 +4229,11 @@ export interface Rules {
4334
4229
  * @see https://github.com/facebook/react/issues/14920
4335
4230
  */
4336
4231
  'react-naming-convention/x-exhaustive-deps'?: Linter.RuleEntry<ReactNamingConventionXExhaustiveDeps>;
4232
+ /**
4233
+ * Validates against assignment/mutation of globals during render, part of ensuring that side effects must run outside of render.
4234
+ * @see https://eslint-react.xyz/docs/rules/globals
4235
+ */
4236
+ 'react-naming-convention/x-globals'?: Linter.RuleEntry<[]>;
4337
4237
  /**
4338
4238
  * Validates against mutating props, state, and other values that are immutable.
4339
4239
  * @see https://eslint-react.xyz/docs/rules/immutability
@@ -4474,11 +4374,6 @@ export interface Rules {
4474
4374
  * @see https://eslint-react.xyz/docs/rules/no-nested-lazy-component-declarations
4475
4375
  */
4476
4376
  'react-naming-convention/x-no-nested-lazy-component-declarations'?: Linter.RuleEntry<[]>;
4477
- /**
4478
- * Disallows 'shouldComponentUpdate' when extending 'React.PureComponent'.
4479
- * @see https://eslint-react.xyz/docs/rules/no-redundant-should-component-update
4480
- */
4481
- 'react-naming-convention/x-no-redundant-should-component-update'?: Linter.RuleEntry<[]>;
4482
4377
  /**
4483
4378
  * Disallows calling 'this.setState' in 'componentDidMount' outside functions such as callbacks.
4484
4379
  * @see https://eslint-react.xyz/docs/rules/no-set-state-in-component-did-mount
@@ -4494,16 +4389,6 @@ export interface Rules {
4494
4389
  * @see https://eslint-react.xyz/docs/rules/no-set-state-in-component-will-update
4495
4390
  */
4496
4391
  'react-naming-convention/x-no-set-state-in-component-will-update'?: Linter.RuleEntry<[]>;
4497
- /**
4498
- * Disallows unnecessary usage of 'useCallback'.
4499
- * @see https://eslint-react.xyz/docs/rules/no-unnecessary-use-callback
4500
- */
4501
- 'react-naming-convention/x-no-unnecessary-use-callback'?: Linter.RuleEntry<[]>;
4502
- /**
4503
- * Disallows unnecessary usage of 'useMemo'.
4504
- * @see https://eslint-react.xyz/docs/rules/no-unnecessary-use-memo
4505
- */
4506
- 'react-naming-convention/x-no-unnecessary-use-memo'?: Linter.RuleEntry<[]>;
4507
4392
  /**
4508
4393
  * Enforces that a function with the 'use' prefix uses at least one Hook inside it.
4509
4394
  * @see https://eslint-react.xyz/docs/rules/no-unnecessary-use-prefix
@@ -4545,7 +4430,7 @@ export interface Rules {
4545
4430
  */
4546
4431
  'react-naming-convention/x-no-unused-props'?: Linter.RuleEntry<[]>;
4547
4432
  /**
4548
- * Warns about unused class component state.
4433
+ * Warns about state variables that are defined but never used, or only used in effects.
4549
4434
  * @see https://eslint-react.xyz/docs/rules/no-unused-state
4550
4435
  */
4551
4436
  'react-naming-convention/x-no-unused-state'?: Linter.RuleEntry<[]>;
@@ -4554,16 +4439,6 @@ export interface Rules {
4554
4439
  * @see https://eslint-react.xyz/docs/rules/no-use-context
4555
4440
  */
4556
4441
  'react-naming-convention/x-no-use-context'?: Linter.RuleEntry<[]>;
4557
- /**
4558
- * Enforces destructuring assignment for component props and context.
4559
- * @see https://eslint-react.xyz/docs/rules/prefer-destructuring-assignment
4560
- */
4561
- 'react-naming-convention/x-prefer-destructuring-assignment'?: Linter.RuleEntry<[]>;
4562
- /**
4563
- * Enforces importing React via a namespace import.
4564
- * @see https://eslint-react.xyz/docs/rules/prefer-namespace-import
4565
- */
4566
- 'react-naming-convention/x-prefer-namespace-import'?: Linter.RuleEntry<[]>;
4567
4442
  /**
4568
4443
  * Validates that components and hooks are pure by checking that they do not call known-impure functions during render.
4569
4444
  * @see https://eslint-react.xyz/docs/rules/purity
@@ -4589,6 +4464,11 @@ export interface Rules {
4589
4464
  * @see https://eslint-react.xyz/docs/rules/set-state-in-render
4590
4465
  */
4591
4466
  'react-naming-convention/x-set-state-in-render'?: Linter.RuleEntry<[]>;
4467
+ /**
4468
+ * Validates that components are static, not recreated every render.
4469
+ * @see https://eslint-react.xyz/docs/rules/static-components
4470
+ */
4471
+ 'react-naming-convention/x-static-components'?: Linter.RuleEntry<[]>;
4592
4472
  /**
4593
4473
  * Validates against syntax that React Compiler does not support.
4594
4474
  * @see https://eslint-react.xyz/docs/rules/unsupported-syntax
@@ -4605,11 +4485,6 @@ export interface Rules {
4605
4485
  */
4606
4486
  'react-naming-convention/x-use-state'?: Linter.RuleEntry<ReactNamingConventionXUseState>;
4607
4487
  'react-refresh/only-export-components'?: Linter.RuleEntry<ReactRefreshOnlyExportComponents>;
4608
- /**
4609
- * Disallows higher order functions that define components or hooks inside them.
4610
- * @see https://eslint-react.xyz/docs/rules/component-hook-factories
4611
- */
4612
- 'react-web-api/component-hook-factories'?: Linter.RuleEntry<[]>;
4613
4488
  /**
4614
4489
  * Disallows DOM elements from using 'dangerouslySetInnerHTML'.
4615
4490
  * @see https://eslint-react.xyz/docs/rules/dom-no-dangerously-set-innerhtml
@@ -4690,11 +4565,6 @@ export interface Rules {
4690
4565
  * @see https://eslint-react.xyz/docs/rules/dom-no-void-elements-with-children
4691
4566
  */
4692
4567
  'react-web-api/dom-no-void-elements-with-children'?: Linter.RuleEntry<[]>;
4693
- /**
4694
- * Enforces importing React DOM via a namespace import.
4695
- * @see https://eslint-react.xyz/docs/rules/dom-prefer-namespace-import
4696
- */
4697
- 'react-web-api/dom-prefer-namespace-import'?: Linter.RuleEntry<[]>;
4698
4568
  /**
4699
4569
  * Validates usage of Error Boundaries instead of try/catch for errors in child components.
4700
4570
  * @see https://eslint-react.xyz/docs/rules/error-boundaries
@@ -4705,6 +4575,11 @@ export interface Rules {
4705
4575
  * @see https://github.com/facebook/react/issues/14920
4706
4576
  */
4707
4577
  'react-web-api/exhaustive-deps'?: Linter.RuleEntry<ReactWebApiExhaustiveDeps>;
4578
+ /**
4579
+ * Validates against assignment/mutation of globals during render, part of ensuring that side effects must run outside of render.
4580
+ * @see https://eslint-react.xyz/docs/rules/globals
4581
+ */
4582
+ 'react-web-api/globals'?: Linter.RuleEntry<[]>;
4708
4583
  /**
4709
4584
  * Validates against mutating props, state, and other values that are immutable.
4710
4585
  * @see https://eslint-react.xyz/docs/rules/immutability
@@ -4900,11 +4775,6 @@ export interface Rules {
4900
4775
  * @see https://eslint-react.xyz/docs/rules/no-nested-lazy-component-declarations
4901
4776
  */
4902
4777
  'react-web-api/no-nested-lazy-component-declarations'?: Linter.RuleEntry<[]>;
4903
- /**
4904
- * Disallows 'shouldComponentUpdate' when extending 'React.PureComponent'.
4905
- * @see https://eslint-react.xyz/docs/rules/no-redundant-should-component-update
4906
- */
4907
- 'react-web-api/no-redundant-should-component-update'?: Linter.RuleEntry<[]>;
4908
4778
  /**
4909
4779
  * Disallows calling 'this.setState' in 'componentDidMount' outside functions such as callbacks.
4910
4780
  * @see https://eslint-react.xyz/docs/rules/no-set-state-in-component-did-mount
@@ -4920,16 +4790,6 @@ export interface Rules {
4920
4790
  * @see https://eslint-react.xyz/docs/rules/no-set-state-in-component-will-update
4921
4791
  */
4922
4792
  'react-web-api/no-set-state-in-component-will-update'?: Linter.RuleEntry<[]>;
4923
- /**
4924
- * Disallows unnecessary usage of 'useCallback'.
4925
- * @see https://eslint-react.xyz/docs/rules/no-unnecessary-use-callback
4926
- */
4927
- 'react-web-api/no-unnecessary-use-callback'?: Linter.RuleEntry<[]>;
4928
- /**
4929
- * Disallows unnecessary usage of 'useMemo'.
4930
- * @see https://eslint-react.xyz/docs/rules/no-unnecessary-use-memo
4931
- */
4932
- 'react-web-api/no-unnecessary-use-memo'?: Linter.RuleEntry<[]>;
4933
4793
  /**
4934
4794
  * Enforces that a function with the 'use' prefix uses at least one Hook inside it.
4935
4795
  * @see https://eslint-react.xyz/docs/rules/no-unnecessary-use-prefix
@@ -4971,7 +4831,7 @@ export interface Rules {
4971
4831
  */
4972
4832
  'react-web-api/no-unused-props'?: Linter.RuleEntry<[]>;
4973
4833
  /**
4974
- * Warns about unused class component state.
4834
+ * Warns about state variables that are defined but never used, or only used in effects.
4975
4835
  * @see https://eslint-react.xyz/docs/rules/no-unused-state
4976
4836
  */
4977
4837
  'react-web-api/no-unused-state'?: Linter.RuleEntry<[]>;
@@ -4980,16 +4840,6 @@ export interface Rules {
4980
4840
  * @see https://eslint-react.xyz/docs/rules/no-use-context
4981
4841
  */
4982
4842
  'react-web-api/no-use-context'?: Linter.RuleEntry<[]>;
4983
- /**
4984
- * Enforces destructuring assignment for component props and context.
4985
- * @see https://eslint-react.xyz/docs/rules/prefer-destructuring-assignment
4986
- */
4987
- 'react-web-api/prefer-destructuring-assignment'?: Linter.RuleEntry<[]>;
4988
- /**
4989
- * Enforces importing React via a namespace import.
4990
- * @see https://eslint-react.xyz/docs/rules/prefer-namespace-import
4991
- */
4992
- 'react-web-api/prefer-namespace-import'?: Linter.RuleEntry<[]>;
4993
4843
  /**
4994
4844
  * Validates that components and hooks are pure by checking that they do not call known-impure functions during render.
4995
4845
  * @see https://eslint-react.xyz/docs/rules/purity
@@ -5020,6 +4870,11 @@ export interface Rules {
5020
4870
  * @see https://eslint-react.xyz/docs/rules/set-state-in-render
5021
4871
  */
5022
4872
  'react-web-api/set-state-in-render'?: Linter.RuleEntry<[]>;
4873
+ /**
4874
+ * Validates that components are static, not recreated every render.
4875
+ * @see https://eslint-react.xyz/docs/rules/static-components
4876
+ */
4877
+ 'react-web-api/static-components'?: Linter.RuleEntry<[]>;
5023
4878
  /**
5024
4879
  * Validates against syntax that React Compiler does not support.
5025
4880
  * @see https://eslint-react.xyz/docs/rules/unsupported-syntax
@@ -5040,6 +4895,11 @@ export interface Rules {
5040
4895
  * @see https://eslint-react.xyz/docs/rules/web-api-no-leaked-event-listener
5041
4896
  */
5042
4897
  'react-web-api/web-api-no-leaked-event-listener'?: Linter.RuleEntry<[]>;
4898
+ /**
4899
+ * Enforces that every 'fetch' in a component or custom hook has a corresponding 'AbortController' abort in the cleanup function.
4900
+ * @see https://eslint-react.xyz/docs/rules/web-api-no-leaked-fetch
4901
+ */
4902
+ 'react-web-api/web-api-no-leaked-fetch'?: Linter.RuleEntry<[]>;
5043
4903
  /**
5044
4904
  * Enforces that every 'setInterval' in a component or custom hook has a corresponding 'clearInterval'.
5045
4905
  * @see https://eslint-react.xyz/docs/rules/web-api-no-leaked-interval
@@ -5055,11 +4915,6 @@ export interface Rules {
5055
4915
  * @see https://eslint-react.xyz/docs/rules/web-api-no-leaked-timeout
5056
4916
  */
5057
4917
  'react-web-api/web-api-no-leaked-timeout'?: Linter.RuleEntry<[]>;
5058
- /**
5059
- * Disallows higher order functions that define components or hooks inside them.
5060
- * @see https://eslint-react.xyz/docs/rules/component-hook-factories
5061
- */
5062
- 'react-web-api/x-component-hook-factories'?: Linter.RuleEntry<[]>;
5063
4918
  /**
5064
4919
  * Validates usage of Error Boundaries instead of try/catch for errors in child components.
5065
4920
  * @see https://eslint-react.xyz/docs/rules/error-boundaries
@@ -5070,6 +4925,11 @@ export interface Rules {
5070
4925
  * @see https://github.com/facebook/react/issues/14920
5071
4926
  */
5072
4927
  'react-web-api/x-exhaustive-deps'?: Linter.RuleEntry<ReactWebApiXExhaustiveDeps>;
4928
+ /**
4929
+ * Validates against assignment/mutation of globals during render, part of ensuring that side effects must run outside of render.
4930
+ * @see https://eslint-react.xyz/docs/rules/globals
4931
+ */
4932
+ 'react-web-api/x-globals'?: Linter.RuleEntry<[]>;
5073
4933
  /**
5074
4934
  * Validates against mutating props, state, and other values that are immutable.
5075
4935
  * @see https://eslint-react.xyz/docs/rules/immutability
@@ -5210,11 +5070,6 @@ export interface Rules {
5210
5070
  * @see https://eslint-react.xyz/docs/rules/no-nested-lazy-component-declarations
5211
5071
  */
5212
5072
  'react-web-api/x-no-nested-lazy-component-declarations'?: Linter.RuleEntry<[]>;
5213
- /**
5214
- * Disallows 'shouldComponentUpdate' when extending 'React.PureComponent'.
5215
- * @see https://eslint-react.xyz/docs/rules/no-redundant-should-component-update
5216
- */
5217
- 'react-web-api/x-no-redundant-should-component-update'?: Linter.RuleEntry<[]>;
5218
5073
  /**
5219
5074
  * Disallows calling 'this.setState' in 'componentDidMount' outside functions such as callbacks.
5220
5075
  * @see https://eslint-react.xyz/docs/rules/no-set-state-in-component-did-mount
@@ -5230,16 +5085,6 @@ export interface Rules {
5230
5085
  * @see https://eslint-react.xyz/docs/rules/no-set-state-in-component-will-update
5231
5086
  */
5232
5087
  'react-web-api/x-no-set-state-in-component-will-update'?: Linter.RuleEntry<[]>;
5233
- /**
5234
- * Disallows unnecessary usage of 'useCallback'.
5235
- * @see https://eslint-react.xyz/docs/rules/no-unnecessary-use-callback
5236
- */
5237
- 'react-web-api/x-no-unnecessary-use-callback'?: Linter.RuleEntry<[]>;
5238
- /**
5239
- * Disallows unnecessary usage of 'useMemo'.
5240
- * @see https://eslint-react.xyz/docs/rules/no-unnecessary-use-memo
5241
- */
5242
- 'react-web-api/x-no-unnecessary-use-memo'?: Linter.RuleEntry<[]>;
5243
5088
  /**
5244
5089
  * Enforces that a function with the 'use' prefix uses at least one Hook inside it.
5245
5090
  * @see https://eslint-react.xyz/docs/rules/no-unnecessary-use-prefix
@@ -5281,7 +5126,7 @@ export interface Rules {
5281
5126
  */
5282
5127
  'react-web-api/x-no-unused-props'?: Linter.RuleEntry<[]>;
5283
5128
  /**
5284
- * Warns about unused class component state.
5129
+ * Warns about state variables that are defined but never used, or only used in effects.
5285
5130
  * @see https://eslint-react.xyz/docs/rules/no-unused-state
5286
5131
  */
5287
5132
  'react-web-api/x-no-unused-state'?: Linter.RuleEntry<[]>;
@@ -5290,16 +5135,6 @@ export interface Rules {
5290
5135
  * @see https://eslint-react.xyz/docs/rules/no-use-context
5291
5136
  */
5292
5137
  'react-web-api/x-no-use-context'?: Linter.RuleEntry<[]>;
5293
- /**
5294
- * Enforces destructuring assignment for component props and context.
5295
- * @see https://eslint-react.xyz/docs/rules/prefer-destructuring-assignment
5296
- */
5297
- 'react-web-api/x-prefer-destructuring-assignment'?: Linter.RuleEntry<[]>;
5298
- /**
5299
- * Enforces importing React via a namespace import.
5300
- * @see https://eslint-react.xyz/docs/rules/prefer-namespace-import
5301
- */
5302
- 'react-web-api/x-prefer-namespace-import'?: Linter.RuleEntry<[]>;
5303
5138
  /**
5304
5139
  * Validates that components and hooks are pure by checking that they do not call known-impure functions during render.
5305
5140
  * @see https://eslint-react.xyz/docs/rules/purity
@@ -5325,6 +5160,11 @@ export interface Rules {
5325
5160
  * @see https://eslint-react.xyz/docs/rules/set-state-in-render
5326
5161
  */
5327
5162
  'react-web-api/x-set-state-in-render'?: Linter.RuleEntry<[]>;
5163
+ /**
5164
+ * Validates that components are static, not recreated every render.
5165
+ * @see https://eslint-react.xyz/docs/rules/static-components
5166
+ */
5167
+ 'react-web-api/x-static-components'?: Linter.RuleEntry<[]>;
5328
5168
  /**
5329
5169
  * Validates against syntax that React Compiler does not support.
5330
5170
  * @see https://eslint-react.xyz/docs/rules/unsupported-syntax
@@ -5340,11 +5180,6 @@ export interface Rules {
5340
5180
  * @see https://eslint-react.xyz/docs/rules/use-state
5341
5181
  */
5342
5182
  'react-web-api/x-use-state'?: Linter.RuleEntry<ReactWebApiXUseState>;
5343
- /**
5344
- * Disallows higher order functions that define components or hooks inside them.
5345
- * @see https://eslint-react.xyz/docs/rules/component-hook-factories
5346
- */
5347
- 'react/component-hook-factories'?: Linter.RuleEntry<[]>;
5348
5183
  /**
5349
5184
  * Disallows DOM elements from using 'dangerouslySetInnerHTML'.
5350
5185
  * @see https://eslint-react.xyz/docs/rules/dom-no-dangerously-set-innerhtml
@@ -5425,11 +5260,6 @@ export interface Rules {
5425
5260
  * @see https://eslint-react.xyz/docs/rules/dom-no-void-elements-with-children
5426
5261
  */
5427
5262
  'react/dom-no-void-elements-with-children'?: Linter.RuleEntry<[]>;
5428
- /**
5429
- * Enforces importing React DOM via a namespace import.
5430
- * @see https://eslint-react.xyz/docs/rules/dom-prefer-namespace-import
5431
- */
5432
- 'react/dom-prefer-namespace-import'?: Linter.RuleEntry<[]>;
5433
5263
  /**
5434
5264
  * Validates usage of Error Boundaries instead of try/catch for errors in child components.
5435
5265
  * @see https://eslint-react.xyz/docs/rules/error-boundaries
@@ -5440,6 +5270,11 @@ export interface Rules {
5440
5270
  * @see https://github.com/facebook/react/issues/14920
5441
5271
  */
5442
5272
  'react/exhaustive-deps'?: Linter.RuleEntry<ReactExhaustiveDeps>;
5273
+ /**
5274
+ * Validates against assignment/mutation of globals during render, part of ensuring that side effects must run outside of render.
5275
+ * @see https://eslint-react.xyz/docs/rules/globals
5276
+ */
5277
+ 'react/globals'?: Linter.RuleEntry<[]>;
5443
5278
  /**
5444
5279
  * Validates against mutating props, state, and other values that are immutable.
5445
5280
  * @see https://eslint-react.xyz/docs/rules/immutability
@@ -5635,11 +5470,6 @@ export interface Rules {
5635
5470
  * @see https://eslint-react.xyz/docs/rules/no-nested-lazy-component-declarations
5636
5471
  */
5637
5472
  'react/no-nested-lazy-component-declarations'?: Linter.RuleEntry<[]>;
5638
- /**
5639
- * Disallows 'shouldComponentUpdate' when extending 'React.PureComponent'.
5640
- * @see https://eslint-react.xyz/docs/rules/no-redundant-should-component-update
5641
- */
5642
- 'react/no-redundant-should-component-update'?: Linter.RuleEntry<[]>;
5643
5473
  /**
5644
5474
  * Disallows calling 'this.setState' in 'componentDidMount' outside functions such as callbacks.
5645
5475
  * @see https://eslint-react.xyz/docs/rules/no-set-state-in-component-did-mount
@@ -5655,16 +5485,6 @@ export interface Rules {
5655
5485
  * @see https://eslint-react.xyz/docs/rules/no-set-state-in-component-will-update
5656
5486
  */
5657
5487
  'react/no-set-state-in-component-will-update'?: Linter.RuleEntry<[]>;
5658
- /**
5659
- * Disallows unnecessary usage of 'useCallback'.
5660
- * @see https://eslint-react.xyz/docs/rules/no-unnecessary-use-callback
5661
- */
5662
- 'react/no-unnecessary-use-callback'?: Linter.RuleEntry<[]>;
5663
- /**
5664
- * Disallows unnecessary usage of 'useMemo'.
5665
- * @see https://eslint-react.xyz/docs/rules/no-unnecessary-use-memo
5666
- */
5667
- 'react/no-unnecessary-use-memo'?: Linter.RuleEntry<[]>;
5668
5488
  /**
5669
5489
  * Enforces that a function with the 'use' prefix uses at least one Hook inside it.
5670
5490
  * @see https://eslint-react.xyz/docs/rules/no-unnecessary-use-prefix
@@ -5706,7 +5526,7 @@ export interface Rules {
5706
5526
  */
5707
5527
  'react/no-unused-props'?: Linter.RuleEntry<[]>;
5708
5528
  /**
5709
- * Warns about unused class component state.
5529
+ * Warns about state variables that are defined but never used, or only used in effects.
5710
5530
  * @see https://eslint-react.xyz/docs/rules/no-unused-state
5711
5531
  */
5712
5532
  'react/no-unused-state'?: Linter.RuleEntry<[]>;
@@ -5715,16 +5535,6 @@ export interface Rules {
5715
5535
  * @see https://eslint-react.xyz/docs/rules/no-use-context
5716
5536
  */
5717
5537
  'react/no-use-context'?: Linter.RuleEntry<[]>;
5718
- /**
5719
- * Enforces destructuring assignment for component props and context.
5720
- * @see https://eslint-react.xyz/docs/rules/prefer-destructuring-assignment
5721
- */
5722
- 'react/prefer-destructuring-assignment'?: Linter.RuleEntry<[]>;
5723
- /**
5724
- * Enforces importing React via a namespace import.
5725
- * @see https://eslint-react.xyz/docs/rules/prefer-namespace-import
5726
- */
5727
- 'react/prefer-namespace-import'?: Linter.RuleEntry<[]>;
5728
5538
  /**
5729
5539
  * Validates that components and hooks are pure by checking that they do not call known-impure functions during render.
5730
5540
  * @see https://eslint-react.xyz/docs/rules/purity
@@ -5755,6 +5565,11 @@ export interface Rules {
5755
5565
  * @see https://eslint-react.xyz/docs/rules/set-state-in-render
5756
5566
  */
5757
5567
  'react/set-state-in-render'?: Linter.RuleEntry<[]>;
5568
+ /**
5569
+ * Validates that components are static, not recreated every render.
5570
+ * @see https://eslint-react.xyz/docs/rules/static-components
5571
+ */
5572
+ 'react/static-components'?: Linter.RuleEntry<[]>;
5758
5573
  /**
5759
5574
  * Validates against syntax that React Compiler does not support.
5760
5575
  * @see https://eslint-react.xyz/docs/rules/unsupported-syntax
@@ -5775,6 +5590,11 @@ export interface Rules {
5775
5590
  * @see https://eslint-react.xyz/docs/rules/web-api-no-leaked-event-listener
5776
5591
  */
5777
5592
  'react/web-api-no-leaked-event-listener'?: Linter.RuleEntry<[]>;
5593
+ /**
5594
+ * Enforces that every 'fetch' in a component or custom hook has a corresponding 'AbortController' abort in the cleanup function.
5595
+ * @see https://eslint-react.xyz/docs/rules/web-api-no-leaked-fetch
5596
+ */
5597
+ 'react/web-api-no-leaked-fetch'?: Linter.RuleEntry<[]>;
5778
5598
  /**
5779
5599
  * Enforces that every 'setInterval' in a component or custom hook has a corresponding 'clearInterval'.
5780
5600
  * @see https://eslint-react.xyz/docs/rules/web-api-no-leaked-interval
@@ -5790,11 +5610,6 @@ export interface Rules {
5790
5610
  * @see https://eslint-react.xyz/docs/rules/web-api-no-leaked-timeout
5791
5611
  */
5792
5612
  'react/web-api-no-leaked-timeout'?: Linter.RuleEntry<[]>;
5793
- /**
5794
- * Disallows higher order functions that define components or hooks inside them.
5795
- * @see https://eslint-react.xyz/docs/rules/component-hook-factories
5796
- */
5797
- 'react/x-component-hook-factories'?: Linter.RuleEntry<[]>;
5798
5613
  /**
5799
5614
  * Validates usage of Error Boundaries instead of try/catch for errors in child components.
5800
5615
  * @see https://eslint-react.xyz/docs/rules/error-boundaries
@@ -5805,6 +5620,11 @@ export interface Rules {
5805
5620
  * @see https://github.com/facebook/react/issues/14920
5806
5621
  */
5807
5622
  'react/x-exhaustive-deps'?: Linter.RuleEntry<ReactXExhaustiveDeps>;
5623
+ /**
5624
+ * Validates against assignment/mutation of globals during render, part of ensuring that side effects must run outside of render.
5625
+ * @see https://eslint-react.xyz/docs/rules/globals
5626
+ */
5627
+ 'react/x-globals'?: Linter.RuleEntry<[]>;
5808
5628
  /**
5809
5629
  * Validates against mutating props, state, and other values that are immutable.
5810
5630
  * @see https://eslint-react.xyz/docs/rules/immutability
@@ -5945,11 +5765,6 @@ export interface Rules {
5945
5765
  * @see https://eslint-react.xyz/docs/rules/no-nested-lazy-component-declarations
5946
5766
  */
5947
5767
  'react/x-no-nested-lazy-component-declarations'?: Linter.RuleEntry<[]>;
5948
- /**
5949
- * Disallows 'shouldComponentUpdate' when extending 'React.PureComponent'.
5950
- * @see https://eslint-react.xyz/docs/rules/no-redundant-should-component-update
5951
- */
5952
- 'react/x-no-redundant-should-component-update'?: Linter.RuleEntry<[]>;
5953
5768
  /**
5954
5769
  * Disallows calling 'this.setState' in 'componentDidMount' outside functions such as callbacks.
5955
5770
  * @see https://eslint-react.xyz/docs/rules/no-set-state-in-component-did-mount
@@ -5965,16 +5780,6 @@ export interface Rules {
5965
5780
  * @see https://eslint-react.xyz/docs/rules/no-set-state-in-component-will-update
5966
5781
  */
5967
5782
  'react/x-no-set-state-in-component-will-update'?: Linter.RuleEntry<[]>;
5968
- /**
5969
- * Disallows unnecessary usage of 'useCallback'.
5970
- * @see https://eslint-react.xyz/docs/rules/no-unnecessary-use-callback
5971
- */
5972
- 'react/x-no-unnecessary-use-callback'?: Linter.RuleEntry<[]>;
5973
- /**
5974
- * Disallows unnecessary usage of 'useMemo'.
5975
- * @see https://eslint-react.xyz/docs/rules/no-unnecessary-use-memo
5976
- */
5977
- 'react/x-no-unnecessary-use-memo'?: Linter.RuleEntry<[]>;
5978
5783
  /**
5979
5784
  * Enforces that a function with the 'use' prefix uses at least one Hook inside it.
5980
5785
  * @see https://eslint-react.xyz/docs/rules/no-unnecessary-use-prefix
@@ -6016,7 +5821,7 @@ export interface Rules {
6016
5821
  */
6017
5822
  'react/x-no-unused-props'?: Linter.RuleEntry<[]>;
6018
5823
  /**
6019
- * Warns about unused class component state.
5824
+ * Warns about state variables that are defined but never used, or only used in effects.
6020
5825
  * @see https://eslint-react.xyz/docs/rules/no-unused-state
6021
5826
  */
6022
5827
  'react/x-no-unused-state'?: Linter.RuleEntry<[]>;
@@ -6025,16 +5830,6 @@ export interface Rules {
6025
5830
  * @see https://eslint-react.xyz/docs/rules/no-use-context
6026
5831
  */
6027
5832
  'react/x-no-use-context'?: Linter.RuleEntry<[]>;
6028
- /**
6029
- * Enforces destructuring assignment for component props and context.
6030
- * @see https://eslint-react.xyz/docs/rules/prefer-destructuring-assignment
6031
- */
6032
- 'react/x-prefer-destructuring-assignment'?: Linter.RuleEntry<[]>;
6033
- /**
6034
- * Enforces importing React via a namespace import.
6035
- * @see https://eslint-react.xyz/docs/rules/prefer-namespace-import
6036
- */
6037
- 'react/x-prefer-namespace-import'?: Linter.RuleEntry<[]>;
6038
5833
  /**
6039
5834
  * Validates that components and hooks are pure by checking that they do not call known-impure functions during render.
6040
5835
  * @see https://eslint-react.xyz/docs/rules/purity
@@ -6060,6 +5855,11 @@ export interface Rules {
6060
5855
  * @see https://eslint-react.xyz/docs/rules/set-state-in-render
6061
5856
  */
6062
5857
  'react/x-set-state-in-render'?: Linter.RuleEntry<[]>;
5858
+ /**
5859
+ * Validates that components are static, not recreated every render.
5860
+ * @see https://eslint-react.xyz/docs/rules/static-components
5861
+ */
5862
+ 'react/x-static-components'?: Linter.RuleEntry<[]>;
6063
5863
  /**
6064
5864
  * Validates against syntax that React Compiler does not support.
6065
5865
  * @see https://eslint-react.xyz/docs/rules/unsupported-syntax
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aiou/eslint-config",
3
- "version": "3.1.0",
3
+ "version": "3.1.1",
4
4
  "type": "module",
5
5
  "description": "eslint config for JW",
6
6
  "keywords": [],
@@ -39,7 +39,7 @@
39
39
  },
40
40
  "dependencies": {
41
41
  "@eslint-community/eslint-plugin-eslint-comments": "^4.7.1",
42
- "@eslint-react/eslint-plugin": "^4.2.3",
42
+ "@eslint-react/eslint-plugin": "^5.7.1",
43
43
  "@eslint/markdown": "^8.0.1",
44
44
  "@next/eslint-plugin-next": "^16.2.4",
45
45
  "@stylistic/eslint-plugin": "^5.10.0",
@@ -65,8 +65,8 @@
65
65
  "jsonc-eslint-parser": "^3.1.0",
66
66
  "local-pkg": "^1.1.2",
67
67
  "yaml-eslint-parser": "^2.0.0",
68
- "@aiou/eslint-ignore": "0.6.0",
69
- "@aiou/eslint-plugin-progress": "0.4.0"
68
+ "@aiou/eslint-plugin-progress": "0.4.0",
69
+ "@aiou/eslint-ignore": "0.6.1"
70
70
  },
71
71
  "devDependencies": {
72
72
  "@rollup/plugin-alias": "4.0.3",