Skip to content

Commit e446278

Browse files
authored
fix(lefthook): exclude docs/** from the format pre-commit job (#135)
## Summary - The `format` pre-commit job's glob still matched `docs/**`, but `.oxfmtrc.json` ignores that path — so a docs-only staged commit left oxfmt with zero targets and it exited 2, rejecting the commit. - Added `exclude: "docs/**"` to the `format` job to keep lefthook and oxfmt's ignore rules in sync. Closes #126 ## Test plan - [x] Staged a docs-only change and ran `lefthook run pre-commit --command format`: job reports `(skip) no files for inspection`, exit 0. - [x] Confirmed the `format` job still runs and passes on non-docs staged files.
1 parent 5035fcb commit e446278

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

lefthook.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ pre-commit:
33
commands:
44
format:
55
glob: "*.{ts,js,json,md,yml,yaml}"
6+
exclude: "docs/**"
67
run: pnpm exec oxfmt --check {staged_files}
78
fail_text: "Run 'pnpm format' to fix formatting."
89
lint:

0 commit comments

Comments
 (0)