pre-commit-check
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChinesePre-commit Check Skill
预提交检查Skill
Run all pre-commit checks before committing changes.
在提交代码变更前运行所有预提交检查。
Usage
使用说明
Manually verify changes pass all quality gates before committing.
在提交前手动验证变更是否通过所有质量关卡。
Steps
步骤
- Run to format code and fix auto-fixable lint issues
pnpm format - Run to check for remaining lint/format issues
pnpm lint - Run appropriate tests based on changed files
- Verify TypeScript compilation succeeds
- Review changes one final time
- Ready to commit if all checks pass
- 运行来格式化代码并修复可自动修复的lint问题
pnpm format - 运行检查剩余的lint/格式问题
pnpm lint - 根据变更的文件运行相应的测试
- 验证TypeScript编译是否成功
- 最后再检查一遍变更内容
- 若所有检查都通过,即可准备提交
Notes
注意事项
- Husky pre-commit hook automatically runs format + lint:check
- This skill useful for checking before pushing or during development
- Consider running for major changes
pnpm build
- Husky预提交钩子会自动运行format + lint:check
- 该Skill在推送前或开发过程中检查时非常有用
- 对于重大变更,建议运行
pnpm build