feat(git): biome pre-commit hook - #1487
Open
Dhruv-0-Arora wants to merge 5 commits into
Open
Conversation
blocks the commit when it finds biome issues with the changed code
Dhruv-0-Arora
requested review from
0xda157,
BrandonPacewic,
PepperLola,
azaleacolburn and
rutmanz
August 7, 2026 00:24
0xda157
reviewed
Aug 10, 2026
Signed-off-by: Dhruv Arora <dhruv.arora1@autodesk.com>
Dhruv-0-Arora
commented
Aug 10, 2026
rutmanz
requested changes
Aug 10, 2026
Dhruv-0-Arora
force-pushed
the
darora1/336/biome-commit-hook
branch
from
August 12, 2026 18:55
b88ee6c to
a93ecdd
Compare
Signed-off-by: Dhruv Arora <dhruv.arora1@autodesk.com>
Dhruv-0-Arora
force-pushed
the
darora1/336/biome-commit-hook
branch
from
August 12, 2026 21:19
a93ecdd to
5b4b95b
Compare
0xda157
reviewed
Aug 13, 2026
| "assetpack:update": "bun update_manifest.ts && cd public && zip -FS -r assetpack.zip Downloadables -x '**/.*' -x '**/__MACOSX'", | ||
| "assetpack:merge": "git checkout --theirs public/assetpack.zip && rm -rf public/Downloadables && tar -xf public/assetpack.zip -C public/ && git checkout --ours public/assetpack.zip && tar -xf public/assetpack.zip -C public/ && bun run assetpack:update", | ||
| "playwright:install": "bun x playwright install", | ||
| "prepare": "f=$(git rev-parse --git-path hooks/pre-commit 2>/dev/null) || exit 0; [ -e \"$f\" ] || printf '#!/bin/sh\\n' > \"$f\"; grep -q fission/scripts/hooks/pre-commit \"$f\" || printf 'sh ./fission/scripts/hooks/pre-commit\\n' >> \"$f\"; chmod +x \"$f\"", |
Contributor
There was a problem hiding this comment.
??? this is a terrible one liner. make this it's own script or simplify it.
Collaborator
Author
There was a problem hiding this comment.
I would personally disagree - I feel that a script is unnecessary and all this line does is append
sh ./fission/scripts/hooks/pre-commit to .git/hooks/pre-commit if it doesn't already exist.
Member
There was a problem hiding this comment.
If you're using bash if statements it should probably be an actual file imo. Having everything on one line with a bunch of string escaping and no whitespace is not exactly a nice experience
Collaborator
Author
There was a problem hiding this comment.
👍 im going to change it. Julian also agreed with you guys
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.
Task
A git hook to notify you when you try to commit something that you have a formatting error in the files that you are trying to commit. To install just
bun ish /fission/scripts/hooks/pre-committo your /.git/hooks/pre-commitTo bypass, run
git commit *--no-verify*when committingNote
Works on git worktrees only if that worktree contains the /fission/scripts/hooks/pre-commit file
Warning
Install script doesn't work on windows when using powershell and cmd. Fails cleanly
SYNTH-336
Symptom
There a quite a few
chore(formatting): ...commits right now. This PR aims to reduce the number of those.Verification
Create a formatting mistake in a file and try to commit the formatting mistake.
Before merging, ensure the following criteria are met: