@@ -11,11 +11,71 @@ module.exports = {
1111
1212 rules : {
1313 // Enforce Rules of Hooks
14- // https://github.com/facebook/react/blob/c11015ff4f610ac2924d1fc6d569a17657a404fd/packages/ eslint-plugin-react-hooks/src/RulesOfHooks.js
14+ // https://react.dev/reference/ eslint-plugin-react-hooks/lints/rules-of-hooks
1515 'react-hooks/rules-of-hooks' : 'error' ,
1616
1717 // Verify the list of the dependencies for Hooks like useEffect and similar
18- // https://github.com/facebook/react/blob/1204c789776cb01fbaf3e9f032e7e2ba85a44137/packages/ eslint-plugin-react-hooks/src/ExhaustiveDeps.js
18+ // https://react.dev/reference/ eslint-plugin-react-hooks/lints/exhaustive-deps
1919 'react-hooks/exhaustive-deps' : 'error' ,
20+
21+ // Validates higher order functions defining nested components or hooks
22+ // https://react.dev/reference/eslint-plugin-react-hooks/lints/component-hook-factories
23+ 'react-hooks/component-hook-factories' : 'error' ,
24+
25+ // Validates the compiler configuration options
26+ // https://react.dev/reference/eslint-plugin-react-hooks/lints/config
27+ 'react-hooks/config' : 'error' ,
28+
29+ // Validates usage of Error Boundaries instead of try/catch for child errors
30+ // https://react.dev/reference/eslint-plugin-react-hooks/lints/error-boundaries
31+ 'react-hooks/error-boundaries' : 'error' ,
32+
33+ // Validates configuration of gating mode
34+ // https://react.dev/reference/eslint-plugin-react-hooks/lints/gating
35+ 'react-hooks/gating' : 'error' ,
36+
37+ // Validates against assignment/mutation of globals during render
38+ // https://react.dev/reference/eslint-plugin-react-hooks/lints/globals
39+ 'react-hooks/globals' : 'error' ,
40+
41+ // Validates against mutating props, state, and other immutable values
42+ // https://react.dev/reference/eslint-plugin-react-hooks/lints/immutability
43+ 'react-hooks/immutability' : 'error' ,
44+
45+ // Validates against usage of libraries which are incompatible with memoization
46+ // https://react.dev/reference/eslint-plugin-react-hooks/lints/incompatible-library
47+ 'react-hooks/incompatible-library' : 'warn' ,
48+
49+ // Validates that existing manual memoization is preserved by the compiler
50+ // https://react.dev/reference/eslint-plugin-react-hooks/lints/preserve-manual-memoization
51+ 'react-hooks/preserve-manual-memoization' : 'error' ,
52+
53+ // Validates that existing manual memoization is preserved by the compiler
54+ // https://react.dev/reference/eslint-plugin-react-hooks/lints/purity
55+ 'react-hooks/purity' : 'error' ,
56+
57+ // Validates correct usage of refs, not reading/writing during render
58+ // https://react.dev/reference/eslint-plugin-react-hooks/lints/refs
59+ 'react-hooks/refs' : 'error' ,
60+
61+ // Validates against calling setState synchronously in an effect
62+ // https://react.dev/reference/eslint-plugin-react-hooks/lints/set-state-in-effect
63+ 'react-hooks/set-state-in-effect' : 'error' ,
64+
65+ // Validates against setting state during render
66+ // https://react.dev/reference/eslint-plugin-react-hooks/lints/set-state-in-render
67+ 'react-hooks/set-state-in-render' : 'error' ,
68+
69+ // Validates that components are static, not recreated every render
70+ // https://react.dev/reference/eslint-plugin-react-hooks/lints/static-components
71+ 'react-hooks/static-components' : 'error' ,
72+
73+ // Validates against syntax that React Compiler does not support
74+ // https://react.dev/reference/eslint-plugin-react-hooks/lints/unsupported-syntax
75+ 'react-hooks/unsupported-syntax' : 'warn' ,
76+
77+ // Validates usage of the `useMemo` hook without a return value
78+ // https://react.dev/reference/eslint-plugin-react-hooks/lints/use-memo
79+ 'react-hooks/use-memo' : 'error' ,
2080 } ,
2181} ;
0 commit comments