lefthook.yml 934 B

123456789101112131415161718192021222324252627282930
  1. # Git hooks (lefthook). Keep these local checkpoints fast; CI owns the full
  2. # repository-wide gate matrix.
  3. # Install: `node scripts/install-lefthook.mjs` (runs automatically via postinstall).
  4. pre-commit:
  5. jobs:
  6. - name: format (staged)
  7. glob: '*.{ts,tsx,mts,cts,mjs}'
  8. exclude:
  9. - 'vendor/*/src/**'
  10. run: node_modules/.bin/eslint --config eslint.format.config.mjs --fix --no-warn-ignored {staged_files}
  11. stage_fixed: true
  12. - name: lint (staged)
  13. glob: '*.{ts,tsx,mts,cts,mjs}'
  14. exclude:
  15. - 'vendor/*/src/**'
  16. run: node_modules/.bin/tsx scripts/run-oxlint.ts --fix --no-error-on-unmatched-pattern {staged_files}
  17. stage_fixed: true
  18. - name: whitespace (staged)
  19. run: git diff --cached --check
  20. - name: vendor manifest guard
  21. run: scripts/check-vendor-manifest.sh
  22. pre-push:
  23. jobs:
  24. - name: typecheck
  25. run: node_modules/.bin/tsc -b --pretty false