1
0

lefthook.yml 934 B

1234567891011121314151617181920212223242526272829303132333435363738
  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. parallel: true
  20. jobs:
  21. - name: test
  22. run: pnpm run test
  23. - name: snapshot
  24. run: pnpm run test:snapshot
  25. - name: hygiene
  26. run: pnpm run hygiene
  27. - name: doc-sync
  28. run: pnpm run doc-sync
  29. - name: module-graph freshness
  30. run: pnpm run verify-module-graph