lefthook.yml 701 B

12345678910111213141516171819202122232425
  1. # Git hooks (lefthook). Hooks call the same package.json scripts CI runs —
  2. # one source of truth; the hook is just an earlier, faster checkpoint.
  3. # Install: `pnpm exec lefthook install` (runs automatically via postinstall).
  4. pre-commit:
  5. parallel: true
  6. jobs:
  7. - name: lint (staged)
  8. glob: '*.{ts,mts,cts,mjs}'
  9. exclude:
  10. - 'vendor/*/src/**'
  11. run: node_modules/.bin/eslint --fix {staged_files} && git add {staged_files}
  12. stage_fixed: true
  13. - name: typecheck
  14. glob: '*.ts'
  15. run: pnpm run typecheck
  16. - name: vendor manifest guard
  17. run: scripts/check-vendor-manifest.sh
  18. pre-push:
  19. jobs:
  20. - name: full check
  21. run: pnpm run check:pre-push