From 6f660cb18e610db366a2512dee0193dfd4bf64be Mon Sep 17 00:00:00 2001 From: Taylor Ho Date: Thu, 2 Apr 2026 00:36:43 -0700 Subject: [PATCH] fix: scope pre-commit hook to staged files only Use lefthook's {staged_files} template so biome format/check and git add only touch explicitly staged files, preventing unrelated changes from being pulled into commits during parallel workflows. Co-Authored-By: Claude Opus 4.6 (1M context) --- lefthook.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lefthook.yml b/lefthook.yml index c66ddb2..e0b7892 100644 --- a/lefthook.yml +++ b/lefthook.yml @@ -1,7 +1,8 @@ pre-commit: commands: format: - run: npx biome format --write . && npx biome check --fix . && git add -u + glob: "*.{js,jsx,ts,tsx,json,css}" + run: npx biome format --write {staged_files} && npx biome check --fix {staged_files} && git add {staged_files} check: run: just check