From 1c06c577c8d4023f6a96282ec5a298e89dd0fd46 Mon Sep 17 00:00:00 2001 From: Christoph Nakazawa Date: Wed, 23 Apr 2025 07:10:03 +0900 Subject: [PATCH 1/2] Fix ESLint plugin version. --- src/content/blog/2025/04/21/react-compiler-rc.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/content/blog/2025/04/21/react-compiler-rc.md b/src/content/blog/2025/04/21/react-compiler-rc.md index 55c238a93cc..8a09b7245c1 100644 --- a/src/content/blog/2025/04/21/react-compiler-rc.md +++ b/src/content/blog/2025/04/21/react-compiler-rc.md @@ -57,7 +57,7 @@ During the RC period, we encourage all React users to try the compiler and provi As noted in the Beta announcement, React Compiler is compatible with React 17 and up. If you are not yet on React 19, you can use React Compiler by specifying a minimum target in your compiler config, and adding `react-compiler-runtime` as a dependency. You can find docs on this [here](https://react.dev/learn/react-compiler#using-react-compiler-with-react-17-or-18). ## Migrating from eslint-plugin-react-compiler to eslint-plugin-react-hooks {/*migrating-from-eslint-plugin-react-compiler-to-eslint-plugin-react-hooks*/} -If you have already installed eslint-plugin-react-compiler, you can now remove it and use `eslint-plugin-react-hooks@^6.0.0-rc.1`. Many thanks to [@michaelfaith](https://bsky.app/profile/michael.faith) for contributing to this improvement! +If you have already installed eslint-plugin-react-compiler, you can now remove it and use `eslint-plugin-react-hooks@6.0.0-rc.1`. Many thanks to [@michaelfaith](https://bsky.app/profile/michael.faith) for contributing to this improvement! To install: From d6836dd62415e618e57a8572301bcb9ac23e27fa Mon Sep 17 00:00:00 2001 From: Christoph Nakazawa Date: Wed, 23 Apr 2025 07:25:38 +0900 Subject: [PATCH 2/2] Update react-compiler-rc.md --- src/content/blog/2025/04/21/react-compiler-rc.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/content/blog/2025/04/21/react-compiler-rc.md b/src/content/blog/2025/04/21/react-compiler-rc.md index 8a09b7245c1..6f6bcf3d982 100644 --- a/src/content/blog/2025/04/21/react-compiler-rc.md +++ b/src/content/blog/2025/04/21/react-compiler-rc.md @@ -89,6 +89,8 @@ export default [ ]; ``` +To enable the React Compiler rule, add `'react-hooks/react-compiler': 'error'` to your ESLint configuration. + The linter does not require the compiler to be installed, so there's no risk in upgrading eslint-plugin-react-hooks. We recommend everyone upgrade today. ## swc support (experimental) {/*swc-support-experimental*/}