Skip to content

Commit de7b417

Browse files
committed
ci: run fallow audit in lefthook pre-commit
Mirrors the same `fallow audit --base ... --fail-on-issues` check that runs in CI, but locally against HEAD so issues surface at commit time instead of after the push round-trip. Scoped to `packages/**` source files via the glob — non-code edits (README, docs, top-level configs) skip the hook entirely. Measured locally: ~5s in parallel with the existing lint/format/typecheck checks. Doesn't extend wall-clock time because typecheck (~11s) is the long pole, and lefthook runs commands in parallel. The default `--gate new-only` means inherited findings don't block the commit — same gate behavior as CI, so local pre-commit and PR audit agree.
1 parent 2d56633 commit de7b417

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

lefthook.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,13 @@ pre-commit:
1212
typecheck:
1313
glob: "*.{ts,tsx}"
1414
run: cd packages/core && bunx tsc --noEmit && cd ../studio && bunx tsc --noEmit
15+
# `fallow audit` runs the same check that gates PRs in CI, but locally
16+
# against HEAD so issues surface before the push instead of after.
17+
# `--gate new-only` is the default — inherited findings don't block the
18+
# commit, only newly-introduced ones do. ~1-3s on typical commit sizes.
19+
fallow:
20+
glob: "packages/**/*.{ts,tsx,mts,cts,js,jsx,mjs,cjs}"
21+
run: npx -y fallow@2.75.0 audit --base HEAD --fail-on-issues
1522
filesize:
1623
# Scoped to packages/studio — the 500 LOC limit is a studio architecture
1724
# standard enforced as part of the App.tsx decomposition work. Player and

0 commit comments

Comments
 (0)