mirror of
https://github.com/affaan-m/everything-claude-code.git
synced 2026-04-12 04:33:29 +08:00
Revert "feat(ecc): prune plugin 43→12 items, promote 7 rules to .claude/rules/ (#245)"
This reverts commit 1bd68ff534.
This commit is contained in:
28
docs/zh-CN/commands/refactor-clean.md
Normal file
28
docs/zh-CN/commands/refactor-clean.md
Normal file
@@ -0,0 +1,28 @@
|
||||
# 重构清理
|
||||
|
||||
通过测试验证安全识别并删除无用代码:
|
||||
|
||||
1. 运行无用代码分析工具:
|
||||
* knip:查找未使用的导出和文件
|
||||
* depcheck:查找未使用的依赖项
|
||||
* ts-prune:查找未使用的 TypeScript 导出
|
||||
|
||||
2. 在 .reports/dead-code-analysis.md 中生成综合报告
|
||||
|
||||
3. 按严重程度对发现进行分类:
|
||||
* 安全:测试文件、未使用的工具函数
|
||||
* 注意:API 路由、组件
|
||||
* 危险:配置文件、主要入口点
|
||||
|
||||
4. 仅建议安全的删除操作
|
||||
|
||||
5. 每次删除前:
|
||||
* 运行完整的测试套件
|
||||
* 验证测试通过
|
||||
* 应用更改
|
||||
* 重新运行测试
|
||||
* 如果测试失败则回滚
|
||||
|
||||
6. 显示已清理项目的摘要
|
||||
|
||||
切勿在不首先运行测试的情况下删除代码!
|
||||
Reference in New Issue
Block a user