fix: v5.1 代码审查修复 — ESLint/CSV/测试隔离/CLI 去重

- ESLint: 迁移到 flat config ignores,删除已废弃的 .eslintignore
- CSV: Rust/TS 格式对齐,统一 type,path,enabled 3 列
- JSON: 导入导出统一为 {path, enabled} 对象格式
- scanner: 移除未使用的 max_threads 死代码 + TempDirGuard 测试清理
- profiles: rename_profile 添加目标存在检查
- CLI: 抽取 load_operate_save helper,简化 cmd_remove/cmd_edit
- PathTable: 抽取 usePathValidation hook,消除 set-state-in-effect
- 测试隔离: disabled/profiles 通过 #[cfg(test)] 重定向到 temp dir
- toolchain: 新增 rust-toolchain.toml 固定 stable-x86_64-pc-windows-gnu
- docs: 更新 CLAUDE.md/README.md 测试计数 + 架构树

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
2026-05-30 17:31:04 +08:00
parent bce2dc8641
commit 21da3b2930
14 changed files with 430 additions and 214 deletions
+5 -4
View File
@@ -10,7 +10,7 @@
<img src="https://img.shields.io/badge/rust-1.95-000000" alt="rust">
<img src="https://img.shields.io/badge/typescript-strict-blue" alt="typescript">
<img src="https://img.shields.io/badge/license-MIT-green" alt="license">
<img src="https://img.shields.io/badge/tests-72%20passed-brightgreen" alt="tests">
<img src="https://img.shields.io/badge/tests-157%20passed-brightgreen" alt="tests">
<img src="https://github.com/LHY0125/PathEditor/actions/workflows/ci.yml/badge.svg" alt="CI">
</p>
@@ -259,8 +259,8 @@ npx tauri build
| 国际化 | i18next |
| 桌面框架 | Tauri 2.x |
| 核心库 | Rust workspace (core + gui + cli) |
| 前端测试 | Vitest (72 个测试) |
| Rust 测试 | cargo test (10 个测试) |
| 前端测试 | Vitest (100 个测试) |
| Rust 测试 | cargo test (57 个测试) |
| 构建 | Vite + Cargo |
| 打包 | NSIS |
@@ -282,10 +282,11 @@ src/ # React 前端
├── core/ # 纯逻辑 — 零框架依赖
├── store/ # Zustand 状态管理
├── components/ # UI 组件
├── hooks/ # useAppActions、useKeyboard
├── hooks/ # useAppActions、useKeyboard、usePathValidation
├── i18n/ # zh-CN / en
└── config/ # default.json
tests/unit/ # 前端单元测试
docs/ # 审查文档
```
## 快捷键