@biscuittin/eslint-config 0.4.2 → 0.4.3
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.ts +237 -0
- package/dist/index.js +1 -1
- package/package.json +9 -9
- package/typegen.d.ts +237 -0
package/dist/index.d.ts
CHANGED
|
@@ -4791,6 +4791,124 @@ interface RuleOptions {
|
|
|
4791
4791
|
* Surfaces diagnostics from React Forget
|
|
4792
4792
|
*/
|
|
4793
4793
|
'react-compiler/react-compiler'?: Linter.RuleEntry<ReactCompilerReactCompiler>;
|
|
4794
|
+
/**
|
|
4795
|
+
* Verifies that automatic effect dependencies are compiled if opted-in
|
|
4796
|
+
*/
|
|
4797
|
+
'react-hooks/automatic-effect-dependencies'?: Linter.RuleEntry<ReactHooksAutomaticEffectDependencies>;
|
|
4798
|
+
/**
|
|
4799
|
+
* Validates against calling capitalized functions/methods instead of using JSX
|
|
4800
|
+
*/
|
|
4801
|
+
'react-hooks/capitalized-calls'?: Linter.RuleEntry<ReactHooksCapitalizedCalls>;
|
|
4802
|
+
/**
|
|
4803
|
+
* Validates against higher order functions defining nested components or hooks. Components and hooks should be defined at the module level
|
|
4804
|
+
*/
|
|
4805
|
+
'react-hooks/component-hook-factories'?: Linter.RuleEntry<ReactHooksComponentHookFactories>;
|
|
4806
|
+
/**
|
|
4807
|
+
* Validates the compiler configuration options
|
|
4808
|
+
*/
|
|
4809
|
+
'react-hooks/config'?: Linter.RuleEntry<ReactHooksConfig>;
|
|
4810
|
+
/**
|
|
4811
|
+
* Validates usage of error boundaries instead of try/catch for errors in child components
|
|
4812
|
+
*/
|
|
4813
|
+
'react-hooks/error-boundaries'?: Linter.RuleEntry<ReactHooksErrorBoundaries>;
|
|
4814
|
+
/**
|
|
4815
|
+
* verifies the list of dependencies for Hooks like useEffect and similar
|
|
4816
|
+
* @see https://github.com/facebook/react/issues/14920
|
|
4817
|
+
*/
|
|
4818
|
+
'react-hooks/exhaustive-deps'?: Linter.RuleEntry<ReactHooksExhaustiveDeps>;
|
|
4819
|
+
/**
|
|
4820
|
+
* Validates usage of fbt
|
|
4821
|
+
*/
|
|
4822
|
+
'react-hooks/fbt'?: Linter.RuleEntry<ReactHooksFbt>;
|
|
4823
|
+
/**
|
|
4824
|
+
* Validates usage of `fire`
|
|
4825
|
+
*/
|
|
4826
|
+
'react-hooks/fire'?: Linter.RuleEntry<ReactHooksFire>;
|
|
4827
|
+
/**
|
|
4828
|
+
* Validates configuration of [gating mode](https://react.dev/reference/react-compiler/gating)
|
|
4829
|
+
*/
|
|
4830
|
+
'react-hooks/gating'?: Linter.RuleEntry<ReactHooksGating>;
|
|
4831
|
+
/**
|
|
4832
|
+
* Validates against assignment/mutation of globals during render, part of ensuring that [side effects must render outside of render](https://react.dev/reference/rules/components-and-hooks-must-be-pure#side-effects-must-run-outside-of-render)
|
|
4833
|
+
*/
|
|
4834
|
+
'react-hooks/globals'?: Linter.RuleEntry<ReactHooksGlobals>;
|
|
4835
|
+
/**
|
|
4836
|
+
* Validates the rules of hooks
|
|
4837
|
+
*/
|
|
4838
|
+
'react-hooks/hooks'?: Linter.RuleEntry<ReactHooksHooks>;
|
|
4839
|
+
/**
|
|
4840
|
+
* Validates against mutating props, state, and other values that [are immutable](https://react.dev/reference/rules/components-and-hooks-must-be-pure#props-and-state-are-immutable)
|
|
4841
|
+
*/
|
|
4842
|
+
'react-hooks/immutability'?: Linter.RuleEntry<ReactHooksImmutability>;
|
|
4843
|
+
/**
|
|
4844
|
+
* Validates against usage of libraries which are incompatible with memoization (manual or automatic)
|
|
4845
|
+
*/
|
|
4846
|
+
'react-hooks/incompatible-library'?: Linter.RuleEntry<ReactHooksIncompatibleLibrary>;
|
|
4847
|
+
/**
|
|
4848
|
+
* Internal invariants
|
|
4849
|
+
*/
|
|
4850
|
+
'react-hooks/invariant'?: Linter.RuleEntry<ReactHooksInvariant>;
|
|
4851
|
+
/**
|
|
4852
|
+
* Validates that effect dependencies are memoized
|
|
4853
|
+
*/
|
|
4854
|
+
'react-hooks/memoized-effect-dependencies'?: Linter.RuleEntry<ReactHooksMemoizedEffectDependencies>;
|
|
4855
|
+
/**
|
|
4856
|
+
* Validates against deriving values from state in an effect
|
|
4857
|
+
*/
|
|
4858
|
+
'react-hooks/no-deriving-state-in-effects'?: Linter.RuleEntry<ReactHooksNoDerivingStateInEffects>;
|
|
4859
|
+
/**
|
|
4860
|
+
* Validates that existing manual memoized is preserved by the compiler. React Compiler will only compile components and hooks if its inference [matches or exceeds the existing manual memoization](https://react.dev/learn/react-compiler/introduction#what-should-i-do-about-usememo-usecallback-and-reactmemo)
|
|
4861
|
+
*/
|
|
4862
|
+
'react-hooks/preserve-manual-memoization'?: Linter.RuleEntry<ReactHooksPreserveManualMemoization>;
|
|
4863
|
+
/**
|
|
4864
|
+
* Validates that [components/hooks are pure](https://react.dev/reference/rules/components-and-hooks-must-be-pure) by checking that they do not call known-impure functions
|
|
4865
|
+
*/
|
|
4866
|
+
'react-hooks/purity'?: Linter.RuleEntry<ReactHooksPurity>;
|
|
4867
|
+
/**
|
|
4868
|
+
* Validates correct usage of refs, not reading/writing during render. See the "pitfalls" section in [`useRef()` usage](https://react.dev/reference/react/useRef#usage)
|
|
4869
|
+
*/
|
|
4870
|
+
'react-hooks/refs'?: Linter.RuleEntry<ReactHooksRefs>;
|
|
4871
|
+
/**
|
|
4872
|
+
* Validates against suppression of other rules
|
|
4873
|
+
*/
|
|
4874
|
+
'react-hooks/rule-suppression'?: Linter.RuleEntry<ReactHooksRuleSuppression>;
|
|
4875
|
+
/**
|
|
4876
|
+
* enforces the Rules of Hooks
|
|
4877
|
+
* @see https://react.dev/reference/rules/rules-of-hooks
|
|
4878
|
+
*/
|
|
4879
|
+
'react-hooks/rules-of-hooks'?: Linter.RuleEntry<ReactHooksRulesOfHooks>;
|
|
4880
|
+
/**
|
|
4881
|
+
* Validates against calling setState synchronously in an effect, which can lead to re-renders that degrade performance
|
|
4882
|
+
*/
|
|
4883
|
+
'react-hooks/set-state-in-effect'?: Linter.RuleEntry<ReactHooksSetStateInEffect>;
|
|
4884
|
+
/**
|
|
4885
|
+
* Validates against setting state during render, which can trigger additional renders and potential infinite render loops
|
|
4886
|
+
*/
|
|
4887
|
+
'react-hooks/set-state-in-render'?: Linter.RuleEntry<ReactHooksSetStateInRender>;
|
|
4888
|
+
/**
|
|
4889
|
+
* Validates that components are static, not recreated every render. Components that are recreated dynamically can reset state and trigger excessive re-rendering
|
|
4890
|
+
*/
|
|
4891
|
+
'react-hooks/static-components'?: Linter.RuleEntry<ReactHooksStaticComponents>;
|
|
4892
|
+
/**
|
|
4893
|
+
* Validates against invalid syntax
|
|
4894
|
+
*/
|
|
4895
|
+
'react-hooks/syntax'?: Linter.RuleEntry<ReactHooksSyntax>;
|
|
4896
|
+
/**
|
|
4897
|
+
* Unimplemented features
|
|
4898
|
+
*/
|
|
4899
|
+
'react-hooks/todo'?: Linter.RuleEntry<ReactHooksTodo>;
|
|
4900
|
+
/**
|
|
4901
|
+
* Validates against syntax that we do not plan to support in React Compiler
|
|
4902
|
+
*/
|
|
4903
|
+
'react-hooks/unsupported-syntax'?: Linter.RuleEntry<ReactHooksUnsupportedSyntax>;
|
|
4904
|
+
/**
|
|
4905
|
+
* Validates usage of the useMemo() hook against common mistakes. See [`useMemo()` docs](https://react.dev/reference/react/useMemo) for more information.
|
|
4906
|
+
*/
|
|
4907
|
+
'react-hooks/use-memo'?: Linter.RuleEntry<ReactHooksUseMemo>;
|
|
4908
|
+
/**
|
|
4909
|
+
* Validates that useMemos always return a value. See [`useMemo()` docs](https://react.dev/reference/react/useMemo) for more information.
|
|
4910
|
+
*/
|
|
4911
|
+
'react-hooks/void-use-memo'?: Linter.RuleEntry<ReactHooksVoidUseMemo>;
|
|
4794
4912
|
'react-refresh/only-export-components'?: Linter.RuleEntry<ReactRefreshOnlyExportComponents>;
|
|
4795
4913
|
/**
|
|
4796
4914
|
* disallow confusing quantifiers
|
|
@@ -13721,6 +13839,125 @@ type Radix = [] | [("always" | "as-needed")];
|
|
|
13721
13839
|
type ReactCompilerReactCompiler = [] | [{
|
|
13722
13840
|
[k: string]: unknown | undefined;
|
|
13723
13841
|
}];
|
|
13842
|
+
// ----- react-hooks/automatic-effect-dependencies -----
|
|
13843
|
+
type ReactHooksAutomaticEffectDependencies = [] | [{
|
|
13844
|
+
[k: string]: unknown | undefined;
|
|
13845
|
+
}];
|
|
13846
|
+
// ----- react-hooks/capitalized-calls -----
|
|
13847
|
+
type ReactHooksCapitalizedCalls = [] | [{
|
|
13848
|
+
[k: string]: unknown | undefined;
|
|
13849
|
+
}];
|
|
13850
|
+
// ----- react-hooks/component-hook-factories -----
|
|
13851
|
+
type ReactHooksComponentHookFactories = [] | [{
|
|
13852
|
+
[k: string]: unknown | undefined;
|
|
13853
|
+
}];
|
|
13854
|
+
// ----- react-hooks/config -----
|
|
13855
|
+
type ReactHooksConfig = [] | [{
|
|
13856
|
+
[k: string]: unknown | undefined;
|
|
13857
|
+
}];
|
|
13858
|
+
// ----- react-hooks/error-boundaries -----
|
|
13859
|
+
type ReactHooksErrorBoundaries = [] | [{
|
|
13860
|
+
[k: string]: unknown | undefined;
|
|
13861
|
+
}];
|
|
13862
|
+
// ----- react-hooks/exhaustive-deps -----
|
|
13863
|
+
type ReactHooksExhaustiveDeps = [] | [{
|
|
13864
|
+
additionalHooks?: string;
|
|
13865
|
+
enableDangerousAutofixThisMayCauseInfiniteLoops?: boolean;
|
|
13866
|
+
experimental_autoDependenciesHooks?: string[];
|
|
13867
|
+
requireExplicitEffectDeps?: boolean;
|
|
13868
|
+
}];
|
|
13869
|
+
// ----- react-hooks/fbt -----
|
|
13870
|
+
type ReactHooksFbt = [] | [{
|
|
13871
|
+
[k: string]: unknown | undefined;
|
|
13872
|
+
}];
|
|
13873
|
+
// ----- react-hooks/fire -----
|
|
13874
|
+
type ReactHooksFire = [] | [{
|
|
13875
|
+
[k: string]: unknown | undefined;
|
|
13876
|
+
}];
|
|
13877
|
+
// ----- react-hooks/gating -----
|
|
13878
|
+
type ReactHooksGating = [] | [{
|
|
13879
|
+
[k: string]: unknown | undefined;
|
|
13880
|
+
}];
|
|
13881
|
+
// ----- react-hooks/globals -----
|
|
13882
|
+
type ReactHooksGlobals = [] | [{
|
|
13883
|
+
[k: string]: unknown | undefined;
|
|
13884
|
+
}];
|
|
13885
|
+
// ----- react-hooks/hooks -----
|
|
13886
|
+
type ReactHooksHooks = [] | [{
|
|
13887
|
+
[k: string]: unknown | undefined;
|
|
13888
|
+
}];
|
|
13889
|
+
// ----- react-hooks/immutability -----
|
|
13890
|
+
type ReactHooksImmutability = [] | [{
|
|
13891
|
+
[k: string]: unknown | undefined;
|
|
13892
|
+
}];
|
|
13893
|
+
// ----- react-hooks/incompatible-library -----
|
|
13894
|
+
type ReactHooksIncompatibleLibrary = [] | [{
|
|
13895
|
+
[k: string]: unknown | undefined;
|
|
13896
|
+
}];
|
|
13897
|
+
// ----- react-hooks/invariant -----
|
|
13898
|
+
type ReactHooksInvariant = [] | [{
|
|
13899
|
+
[k: string]: unknown | undefined;
|
|
13900
|
+
}];
|
|
13901
|
+
// ----- react-hooks/memoized-effect-dependencies -----
|
|
13902
|
+
type ReactHooksMemoizedEffectDependencies = [] | [{
|
|
13903
|
+
[k: string]: unknown | undefined;
|
|
13904
|
+
}];
|
|
13905
|
+
// ----- react-hooks/no-deriving-state-in-effects -----
|
|
13906
|
+
type ReactHooksNoDerivingStateInEffects = [] | [{
|
|
13907
|
+
[k: string]: unknown | undefined;
|
|
13908
|
+
}];
|
|
13909
|
+
// ----- react-hooks/preserve-manual-memoization -----
|
|
13910
|
+
type ReactHooksPreserveManualMemoization = [] | [{
|
|
13911
|
+
[k: string]: unknown | undefined;
|
|
13912
|
+
}];
|
|
13913
|
+
// ----- react-hooks/purity -----
|
|
13914
|
+
type ReactHooksPurity = [] | [{
|
|
13915
|
+
[k: string]: unknown | undefined;
|
|
13916
|
+
}];
|
|
13917
|
+
// ----- react-hooks/refs -----
|
|
13918
|
+
type ReactHooksRefs = [] | [{
|
|
13919
|
+
[k: string]: unknown | undefined;
|
|
13920
|
+
}];
|
|
13921
|
+
// ----- react-hooks/rule-suppression -----
|
|
13922
|
+
type ReactHooksRuleSuppression = [] | [{
|
|
13923
|
+
[k: string]: unknown | undefined;
|
|
13924
|
+
}];
|
|
13925
|
+
// ----- react-hooks/rules-of-hooks -----
|
|
13926
|
+
type ReactHooksRulesOfHooks = [] | [{
|
|
13927
|
+
additionalHooks?: string;
|
|
13928
|
+
}];
|
|
13929
|
+
// ----- react-hooks/set-state-in-effect -----
|
|
13930
|
+
type ReactHooksSetStateInEffect = [] | [{
|
|
13931
|
+
[k: string]: unknown | undefined;
|
|
13932
|
+
}];
|
|
13933
|
+
// ----- react-hooks/set-state-in-render -----
|
|
13934
|
+
type ReactHooksSetStateInRender = [] | [{
|
|
13935
|
+
[k: string]: unknown | undefined;
|
|
13936
|
+
}];
|
|
13937
|
+
// ----- react-hooks/static-components -----
|
|
13938
|
+
type ReactHooksStaticComponents = [] | [{
|
|
13939
|
+
[k: string]: unknown | undefined;
|
|
13940
|
+
}];
|
|
13941
|
+
// ----- react-hooks/syntax -----
|
|
13942
|
+
type ReactHooksSyntax = [] | [{
|
|
13943
|
+
[k: string]: unknown | undefined;
|
|
13944
|
+
}];
|
|
13945
|
+
// ----- react-hooks/todo -----
|
|
13946
|
+
type ReactHooksTodo = [] | [{
|
|
13947
|
+
[k: string]: unknown | undefined;
|
|
13948
|
+
}];
|
|
13949
|
+
// ----- react-hooks/unsupported-syntax -----
|
|
13950
|
+
type ReactHooksUnsupportedSyntax = [] | [{
|
|
13951
|
+
[k: string]: unknown | undefined;
|
|
13952
|
+
}];
|
|
13953
|
+
// ----- react-hooks/use-memo -----
|
|
13954
|
+
type ReactHooksUseMemo = [] | [{
|
|
13955
|
+
[k: string]: unknown | undefined;
|
|
13956
|
+
}];
|
|
13957
|
+
// ----- react-hooks/void-use-memo -----
|
|
13958
|
+
type ReactHooksVoidUseMemo = [] | [{
|
|
13959
|
+
[k: string]: unknown | undefined;
|
|
13960
|
+
}];
|
|
13724
13961
|
// ----- react-refresh/only-export-components -----
|
|
13725
13962
|
type ReactRefreshOnlyExportComponents = [] | [{
|
|
13726
13963
|
allowExportNames?: string[];
|
package/dist/index.js
CHANGED
|
@@ -24,7 +24,7 @@ import { eslint_plugin_jsx_a11y_minimal } from "@eslint-sukka/eslint-plugin-reac
|
|
|
24
24
|
import eslintPluginStylistic from "@stylistic/eslint-plugin";
|
|
25
25
|
import * as eslintPluginReactCompiler from "eslint-plugin-react-compiler";
|
|
26
26
|
import eslintPluginReactDom from "eslint-plugin-react-dom";
|
|
27
|
-
import
|
|
27
|
+
import eslintPluginReactHooks from "eslint-plugin-react-hooks";
|
|
28
28
|
import eslintPluginReactHooksExtra from "eslint-plugin-react-hooks-extra";
|
|
29
29
|
import eslintPluginReactNamingConvention from "eslint-plugin-react-naming-convention";
|
|
30
30
|
import eslintPluginReactWebApi from "eslint-plugin-react-web-api";
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@biscuittin/eslint-config",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.4.
|
|
4
|
+
"version": "0.4.3",
|
|
5
5
|
"description": "A collection of ESLint configurations for Biscuit Tin projects.",
|
|
6
6
|
"author": "Biscuit Tin <opensource@biscuitt.in>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
"@eslint-sukka/eslint-plugin-react-jsx-a11y": "^7.3.3",
|
|
60
60
|
"@eslint/js": "^9.37.0",
|
|
61
61
|
"@eslint/json": "^0.13.2",
|
|
62
|
-
"@next/eslint-plugin-next": "^15.5.
|
|
62
|
+
"@next/eslint-plugin-next": "^15.5.5",
|
|
63
63
|
"@package-json/types": "^0.0.12",
|
|
64
64
|
"@stylistic/eslint-plugin": "^5.4.0",
|
|
65
65
|
"eslint-config-flat-gitignore": "^2.1.0",
|
|
@@ -74,13 +74,13 @@
|
|
|
74
74
|
"eslint-plugin-n": "^17.23.1",
|
|
75
75
|
"eslint-plugin-perfectionist": "^4.15.1",
|
|
76
76
|
"eslint-plugin-react-compiler": "19.1.0-rc.2",
|
|
77
|
-
"eslint-plugin-react-dom": "^2.
|
|
77
|
+
"eslint-plugin-react-dom": "^2.2.1",
|
|
78
78
|
"eslint-plugin-react-hooks": "^7.0.0",
|
|
79
|
-
"eslint-plugin-react-hooks-extra": "^2.
|
|
80
|
-
"eslint-plugin-react-naming-convention": "^2.
|
|
79
|
+
"eslint-plugin-react-hooks-extra": "^2.2.1",
|
|
80
|
+
"eslint-plugin-react-naming-convention": "^2.2.1",
|
|
81
81
|
"eslint-plugin-react-refresh": "^0.4.23",
|
|
82
|
-
"eslint-plugin-react-web-api": "^2.
|
|
83
|
-
"eslint-plugin-react-x": "^2.
|
|
82
|
+
"eslint-plugin-react-web-api": "^2.2.1",
|
|
83
|
+
"eslint-plugin-react-x": "^2.2.1",
|
|
84
84
|
"eslint-plugin-regexp": "^2.10.0",
|
|
85
85
|
"eslint-plugin-unicorn": "^61.0.2",
|
|
86
86
|
"eslint-plugin-unused-imports": "^4.2.0",
|
|
@@ -89,11 +89,11 @@
|
|
|
89
89
|
"jsonc-eslint-parser": "^2.4.1",
|
|
90
90
|
"local-pkg": "^1.1.2",
|
|
91
91
|
"ts-api-utils": "^2.1.0",
|
|
92
|
-
"typescript-eslint": "^8.46.
|
|
92
|
+
"typescript-eslint": "^8.46.1"
|
|
93
93
|
},
|
|
94
94
|
"devDependencies": {
|
|
95
95
|
"@eslint/config-inspector": "^1.3.0",
|
|
96
|
-
"@typescript-eslint/parser": "^8.46.
|
|
96
|
+
"@typescript-eslint/parser": "^8.46.1",
|
|
97
97
|
"dprint": "^0.50.2",
|
|
98
98
|
"eslint": "^9.37.0",
|
|
99
99
|
"tailwindcss": "^4.1.14",
|
package/typegen.d.ts
CHANGED
|
@@ -4789,6 +4789,124 @@ export interface RuleOptions {
|
|
|
4789
4789
|
* Surfaces diagnostics from React Forget
|
|
4790
4790
|
*/
|
|
4791
4791
|
'react-compiler/react-compiler'?: Linter.RuleEntry<ReactCompilerReactCompiler>
|
|
4792
|
+
/**
|
|
4793
|
+
* Verifies that automatic effect dependencies are compiled if opted-in
|
|
4794
|
+
*/
|
|
4795
|
+
'react-hooks/automatic-effect-dependencies'?: Linter.RuleEntry<ReactHooksAutomaticEffectDependencies>
|
|
4796
|
+
/**
|
|
4797
|
+
* Validates against calling capitalized functions/methods instead of using JSX
|
|
4798
|
+
*/
|
|
4799
|
+
'react-hooks/capitalized-calls'?: Linter.RuleEntry<ReactHooksCapitalizedCalls>
|
|
4800
|
+
/**
|
|
4801
|
+
* Validates against higher order functions defining nested components or hooks. Components and hooks should be defined at the module level
|
|
4802
|
+
*/
|
|
4803
|
+
'react-hooks/component-hook-factories'?: Linter.RuleEntry<ReactHooksComponentHookFactories>
|
|
4804
|
+
/**
|
|
4805
|
+
* Validates the compiler configuration options
|
|
4806
|
+
*/
|
|
4807
|
+
'react-hooks/config'?: Linter.RuleEntry<ReactHooksConfig>
|
|
4808
|
+
/**
|
|
4809
|
+
* Validates usage of error boundaries instead of try/catch for errors in child components
|
|
4810
|
+
*/
|
|
4811
|
+
'react-hooks/error-boundaries'?: Linter.RuleEntry<ReactHooksErrorBoundaries>
|
|
4812
|
+
/**
|
|
4813
|
+
* verifies the list of dependencies for Hooks like useEffect and similar
|
|
4814
|
+
* @see https://github.com/facebook/react/issues/14920
|
|
4815
|
+
*/
|
|
4816
|
+
'react-hooks/exhaustive-deps'?: Linter.RuleEntry<ReactHooksExhaustiveDeps>
|
|
4817
|
+
/**
|
|
4818
|
+
* Validates usage of fbt
|
|
4819
|
+
*/
|
|
4820
|
+
'react-hooks/fbt'?: Linter.RuleEntry<ReactHooksFbt>
|
|
4821
|
+
/**
|
|
4822
|
+
* Validates usage of `fire`
|
|
4823
|
+
*/
|
|
4824
|
+
'react-hooks/fire'?: Linter.RuleEntry<ReactHooksFire>
|
|
4825
|
+
/**
|
|
4826
|
+
* Validates configuration of [gating mode](https://react.dev/reference/react-compiler/gating)
|
|
4827
|
+
*/
|
|
4828
|
+
'react-hooks/gating'?: Linter.RuleEntry<ReactHooksGating>
|
|
4829
|
+
/**
|
|
4830
|
+
* Validates against assignment/mutation of globals during render, part of ensuring that [side effects must render outside of render](https://react.dev/reference/rules/components-and-hooks-must-be-pure#side-effects-must-run-outside-of-render)
|
|
4831
|
+
*/
|
|
4832
|
+
'react-hooks/globals'?: Linter.RuleEntry<ReactHooksGlobals>
|
|
4833
|
+
/**
|
|
4834
|
+
* Validates the rules of hooks
|
|
4835
|
+
*/
|
|
4836
|
+
'react-hooks/hooks'?: Linter.RuleEntry<ReactHooksHooks>
|
|
4837
|
+
/**
|
|
4838
|
+
* Validates against mutating props, state, and other values that [are immutable](https://react.dev/reference/rules/components-and-hooks-must-be-pure#props-and-state-are-immutable)
|
|
4839
|
+
*/
|
|
4840
|
+
'react-hooks/immutability'?: Linter.RuleEntry<ReactHooksImmutability>
|
|
4841
|
+
/**
|
|
4842
|
+
* Validates against usage of libraries which are incompatible with memoization (manual or automatic)
|
|
4843
|
+
*/
|
|
4844
|
+
'react-hooks/incompatible-library'?: Linter.RuleEntry<ReactHooksIncompatibleLibrary>
|
|
4845
|
+
/**
|
|
4846
|
+
* Internal invariants
|
|
4847
|
+
*/
|
|
4848
|
+
'react-hooks/invariant'?: Linter.RuleEntry<ReactHooksInvariant>
|
|
4849
|
+
/**
|
|
4850
|
+
* Validates that effect dependencies are memoized
|
|
4851
|
+
*/
|
|
4852
|
+
'react-hooks/memoized-effect-dependencies'?: Linter.RuleEntry<ReactHooksMemoizedEffectDependencies>
|
|
4853
|
+
/**
|
|
4854
|
+
* Validates against deriving values from state in an effect
|
|
4855
|
+
*/
|
|
4856
|
+
'react-hooks/no-deriving-state-in-effects'?: Linter.RuleEntry<ReactHooksNoDerivingStateInEffects>
|
|
4857
|
+
/**
|
|
4858
|
+
* Validates that existing manual memoized is preserved by the compiler. React Compiler will only compile components and hooks if its inference [matches or exceeds the existing manual memoization](https://react.dev/learn/react-compiler/introduction#what-should-i-do-about-usememo-usecallback-and-reactmemo)
|
|
4859
|
+
*/
|
|
4860
|
+
'react-hooks/preserve-manual-memoization'?: Linter.RuleEntry<ReactHooksPreserveManualMemoization>
|
|
4861
|
+
/**
|
|
4862
|
+
* Validates that [components/hooks are pure](https://react.dev/reference/rules/components-and-hooks-must-be-pure) by checking that they do not call known-impure functions
|
|
4863
|
+
*/
|
|
4864
|
+
'react-hooks/purity'?: Linter.RuleEntry<ReactHooksPurity>
|
|
4865
|
+
/**
|
|
4866
|
+
* Validates correct usage of refs, not reading/writing during render. See the "pitfalls" section in [`useRef()` usage](https://react.dev/reference/react/useRef#usage)
|
|
4867
|
+
*/
|
|
4868
|
+
'react-hooks/refs'?: Linter.RuleEntry<ReactHooksRefs>
|
|
4869
|
+
/**
|
|
4870
|
+
* Validates against suppression of other rules
|
|
4871
|
+
*/
|
|
4872
|
+
'react-hooks/rule-suppression'?: Linter.RuleEntry<ReactHooksRuleSuppression>
|
|
4873
|
+
/**
|
|
4874
|
+
* enforces the Rules of Hooks
|
|
4875
|
+
* @see https://react.dev/reference/rules/rules-of-hooks
|
|
4876
|
+
*/
|
|
4877
|
+
'react-hooks/rules-of-hooks'?: Linter.RuleEntry<ReactHooksRulesOfHooks>
|
|
4878
|
+
/**
|
|
4879
|
+
* Validates against calling setState synchronously in an effect, which can lead to re-renders that degrade performance
|
|
4880
|
+
*/
|
|
4881
|
+
'react-hooks/set-state-in-effect'?: Linter.RuleEntry<ReactHooksSetStateInEffect>
|
|
4882
|
+
/**
|
|
4883
|
+
* Validates against setting state during render, which can trigger additional renders and potential infinite render loops
|
|
4884
|
+
*/
|
|
4885
|
+
'react-hooks/set-state-in-render'?: Linter.RuleEntry<ReactHooksSetStateInRender>
|
|
4886
|
+
/**
|
|
4887
|
+
* Validates that components are static, not recreated every render. Components that are recreated dynamically can reset state and trigger excessive re-rendering
|
|
4888
|
+
*/
|
|
4889
|
+
'react-hooks/static-components'?: Linter.RuleEntry<ReactHooksStaticComponents>
|
|
4890
|
+
/**
|
|
4891
|
+
* Validates against invalid syntax
|
|
4892
|
+
*/
|
|
4893
|
+
'react-hooks/syntax'?: Linter.RuleEntry<ReactHooksSyntax>
|
|
4894
|
+
/**
|
|
4895
|
+
* Unimplemented features
|
|
4896
|
+
*/
|
|
4897
|
+
'react-hooks/todo'?: Linter.RuleEntry<ReactHooksTodo>
|
|
4898
|
+
/**
|
|
4899
|
+
* Validates against syntax that we do not plan to support in React Compiler
|
|
4900
|
+
*/
|
|
4901
|
+
'react-hooks/unsupported-syntax'?: Linter.RuleEntry<ReactHooksUnsupportedSyntax>
|
|
4902
|
+
/**
|
|
4903
|
+
* Validates usage of the useMemo() hook against common mistakes. See [`useMemo()` docs](https://react.dev/reference/react/useMemo) for more information.
|
|
4904
|
+
*/
|
|
4905
|
+
'react-hooks/use-memo'?: Linter.RuleEntry<ReactHooksUseMemo>
|
|
4906
|
+
/**
|
|
4907
|
+
* Validates that useMemos always return a value. See [`useMemo()` docs](https://react.dev/reference/react/useMemo) for more information.
|
|
4908
|
+
*/
|
|
4909
|
+
'react-hooks/void-use-memo'?: Linter.RuleEntry<ReactHooksVoidUseMemo>
|
|
4792
4910
|
'react-refresh/only-export-components'?: Linter.RuleEntry<ReactRefreshOnlyExportComponents>
|
|
4793
4911
|
/**
|
|
4794
4912
|
* disallow confusing quantifiers
|
|
@@ -15541,6 +15659,125 @@ type Radix = []|[("always" | "as-needed")]
|
|
|
15541
15659
|
type ReactCompilerReactCompiler = []|[{
|
|
15542
15660
|
[k: string]: unknown | undefined
|
|
15543
15661
|
}]
|
|
15662
|
+
// ----- react-hooks/automatic-effect-dependencies -----
|
|
15663
|
+
type ReactHooksAutomaticEffectDependencies = []|[{
|
|
15664
|
+
[k: string]: unknown | undefined
|
|
15665
|
+
}]
|
|
15666
|
+
// ----- react-hooks/capitalized-calls -----
|
|
15667
|
+
type ReactHooksCapitalizedCalls = []|[{
|
|
15668
|
+
[k: string]: unknown | undefined
|
|
15669
|
+
}]
|
|
15670
|
+
// ----- react-hooks/component-hook-factories -----
|
|
15671
|
+
type ReactHooksComponentHookFactories = []|[{
|
|
15672
|
+
[k: string]: unknown | undefined
|
|
15673
|
+
}]
|
|
15674
|
+
// ----- react-hooks/config -----
|
|
15675
|
+
type ReactHooksConfig = []|[{
|
|
15676
|
+
[k: string]: unknown | undefined
|
|
15677
|
+
}]
|
|
15678
|
+
// ----- react-hooks/error-boundaries -----
|
|
15679
|
+
type ReactHooksErrorBoundaries = []|[{
|
|
15680
|
+
[k: string]: unknown | undefined
|
|
15681
|
+
}]
|
|
15682
|
+
// ----- react-hooks/exhaustive-deps -----
|
|
15683
|
+
type ReactHooksExhaustiveDeps = []|[{
|
|
15684
|
+
additionalHooks?: string
|
|
15685
|
+
enableDangerousAutofixThisMayCauseInfiniteLoops?: boolean
|
|
15686
|
+
experimental_autoDependenciesHooks?: string[]
|
|
15687
|
+
requireExplicitEffectDeps?: boolean
|
|
15688
|
+
}]
|
|
15689
|
+
// ----- react-hooks/fbt -----
|
|
15690
|
+
type ReactHooksFbt = []|[{
|
|
15691
|
+
[k: string]: unknown | undefined
|
|
15692
|
+
}]
|
|
15693
|
+
// ----- react-hooks/fire -----
|
|
15694
|
+
type ReactHooksFire = []|[{
|
|
15695
|
+
[k: string]: unknown | undefined
|
|
15696
|
+
}]
|
|
15697
|
+
// ----- react-hooks/gating -----
|
|
15698
|
+
type ReactHooksGating = []|[{
|
|
15699
|
+
[k: string]: unknown | undefined
|
|
15700
|
+
}]
|
|
15701
|
+
// ----- react-hooks/globals -----
|
|
15702
|
+
type ReactHooksGlobals = []|[{
|
|
15703
|
+
[k: string]: unknown | undefined
|
|
15704
|
+
}]
|
|
15705
|
+
// ----- react-hooks/hooks -----
|
|
15706
|
+
type ReactHooksHooks = []|[{
|
|
15707
|
+
[k: string]: unknown | undefined
|
|
15708
|
+
}]
|
|
15709
|
+
// ----- react-hooks/immutability -----
|
|
15710
|
+
type ReactHooksImmutability = []|[{
|
|
15711
|
+
[k: string]: unknown | undefined
|
|
15712
|
+
}]
|
|
15713
|
+
// ----- react-hooks/incompatible-library -----
|
|
15714
|
+
type ReactHooksIncompatibleLibrary = []|[{
|
|
15715
|
+
[k: string]: unknown | undefined
|
|
15716
|
+
}]
|
|
15717
|
+
// ----- react-hooks/invariant -----
|
|
15718
|
+
type ReactHooksInvariant = []|[{
|
|
15719
|
+
[k: string]: unknown | undefined
|
|
15720
|
+
}]
|
|
15721
|
+
// ----- react-hooks/memoized-effect-dependencies -----
|
|
15722
|
+
type ReactHooksMemoizedEffectDependencies = []|[{
|
|
15723
|
+
[k: string]: unknown | undefined
|
|
15724
|
+
}]
|
|
15725
|
+
// ----- react-hooks/no-deriving-state-in-effects -----
|
|
15726
|
+
type ReactHooksNoDerivingStateInEffects = []|[{
|
|
15727
|
+
[k: string]: unknown | undefined
|
|
15728
|
+
}]
|
|
15729
|
+
// ----- react-hooks/preserve-manual-memoization -----
|
|
15730
|
+
type ReactHooksPreserveManualMemoization = []|[{
|
|
15731
|
+
[k: string]: unknown | undefined
|
|
15732
|
+
}]
|
|
15733
|
+
// ----- react-hooks/purity -----
|
|
15734
|
+
type ReactHooksPurity = []|[{
|
|
15735
|
+
[k: string]: unknown | undefined
|
|
15736
|
+
}]
|
|
15737
|
+
// ----- react-hooks/refs -----
|
|
15738
|
+
type ReactHooksRefs = []|[{
|
|
15739
|
+
[k: string]: unknown | undefined
|
|
15740
|
+
}]
|
|
15741
|
+
// ----- react-hooks/rule-suppression -----
|
|
15742
|
+
type ReactHooksRuleSuppression = []|[{
|
|
15743
|
+
[k: string]: unknown | undefined
|
|
15744
|
+
}]
|
|
15745
|
+
// ----- react-hooks/rules-of-hooks -----
|
|
15746
|
+
type ReactHooksRulesOfHooks = []|[{
|
|
15747
|
+
additionalHooks?: string
|
|
15748
|
+
}]
|
|
15749
|
+
// ----- react-hooks/set-state-in-effect -----
|
|
15750
|
+
type ReactHooksSetStateInEffect = []|[{
|
|
15751
|
+
[k: string]: unknown | undefined
|
|
15752
|
+
}]
|
|
15753
|
+
// ----- react-hooks/set-state-in-render -----
|
|
15754
|
+
type ReactHooksSetStateInRender = []|[{
|
|
15755
|
+
[k: string]: unknown | undefined
|
|
15756
|
+
}]
|
|
15757
|
+
// ----- react-hooks/static-components -----
|
|
15758
|
+
type ReactHooksStaticComponents = []|[{
|
|
15759
|
+
[k: string]: unknown | undefined
|
|
15760
|
+
}]
|
|
15761
|
+
// ----- react-hooks/syntax -----
|
|
15762
|
+
type ReactHooksSyntax = []|[{
|
|
15763
|
+
[k: string]: unknown | undefined
|
|
15764
|
+
}]
|
|
15765
|
+
// ----- react-hooks/todo -----
|
|
15766
|
+
type ReactHooksTodo = []|[{
|
|
15767
|
+
[k: string]: unknown | undefined
|
|
15768
|
+
}]
|
|
15769
|
+
// ----- react-hooks/unsupported-syntax -----
|
|
15770
|
+
type ReactHooksUnsupportedSyntax = []|[{
|
|
15771
|
+
[k: string]: unknown | undefined
|
|
15772
|
+
}]
|
|
15773
|
+
// ----- react-hooks/use-memo -----
|
|
15774
|
+
type ReactHooksUseMemo = []|[{
|
|
15775
|
+
[k: string]: unknown | undefined
|
|
15776
|
+
}]
|
|
15777
|
+
// ----- react-hooks/void-use-memo -----
|
|
15778
|
+
type ReactHooksVoidUseMemo = []|[{
|
|
15779
|
+
[k: string]: unknown | undefined
|
|
15780
|
+
}]
|
|
15544
15781
|
// ----- react-refresh/only-export-components -----
|
|
15545
15782
|
type ReactRefreshOnlyExportComponents = []|[{
|
|
15546
15783
|
allowExportNames?: string[]
|