lefthook.yml
Rama main · réplica de lectura del repositorio original.
# Git hooks via lefthook — https://lefthook.dev
#
# The pre-push hook runs the EXACT CI commands locally so nothing reaches a PR
# without passing first. This encodes the "run CI before push" discipline as
# enforcement rather than memory. Genuine emergency bypass: `git push --no-verify`.
pre-commit:
parallel: true
commands:
biome:
glob: "packages/**/*.{ts,tsx,js,jsx,json,css}"
# No --write: mirror CI, which fails on unformatted/lint issues rather
# than silently fixing them.
run: bunx biome check --no-errors-on-unmatched {staged_files}
commit-msg:
commands:
commitlint:
run: bunx commitlint --edit {1}
pre-push:
parallel: false
commands:
ci-gate:
# Exactly what CI runs: biome over packages/ (no --write) then the full
# check (tsc build + test suite). If this passes, the PR's `check` job will.
# Wrapped in a machine-wide lock so concurrent agents' gates queue instead
# of saturating the box (see scripts/ci-gate-lock.sh).
run: scripts/ci-gate-lock.sh bash -c 'bunx biome check packages/ && make check'