chore: auto-fix biome on staged files via pre-commit hook#373
Merged
Conversation
Adds a dependency-free git pre-commit hook (.githooks/pre-commit) that runs biome check --write on staged source files and re-stages them, so commits land lint+format clean. Wired through prepare (git config core.hooksPath .githooks, git-guarded so consumer installs are a no-op); uses the biome already in deps — no husky/lint-staged, no lockfile change.
tangletools
approved these changes
Jun 24, 2026
tangletools
left a comment
Contributor
There was a problem hiding this comment.
✅ Auto-approved PR — 46e68115
Blanket team auto-approval is enabled for this reviewer service.
The full PR reviewer audit still runs separately and will publish findings if it detects issues.
tangletools · auto-approval · reason: blanket_auto_approve · 2026-06-24T12:41:13Z
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds a dependency-free git pre-commit hook that auto-fixes biome (lint + format) on staged files and re-stages them, so commits land clean.
.githooks/pre-commitrunsbiome check --writeon staged*.{ts,tsx,js,jsx,json,jsonc}and re-stages them. No-op if biome is absent or nothing relevant is staged.prepare:git config core.hooksPath .githooks(git-guarded, so a consumer's git-dep install is a no-op), then the existingtsupbuild.Why
Matches agent-eval's auto-fix-on-commit behavior without adding the husky/lint-staged toolchain (which would need a lockfile bump on this repo).
Verified
Smoke: staged a badly-formatted file → hook reformatted it (
const a = 2→const a = 2) and re-staged it; the hook's own commit ran clean.