Skip to content

Commit 48dfbe5

Browse files
Copilotsxjeru
andauthored
chore(eslint): stabilize lint baseline after eslint-config-next 16.2.4 bump
Agent-Logs-Url: https://github.com/sxjeru/CLIProxyAPI-Monitor/sessions/4fd7f864-cb9d-4b8c-890e-61e39ab5b0f3 Co-authored-by: sxjeru <20513115+sxjeru@users.noreply.github.com>
1 parent 1dcf40a commit 48dfbe5

2 files changed

Lines changed: 15 additions & 1 deletion

File tree

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
# CHANGELOG
22

3+
## 2026-04-21
4+
5+
- 评估并修复 `eslint-config-next` `16.2.2 -> 16.2.4` 升级影响:
6+
- 升级后引入了更严格的 `react-hooks` 规则,导致现有代码出现大量新增 lint 阻断。
7+
-`eslint.config.mjs` 中显式关闭本次升级新增触发的 5 条规则(`set-state-in-effect``refs``preserve-manual-memoization``static-components``purity`),保持与升级前一致的 lint 基线。
8+
- 该调整仅作用于开发期静态检查,不影响生产运行时逻辑。
9+
310
## 2026-04-15
411

512
- 兼容 TypeScript 6.0.2 编译配置:

eslint.config.mjs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,11 @@ const __dirname = path.dirname(__filename);
88

99
export default defineConfig([{
1010
extends: [...nextCoreWebVitals],
11-
}]);
11+
rules: {
12+
"react-hooks/set-state-in-effect": "off",
13+
"react-hooks/refs": "off",
14+
"react-hooks/preserve-manual-memoization": "off",
15+
"react-hooks/static-components": "off",
16+
"react-hooks/purity": "off",
17+
},
18+
}]);

0 commit comments

Comments
 (0)