Skip to content

Commit eda3c23

Browse files
committedSep 20, 2024··
Upgrade to eslint-plugin-react-hooks RC, remove fixupPluginRules
Ref: facebook/react#28313 (comment)
1 parent 8199672 commit eda3c23

File tree

3 files changed

+14
-15
lines changed

3 files changed

+14
-15
lines changed
 

‎index.js

+1-12
Original file line numberDiff line numberDiff line change
@@ -515,18 +515,7 @@ const configArray = [
515515
'import-x': eslintImportX,
516516
'jsx-a11y': jsxA11y,
517517
'react-x': reactX,
518-
'react-hooks':
519-
// Fix eslint-plugin-react-hooks for ESLint 9
520-
//
521-
// TODO: Remove this once eslint-plugin-react-hooks fully
522-
// supports ESLint 9
523-
// - https://github.com/facebook/react/pull/30774
524-
// - https://github.com/facebook/react/issues/28313#issuecomment-2069701429
525-
fixupPluginRules(
526-
/** @type {import('@eslint/compat').FixupPluginDefinition} */ (
527-
reactHooks
528-
),
529-
),
518+
'react-hooks': reactHooks,
530519
react: fixupPluginRules(react),
531520
security,
532521
sonarjs: {

‎package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
"eslint-plugin-import-x": "4.2.1",
4646
"eslint-plugin-jsx-a11y": "6.10.0",
4747
"eslint-plugin-react": "7.36.1",
48-
"eslint-plugin-react-hooks": "4.6.2",
48+
"eslint-plugin-react-hooks": "5.1.0-rc-e740d4b1-20240919",
4949
"eslint-plugin-react-x": "1.14.1",
5050
"eslint-plugin-security": "3.0.1",
5151
"eslint-plugin-sonarjs": "1.0.4",

‎pnpm-lock.yaml

+12-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)
Please sign in to comment.