Conversation
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) <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6f660cb18e
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| commands: | ||
| format: | ||
| run: npx biome format --write . && npx biome check --fix . && git add -u | ||
| glob: "*.{js,jsx,ts,tsx,json,css}" |
There was a problem hiding this comment.
Expand Biome hook glob to include supported JS extensions
The new glob narrows formatting to *.{js,jsx,ts,tsx,json,css}, but this repo already contains scripts/check-file-sizes.mjs, and Biome’s own Lefthook recipe includes cjs, mjs, and jsonc in the staged-file pattern (https://biomejs.dev/recipes/git-hooks/). With the current pattern, staged .mjs/.cjs files are skipped by the auto-fix step while the unchanged check command (just check → biome check .) still validates them, so commits can now fail on files that used to be auto-formatted. Please broaden the glob (or use --files-ignore-unknown=true without a restrictive glob) to avoid this regression.
Useful? React with 👍 / 👎.
|
What is the scenario this happens in @tellaho ? I'm not sure I've run into this but I always use worktrees when working on |
Summary
{staged_files}template so biome format/check and git add only touch explicitly staged filesglobfilter to the format command so it only runs on file types biome handlesTest plan
lefthook.yml) — format step skips gracefully.tsxfile — format/check still runs and re-stages only that file🤖 Generated with Claude Code