Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion frontend/eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,12 @@ export default tseslint.config(
"react-refresh": reactRefresh,
},
rules: {
...reactHooks.configs.recommended.rules,
// react-hooks v7 的 configs.recommended 默认启用了 Compiler 系新规则
// (set-state-in-effect / refs / use-memo / immutability 等,全量启用会在
// 现有代码上产生 ~80 个新 error)。这里显式只保留 v5 recommended 等价的
// 两条经典规则,保持 lint 基线不变;Compiler 系规则的采用留待独立 PR。
"react-hooks/rules-of-hooks": "error",
"react-hooks/exhaustive-deps": "warn",
"react-refresh/only-export-components": ["warn", { allowConstantExport: true }],
},
},
Expand Down
Loading
Loading