chore: add a formatter - #449
Merged
Merged
Conversation
singleQuote=false was chosen by counting this repo's own imports, not by fleet decree. The fleet is genuinely split and the two repos that already had a .prettierrc disagreed with each other, so there was no standard to restore. Quote style does not cross repo boundaries; having a gate does. Markdown is ignored for now — prettier rewraps prose, which would bury the real diff. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Mechanical. No behaviour change. This SHA is listed in .git-blame-ignore-revs so `git blame` skips it. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
A whole-repo reformat conflicts with any concurrent commit, and a PR in that state runs ZERO checks while reporting nothing at all — indistinguishable from CI not having started yet. Conflicts resolved to main's content, since this branch contributes formatting and nothing else, then re-formatted to a fixed point.
Both effects were one-liners, so a trailing eslint-disable-line covered the
setState call:
useEffect(() => { setSelected(new Set()); }, [q.length]); // eslint-disable-line ...
prettier expanded the block. The comment stayed on the closing line while the
call moved above it, so the guard protected nothing and the rule its author had
deliberately silenced failed the build.
This is the second shape of the same defect — hirnli had the eslint-disable-NEXT-line
variant. Both come from the same fact: an eslint directive binds to a line
number, so reformatting can silently unbind it, which makes 'mechanical, no
behaviour change' false for any bulk reformat.
desktop-release-drift enforces that anything built into Fleet Runner which differs from the last released tag must carry a version ahead of that tag — main read 0.8.15 and fleet-runner-v0.8.15 already shipped. A whole-repo reformat changes bytes under desktop/, so the gate fires. The alternative was adding desktop/ to .prettierignore, which would buy a quiet PR by carving a permanent hole in the formatter's coverage — the precise shape of silent drift this test was written to catch. Bumping is what the rule asks for and costs one patch release whose only content is whitespace.
A whole-repo reformat conflicts with any concurrent commit, and a conflicting PR runs no checks at all while reporting nothing. Conflicts resolved to main, which is correct because this branch changes formatting and nothing else.
desktop-release-drift is right to refuse this. Everything under desktop/ is built into Fleet Runner, so changing it means shipping: bump the version AND add a FLEET_RUNNER_RELEASES entry, whose stated audience is 'person who installed Fleet Runner and wants to know what changed'. For a whitespace-only build the honest answer is 'nothing', so that release should not exist — and I should not write release notes claiming otherwise. I had bumped to 0.8.16 to get the gate green. That was the wrong direction: publishing a build to three OS runners to keep a formatting PR quiet. Reverted. desktop/ is excluded in .prettierignore with the reasoning recorded there, to be formatted alongside the next real runner change, where the bump and the notes are true anyway.
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.
3 of 30 repos had any formatter at all. This adds one here, and wires
format:checkintoverifyso it actually gates.Why this repo's own style, and not a fleet standard
There was never a standard to restore. Measured across the fleet: excluding openclaw, ~28k single-quoted imports against ~15k double-quoted — and the two repos that already had a
.prettierrcdisagreed with each other (trailingComma: allvses5,arrowParens: alwaysvsavoid).Forcing one quote style would rewrite every string in roughly half the fleet for no benefit. And by the test this whole exercise runs on — does the choice cross repo boundaries? — quote style does not. Nobody copies a file between repos expecting the quotes to match.
So
singleQuotehere was chosen by counting this repo's own imports. The uniformity that matters is that a gate exists everywhere, not that the gate says the same thing everywhere.What is deliberately out of scope
.prettierignoreturns it on later.Reading the diff
Three commits, on purpose:
.git-blame-ignore-revslisting commit 2Run
git config blame.ignoreRevsFile .git-blame-ignore-revsonce andgit blamewill skip straight past the reformat.🤖 Generated with Claude Code
https://claude.ai/code/session_01UvjGNAS9CMfEGNW26tUR4P