修复 lint 阻塞错误并恢复门禁

This commit is contained in:
2026-03-03 12:25:03 +08:00
parent 52b87abee3
commit 45dbac1935
8 changed files with 28 additions and 41 deletions
+7 -2
View File
@@ -148,9 +148,14 @@
-`tsc --noEmit` 纳入 CI 必跑;
- 优先修复测试目录类型错误,确保类型门禁恢复。
### P2-4 Lint 存在阻塞错误(React hooks 新规则触发)
### P2-4 Lint 存在阻塞错误(React hooks 新规则触发)【已完成】
- 修复状态:✅ 已完成(2026-03-03
- 修复内容:
- 修复 `GlobalUserBadge``RestaurantCard``SwipeableCard``PageTransition``useGeolocation` 的 hooks 规则 error
- 修复页面文案中的未转义引号(`react/no-unescaped-entities`);
- `npm run lint` 已恢复为 0 error(仍有 warning,后续可持续清理)。
- 证据:
- `npm run lint`10 error / 32 warning。
- 修复后执行 `npm run lint``0 errors / 29 warnings`
- 代表性问题:
- `src/components/SwipeableCard.tsx:81`render 阶段注册副作用)
- `src/components/GlobalUserBadge.tsx:23`effect 内同步 setState