Parallelize pre-commit checks via lefthook jobs

Independent checks (audit, knip, biome, jscpd, jsinspect, custom
scripts) now run in parallel. Type-dependent checks (oxlint, vitest)
remain sequential after tsc --build via a piped group. Also reorder
pnpm check for fast-fail on cheap checks first.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Lukas
2026-03-28 18:07:38 +01:00
parent 1de00e3d8e
commit b7a97c3d88
2 changed files with 28 additions and 3 deletions

View File

@@ -1,4 +1,29 @@
pre-commit:
parallel: true
jobs:
- name: check
run: pnpm check
- name: audit
run: pnpm audit --audit-level=high
- name: knip
run: pnpm exec knip
- name: biome
run: pnpm exec biome check .
- name: check-ignores
run: node scripts/check-lint-ignores.mjs
- name: check-classnames
run: node scripts/check-cn-classnames.mjs
- name: check-props
run: node scripts/check-component-props.mjs
- name: jscpd
run: pnpm exec jscpd
- name: jsinspect
run: pnpm jsinspect
- name: typecheck-oxlint-test
group:
piped: true
jobs:
- name: typecheck
run: pnpm exec tsc --build
- name: oxlint
run: pnpm oxlint
- name: test
run: pnpm test