-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlefthook.yml
More file actions
22 lines (22 loc) · 981 Bytes
/
Copy pathlefthook.yml
File metadata and controls
22 lines (22 loc) · 981 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# Commit-level gate: the FAST half of CI run locally before the push (format,
# typecheck, boundaries, type-aware lint). The slower CI-only jobs (vitest incl.
# the API-surface snapshot, and publint/attw) are not run here to keep commits
# quick; CI is the source of truth for those.
# Not parallel: biome --write rewrites staged files, so it must finish before
# typecheck reads them (no concurrent write/read race).
pre-commit:
commands:
biome:
glob: "*.{ts,tsx,cts,mts,js,jsx,cjs,mjs,json,jsonc}"
# Auto-fix what's fixable and re-stage; fail the commit on any remaining
# warning or error (zero-warnings Definition of Done).
run: pnpm exec biome check --write --error-on-warnings --no-errors-on-unmatched {staged_files}
stage_fixed: true
typecheck:
run: pnpm exec turbo run typecheck
boundaries:
glob: "packages/**/*.ts"
run: pnpm lint:boundaries
types:
glob: "packages/**/*.ts"
run: pnpm lint:types