pre-commit-check

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Pre-commit Check Skill

预提交检查Skill

Run all pre-commit checks before committing changes.
在提交代码变更前运行所有预提交检查。

Usage

使用说明

Manually verify changes pass all quality gates before committing.
在提交前手动验证变更是否通过所有质量关卡。

Steps

步骤

  1. Run
    pnpm format
    to format code and fix auto-fixable lint issues
  2. Run
    pnpm lint
    to check for remaining lint/format issues
  3. Run appropriate tests based on changed files
  4. Verify TypeScript compilation succeeds
  5. Review changes one final time
  6. Ready to commit if all checks pass
  1. 运行
    pnpm format
    来格式化代码并修复可自动修复的lint问题
  2. 运行
    pnpm lint
    检查剩余的lint/格式问题
  3. 根据变更的文件运行相应的测试
  4. 验证TypeScript编译是否成功
  5. 最后再检查一遍变更内容
  6. 若所有检查都通过,即可准备提交

Notes

注意事项

  • Husky pre-commit hook automatically runs format + lint:check
  • This skill useful for checking before pushing or during development
  • Consider running
    pnpm build
    for major changes
  • Husky预提交钩子会自动运行format + lint:check
  • 该Skill在推送前或开发过程中检查时非常有用
  • 对于重大变更,建议运行
    pnpm build