mirror of
https://github.com/LHY0125/PathEditor.git
synced 2026-06-29 01:45:54 +08:00
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:
@@ -65,11 +65,13 @@ PathEditor/
|
||||
│ │ ├── toolbar/ # ToolBar、ActionButtons、UndoRedoButtons
|
||||
│ │ ├── dialogs/ # PathEdit、Help、Import、Analyze、Profile
|
||||
│ │ └── ui/ # Modal、buttons
|
||||
│ ├── hooks/ # useAppActions、useKeyboard
|
||||
│ ├── hooks/ # useAppActions、useKeyboard、usePathValidation
|
||||
│ ├── i18n/ # zh-CN / en
|
||||
│ └── config/ # default.json
|
||||
├── docs/ # REMaining-ISSUES 等审查文档
|
||||
├── tests/unit/ # Vitest 前端单元测试
|
||||
├── e2e/ # Playwright E2E 测试
|
||||
├── rust-toolchain.toml # 固定工具链版本
|
||||
└── Cargo.toml # Workspace 根 + [workspace.package]
|
||||
```
|
||||
|
||||
@@ -144,7 +146,7 @@ patheditor profile {list|save|load|apply|delete|rename}
|
||||
## 关键约束
|
||||
|
||||
- **TypeScript**:`strict: true`,零编译错误
|
||||
- **Rust 工具链**:`stable-x86_64-pc-windows-gnu`(项目已设 override)
|
||||
- **Rust 工具链**:`stable-x86_64-pc-windows-gnu`(`rust-toolchain.toml` 强制)
|
||||
- **MinGW 兼容**:`.cargo/config.toml` 添加 `-lmcfgthread`(GCC 15.2.0 运行时)
|
||||
- **运行权限**:需要管理员权限才能编辑系统 PATH,非管理员自动进入只读模式
|
||||
- **构建产物**:NSIS 安装包,约 8MB
|
||||
|
||||
Reference in New Issue
Block a user