Explorar el Código

📝 docs(claude): 更新开发环境说明和调试指南

- 添加git锁文件冲突处理说明
- 补充测试调试命令说明(Vitest和Jest)
- 添加表单调试方法
- 补充类型检查过滤方法

🤖 Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
yourname hace 6 días
padre
commit
054133a226
Se han modificado 1 ficheros con 8 adiciones y 1 borrados
  1. 8 1
      CLAUDE.md

+ 8 - 1
CLAUDE.md

@@ -16,4 +16,11 @@
 - e2e测试失败时先查看页面结构 test-results/**/error-context.md
 - 前端是 hono/client  hc  rpc 的,不是直接fetch
 - bmad-core dir is in .bmad-core
-- 必须用中文回答
+- 必须用中文回答
+- **git提交**: 当遇到git锁文件冲突时,使用单条命令:`rm -f /mnt/code/184-172-template-6/.git/index.lock && git add <文件> && git commit -m "提交信息"`
+- **测试调试**: 使用 `pnpm test --testNamePattern "测试名称"` 来运行特定测试查看详细信息 (mini使用Jest,其他包使用Vitest)
+  - **Vitest**: 支持 `-t` 或 `--testNamePattern`
+  - **Jest**: 只支持 `--testNamePattern`,mini是Jest
+  - **Mini测试**: 需要先进入mini目录再运行 `pnpm test --testNamePattern "测试名称"`
+- **表单调试**: 表单提交失败时,在表单form onsubmit=form.handleSubmit的第二个参数中加console.debug来看表单验证错误,例如:`form.handleSubmit(handleSubmit, (errors) => console.debug('表单验证错误:', errors))`
+- 类型检查 可以用 pnpm typecheck 加 grep来过滤要检查的 指定文件