fix(eslint): fix

This commit is contained in:
zhangheng
2026-04-17 20:09:58 +08:00
parent db0c82a452
commit 62da41f875
3 changed files with 9 additions and 3 deletions

View File

@@ -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)

View File

@@ -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": [

View File

@@ -11,4 +11,4 @@ module.exports = {
},
},
},
};
}