Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion lefthook.yml
Original file line number Diff line number Diff line change
@@ -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}"
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 checkbiome 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 👍 / 👎.

run: npx biome format --write {staged_files} && npx biome check --fix {staged_files} && git add {staged_files}
check:
run: just check

Expand Down
Loading