Observation found while implementing #10595 (a scripts/**-only diff). Filed unassigned, not fixed there — it is a different surface from that card and may well be deliberate.
What I measured
The repo has no formatter of record: no .prettierrc*, no prettier.config.*, no .editorconfig, no format/prettier entry in root package.json scripts, and no reference to prettier in any .github/workflows/*.yml. AGENTS.md says nothing about formatting either (grep -niE "prettier|formatter|format on|code style" AGENTS.md → no hits). The linter of record is ESLint (pnpm lint).
That is a coherent design. The trap is what happens to an agent told to "run whatever lint/format the repo runs on changed files" — the standing instruction in dispatch briefs. Reaching for the obvious tool gives a false signal in both directions:
Prettier's defaults reject files nobody touched. Run against pristine origin/main content at its repo path:
$ npx prettier --check scripts/check-nul-bytes.mjs scripts/assert-console-spec-injection.mjs scripts/invoked-as.mjs
[warn] scripts/check-nul-bytes.mjs
[warn] scripts/assert-console-spec-injection.mjs
[warn] scripts/invoked-as.mjs
The disagreement is quote style — the codebase is single-quoted throughout, Prettier's default is double. So prettier --write on a changed file rewrites every string literal in it, burying a small diff under a whole-file reformat. On a PR that is reviewer-hostile and, in a gate script, actively dangerous.
Copying a file out of the repo to compare against flips the verdict. I checked byte-identical origin/main content from a scratchpad path under /tmp and got All matched files use Prettier code style! for the same bytes that warn at the repo path — Prettier resolved some config outside the repo for the /tmp copy and none for the repo copy. An agent doing exactly that comparison concludes their own edits introduced the deviation, and "fixes" it.
npx prettier --find-config-path scripts/console-spec-probes.mjs → [error] Can not find configure file, which is the honest answer and the one worth having in writing.
Why it is a finding and not a queued bug
Nothing is broken. CI never runs Prettier, so no PR has ever failed on this, and every file in the tree is internally consistent. The cost is one agent-round each time someone reaches for the tool — and the worst case is not a wasted round but a merged whole-file reformat riding on an unrelated fix.
Shape if it is taken
Cheapest is one line in AGENTS.md naming ESLint as the only style authority and saying Prettier is deliberately absent. A .prettierignore covering the repo would also make --check honest, and a .prettierrc with singleQuote: true would make the tool usable rather than merely silent — but that is a real decision about adopting a formatter, not a doc fix, and it should not be made as a rider on someone else's card.
Refs: #10595 (the card this surfaced under)
Observation found while implementing #10595 (a
scripts/**-only diff). Filed unassigned, not fixed there — it is a different surface from that card and may well be deliberate.What I measured
The repo has no formatter of record: no
.prettierrc*, noprettier.config.*, no.editorconfig, noformat/prettierentry in rootpackage.jsonscripts, and no reference toprettierin any.github/workflows/*.yml.AGENTS.mdsays nothing about formatting either (grep -niE "prettier|formatter|format on|code style" AGENTS.md→ no hits). The linter of record is ESLint (pnpm lint).That is a coherent design. The trap is what happens to an agent told to "run whatever lint/format the repo runs on changed files" — the standing instruction in dispatch briefs. Reaching for the obvious tool gives a false signal in both directions:
Prettier's defaults reject files nobody touched. Run against pristine
origin/maincontent at its repo path:The disagreement is quote style — the codebase is single-quoted throughout, Prettier's default is double. So
prettier --writeon a changed file rewrites every string literal in it, burying a small diff under a whole-file reformat. On a PR that is reviewer-hostile and, in a gate script, actively dangerous.Copying a file out of the repo to compare against flips the verdict. I checked byte-identical
origin/maincontent from a scratchpad path under/tmpand gotAll matched files use Prettier code style!for the same bytes that warn at the repo path — Prettier resolved some config outside the repo for the/tmpcopy and none for the repo copy. An agent doing exactly that comparison concludes their own edits introduced the deviation, and "fixes" it.npx prettier --find-config-path scripts/console-spec-probes.mjs→[error] Can not find configure file, which is the honest answer and the one worth having in writing.Why it is a
findingand not a queued bugNothing is broken. CI never runs Prettier, so no PR has ever failed on this, and every file in the tree is internally consistent. The cost is one agent-round each time someone reaches for the tool — and the worst case is not a wasted round but a merged whole-file reformat riding on an unrelated fix.
Shape if it is taken
Cheapest is one line in
AGENTS.mdnaming ESLint as the only style authority and saying Prettier is deliberately absent. A.prettierignorecovering the repo would also make--checkhonest, and a.prettierrcwithsingleQuote: truewould make the tool usable rather than merely silent — but that is a real decision about adopting a formatter, not a doc fix, and it should not be made as a rider on someone else's card.Refs: #10595 (the card this surfaced under)