From 27be89c9848d39b2f53c2e5bebc1e4e870db8489 Mon Sep 17 00:00:00 2001 From: Stephen Zhou <38493346+hyoban@users.noreply.github.com> Date: Wed, 31 Dec 2025 15:31:11 +0800 Subject: [PATCH] chore: lint for react compiler (#30417) --- web/eslint.config.mjs | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/web/eslint.config.mjs b/web/eslint.config.mjs index 89f6d292cd..574dbb091e 100644 --- a/web/eslint.config.mjs +++ b/web/eslint.config.mjs @@ -13,6 +13,24 @@ export default antfu( 'react/no-forward-ref': 'off', 'react/no-use-context': 'off', 'react/prefer-namespace-import': 'error', + + // React Compiler rules + // Set to warn for gradual adoption + 'react-hooks/config': 'warn', + 'react-hooks/error-boundaries': 'warn', + 'react-hooks/component-hook-factories': 'warn', + 'react-hooks/gating': 'warn', + 'react-hooks/globals': 'warn', + 'react-hooks/immutability': 'warn', + 'react-hooks/preserve-manual-memoization': 'warn', + 'react-hooks/purity': 'warn', + 'react-hooks/refs': 'warn', + 'react-hooks/set-state-in-effect': 'warn', + 'react-hooks/set-state-in-render': 'warn', + 'react-hooks/static-components': 'warn', + 'react-hooks/unsupported-syntax': 'warn', + 'react-hooks/use-memo': 'warn', + 'react-hooks/incompatible-library': 'warn', }, }, nextjs: true,