chore: add a formatter - #233
Merged
Merged
Conversation
singleQuote=true 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>
catomean
force-pushed
the
chore/add-a-formatter
branch
from
August 29, 2026 09:43
10b039a to
6501152
Compare
The formatter was added to the root package.json, but CI installs with working-directory: frontend and then runs npm run verify at the root, so root devDependencies are never installed at all. format:check died with 'prettier: not found' before checking a single file. Root now delegates into frontend the way every other root script already does, and prettier is a devDependency of frontend, whose lockfile CI installs. frontend also needs its own .prettierignore: prettier resolves that file relative to the working directory, so the root one stopped applying the moment the command ran from frontend/ — which is how README.md and Playwright output ended up being checked.
format:check ran green locally and failed in CI on files that do not exist
locally: CI builds contentlayer before verify, so .contentlayer/generated is
present by the time prettier looks. One generated module imports with
assert { type: 'json' }, which prettier's parser rejects outright.
A local --check cannot see build output, so generated directories have to be
ignored by name rather than discovered.
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