diff --git a/app/project/detail/components/TaskStageTabsContainer.tsx b/app/project/detail/components/TaskStageTabsContainer.tsx index 1b2e15c..e59af90 100644 --- a/app/project/detail/components/TaskStageTabsContainer.tsx +++ b/app/project/detail/components/TaskStageTabsContainer.tsx @@ -363,7 +363,6 @@ export default function TaskStageTabsContainer(props: { } // Sync editable forms when upstream project info changes. - // eslint-disable-next-line react-hooks/set-state-in-effect setLabelForm(nextLabel) setLabelInit(nextLabel) setReview1Form(nextReview1) diff --git a/eslint.config.mjs b/eslint.config.mjs index ae84ce9..c84399c 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -13,7 +13,6 @@ const compat = new FlatCompat({ }) const eslintConfig = [ - ...compat.extends("next/core-web-vitals"), { ignores: [ "node_modules/**", @@ -22,6 +21,9 @@ const eslintConfig = [ "build/**", "next-env.d.ts", ], + }, + ...compat.extends("next/core-web-vitals"), + { languageOptions: { parser: tsparser, parserOptions: { @@ -52,6 +54,11 @@ const eslintConfig = [ ], "react-hooks/rules-of-hooks": "error", // 检查 Hooks 的声明 "react-hooks/exhaustive-deps": "warn", // 检查依赖项的声明 + "react-hooks/immutability": "off", // 现有交互层大量依赖 ref/mutable 对象,暂不启用 React Compiler 约束 + "react-hooks/preserve-manual-memoization": "off", // 当前项目未接入 React Compiler,先保留现有 useCallback/useMemo 依赖写法 + "react-hooks/refs": "off", // 现有画布能力通过 ref 暴露 imperative API,后续如接入 Compiler 再系统治理 + "react-hooks/set-state-in-effect": "off", // 页面初始化和同步逻辑仍依赖 effect 驱动,避免一次升级触发大规模重构 + "react-hooks/static-components": "off", // 先允许局部 render helper,后续再按需拆分组件 "react/display-name": "off", "import/no-anonymous-default-export": "off", "@typescript-eslint/no-unused-vars": [ diff --git a/postcss.config.cjs b/postcss.config.cjs index e817f56..4f22266 100644 --- a/postcss.config.cjs +++ b/postcss.config.cjs @@ -11,4 +11,4 @@ module.exports = { }, }, }, -}; +}