From b7a97c3d887df7e7c2cf03a64c74a6b44167701d Mon Sep 17 00:00:00 2001 From: Lukas Date: Sat, 28 Mar 2026 18:07:38 +0100 Subject: [PATCH] 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) --- lefthook.yml | 29 +++++++++++++++++++++++++++-- package.json | 2 +- 2 files changed, 28 insertions(+), 3 deletions(-) diff --git a/lefthook.yml b/lefthook.yml index 88cc6e5..8fdaf90 100644 --- a/lefthook.yml +++ b/lefthook.yml @@ -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 diff --git a/package.json b/package.json index 9390df4..8a3c7e9 100644 --- a/package.json +++ b/package.json @@ -35,6 +35,6 @@ "check:ignores": "node scripts/check-lint-ignores.mjs", "check:classnames": "node scripts/check-cn-classnames.mjs", "check:props": "node scripts/check-component-props.mjs", - "check": "pnpm audit --audit-level=high && knip && biome check . && oxlint --tsconfig apps/web/tsconfig.json --type-aware && node scripts/check-lint-ignores.mjs && node scripts/check-cn-classnames.mjs && node scripts/check-component-props.mjs && tsc --build && vitest run && jscpd && pnpm jsinspect" + "check": "pnpm audit --audit-level=high && knip && biome check . && node scripts/check-lint-ignores.mjs && node scripts/check-cn-classnames.mjs && node scripts/check-component-props.mjs && jscpd && pnpm jsinspect && tsc --build && oxlint --tsconfig apps/web/tsconfig.json --type-aware && vitest run" } }