Skip to content

fix: make the Biome pre-commit hooks actually work - #84

Merged
lewisjared merged 2 commits into
mainfrom
fix/biome-pre-commit-hooks
Sep 2, 2026
Merged

fix: make the Biome pre-commit hooks actually work#84
lewisjared merged 2 commits into
mainfrom
fix/biome-pre-commit-hooks

Conversation

@lewisjared

Copy link
Copy Markdown
Contributor

Fixes the Biome pre-commit hooks, which never received the staged filenames and so checked the whole frontend/ tree on every commit.

The hooks passed staged filenames to bash -lc "...", so they landed as positional arguments to bash rather than as arguments to Biome. That pulled in frontend/public/favicon.svg, which pre-commit itself excludes, so biome-lint failed on every commit regardless of what changed.

  • Collapses the two hooks into one biome-check, because check --write already covers format and lint.
  • Sets pass_filenames: false, which is what the hook was doing anyway.
  • Runs the pinned frontend/node_modules/.bin binaries instead of npx --yes, so Biome and tsc match the versions in package.json rather than whatever the registry serves.
  • Ignores public/ in biome.json to match the pre-commit exclude, and bumps the schema to the installed 2.5.11.

Split out of #82, which carried this fix incidentally.

The Biome hooks passed staged filenames to `bash -lc "..."`, so they landed as
positional arguments to bash rather than as arguments to Biome. Biome never saw
them and checked the whole `frontend/` tree instead. That pulled in
`frontend/public/favicon.svg`, which pre-commit itself excludes, so `biome-lint`
failed on every commit regardless of what changed.

- Collapses the two hooks into one `biome-check`, because `check --write` already
  covers format and lint.
- Sets `pass_filenames: false`, which is what the hook was doing anyway.
- Runs the pinned `frontend/node_modules/.bin` binaries instead of `npx --yes`,
  so Biome and tsc match the versions in `package.json` rather than whatever the
  registry serves.
- Ignores `public/` in `biome.json` to match the pre-commit exclude, and bumps
  the schema to the installed 2.5.11.
@netlify

netlify Bot commented Sep 2, 2026

Copy link
Copy Markdown

Deploy Preview for climate-ref ready!

Name Link
🔨 Latest commit 8f1cd68
🔍 Latest deploy log https://app.netlify.com/projects/climate-ref/deploys/6a98044defe9d40007124a32
😎 Deploy Preview https://deploy-preview-84--climate-ref.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@coderabbitai

coderabbitai Bot commented Sep 2, 2026

Copy link
Copy Markdown

Warning

Review limit reached

Next included review available in 17 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Team

Run ID: da9545ba-7846-49c6-b1a1-430a3307d683

📥 Commits

Reviewing files that changed from the base of the PR and between b781b3d and 8f1cd68.

📒 Files selected for processing (3)
  • .pre-commit-config.yaml
  • changelog/84.trivial.md
  • frontend/biome.json

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@lewisjared
lewisjared merged commit 2d7ab9b into main Sep 2, 2026
9 checks passed
@lewisjared
lewisjared deleted the fix/biome-pre-commit-hooks branch September 2, 2026 11:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant