-
Notifications
You must be signed in to change notification settings - Fork 4.7k
ESLint: Replace eslint-plugin-react-compiler with eslint-plugin-react-hooks
#69962
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: trunk
Are you sure you want to change the base?
Conversation
|
Size Change: 0 B Total Size: 1.87 MB ℹ️ View Unchanged
|
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
|
@tyxla Thank you for the feedback! I will try to address all of your feedback. |
|
Thanks, @t-hamano! We should be able to resolve e2e test failures, but ignore the test files. Linting them for React rules doesn't make sense. Additionally, we can keep this PR open while trying to resolve the remaining errors. This is what we did before enabling compiler-related rules. |
|
Flaky tests detected in f8f91f9. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/14608494758
|
dbb9a54 to
eddf3e5
Compare
|
OK, I think I was able to apply the basic rule correctly.
I would like to investigate whether these directives are available for the new package. |
The As a result, there are 370 problems (36 errors, 334 warnings). |
|
Most errors are similar to the following: There have been similar issues reported regarding this: facebook/react#31722 |
|
Fantastic work, @t-hamano! Most of the |
|
Thank you for handling all this folks, much appreciated 🙇♂️ |
4fc6b7c to
334a5ba
Compare
|
The 7.0 roadmap mentions upgrading to React 19, so I'd like to reopen this PR. However, I've noticed something that concerns me.
So, instead of replacing
|


Related PRs:
eslint-plugin-react-compiler#61788eslint-plugin-react-compilerto latest beta #67106Alternatives to #69945
What?
The Gutenberg repo has
eslint-plugin-react-compilerto make the code more React 19 and React compiler friendly.There was an announcement that the plugin was merged into
eslint-plugin-react-hooks, so let's try to use the new library.Why?
To improve code quality and prepare for React 19.
How?
In particular, the warnings occurring in the E2E test files should be relatively easy to fix because they do not require backward compatibility.E2E related files were excluded from this lint check.eslint-plugin-react-hooksto native files and files related to the interactivity api, whereeslint-plugin-react-compilerwas previously turned off.There don't seem to be any errors so farNative app related files were excluded from this lint check.All errors that occur with the default settings: https://github.com/WordPress/gutenberg/actions/runs/14594561408/job/40937280577
Testing Instructions