|
7 | 7 | "plugin:import/recommended", |
8 | 8 | "plugin:@eslint-community/eslint-comments/recommended", |
9 | 9 | "plugin:react/recommended", |
10 | | - "plugin:react-hooks/recommended-legacy", |
| 10 | + "plugin:react-hooks/recommended-latest", |
11 | 11 | "plugin:prettier/recommended", |
12 | 12 | "plugin:jsx-a11y/recommended", |
13 | 13 | "plugin:jsdoc/recommended", |
|
216 | 216 | "react/no-unused-prop-types": "error", |
217 | 217 | "react/react-in-jsx-scope": "off", |
218 | 218 | "react/self-closing-comp": "error", |
219 | | - "react-hooks/react-compiler": [ |
220 | | - "error", |
221 | | - { |
222 | | - "environment": { |
223 | | - "enableTreatRefLikeIdentifiersAsRefs": true, |
224 | | - "validateRefAccessDuringRender": false |
225 | | - } |
226 | | - } |
227 | | - ], |
| 219 | + "react-hooks/config": "error", |
| 220 | + "react-hooks/error-boundaries": "error", |
| 221 | + "react-hooks/component-hook-factories": "error", |
| 222 | + "react-hooks/gating": "error", |
| 223 | + "react-hooks/globals": "error", |
| 224 | + "react-hooks/immutability": "error", |
| 225 | + "react-hooks/preserve-manual-memoization": "error", |
| 226 | + "react-hooks/purity": "error", |
| 227 | + "react-hooks/refs": "error", |
| 228 | + "react-hooks/set-state-in-effect": "error", |
| 229 | + "react-hooks/set-state-in-render": "error", |
| 230 | + "react-hooks/static-components": "error", |
| 231 | + "react-hooks/unsupported-syntax": "warn", |
| 232 | + "react-hooks/use-memo": "error", |
| 233 | + "react-hooks/incompatible-library": "warn", |
228 | 234 | "import/no-extraneous-dependencies": "error", |
229 | 235 | "import/no-unresolved": "error", |
230 | 236 | "import/order": [ |
|
435 | 441 | "rules": { |
436 | 442 | "@eslint-community/eslint-comments/require-description": "off", |
437 | 443 | "react/prop-types": "off", |
438 | | - "react-hooks/react-compiler": "off", |
| 444 | + "react-hooks/globals": "off", |
| 445 | + "react-hooks/immutability": "off", |
439 | 446 | "jest/no-hooks": "off", |
440 | 447 | "jest/no-untyped-mock-factory": "off", |
441 | 448 | "jest/max-expects": "off", |
|
957 | 964 | "packages/story-editor/src/components/videoTrim/useVideoNode.js", |
958 | 965 | "packages/transform/src/useTransformHandler.ts", |
959 | 966 | "packages/wp-story-editor/src/components/fontCheck/index.js" |
960 | | - |
961 | 967 | ], |
962 | 968 | "rules": { |
963 | | - "react-hooks/react-compiler": "off" |
| 969 | + "react-hooks/refs": "off" |
964 | 970 | } |
965 | 971 | } |
966 | 972 | ] |
|
0 commit comments