fix: fail CI on lint and format issues instead of silently rewriting them #20
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/biome-ci-fails-on-drift"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The frontend job's Code Quality step ran 'bun run check', which is 'biome check --write ./src'. In CI that is a no-op gate: it rewrites offending files in the runner's working copy and exits 0, so formatting problems and auto-fixable lint issues pass silently and never reach anyone. The rewrites are then discarded with the runner.
Fix: add a 'check:ci' script running 'biome ci ./src' (biome's CI-intended command: reports, never writes, exits non-zero) and point both workflows' Code Quality step at it. The local 'check' script keeps its --write behaviour, which is what you want at a developer's keyboard.
Verified: 'biome ci ./src' exits 0 on the current tree (no pre-existing drift to clean up); with a deliberately misformatted file added, 'bun run check:ci' exits 1 and leaves the file untouched, while the old 'biome check --write' exits 0 and rewrites it - reproducing the bug exactly. Build and unit tests still pass (68/68).
Stacked on #19 and targets that branch, since both PRs edit the same frontend-job region; retarget to main once #19 merges.