lefthook pre-commit prettier gate fails on every file (no .prettierrc) #43

Closed
opened 2026-08-11 07:33:43 +00:00 by Mark · 0 comments
Owner

lefthook.yml runs npx prettier --check . on pre-commit, but the repo has no .prettierrc and the committed style (single quotes, no semicolons) does not match prettier defaults: 193 files fail the check at HEAD. The gate would block any commit or force a repo-wide reformat. Fix: add a .prettierrc matching the repo style (singleQuote, semi:false) and format once, or drop the format command from lefthook.

lefthook.yml runs `npx prettier --check .` on pre-commit, but the repo has no .prettierrc and the committed style (single quotes, no semicolons) does not match prettier defaults: 193 files fail the check at HEAD. The gate would block any commit or force a repo-wide reformat. Fix: add a .prettierrc matching the repo style (singleQuote, semi:false) and format once, or drop the format command from lefthook.
Mark closed this issue 2026-08-14 03:33:22 +00:00
Sign in to join this conversation.
No description provided.