Skip to content

chore: add a formatter - #64

Merged
github-actions[bot] merged 6 commits into
mainfrom
chore/add-a-formatter
Aug 29, 2026
Merged

chore: add a formatter#64
github-actions[bot] merged 6 commits into
mainfrom
chore/add-a-formatter

Conversation

@catomean

Copy link
Copy Markdown
Collaborator

3 of 30 repos had any formatter at all. This adds one here, and wires format:check into verify so 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 .prettierrc disagreed with each other (trailingComma: all vs es5, arrowParens: always vs avoid).

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 singleQuote here 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

  • Markdown. Prettier rewraps prose, which is where it is most opinionated and least useful, and it would bury the real diff. One line in .prettierignore turns it on later.
  • Lockfiles and build output, for the obvious reason.

Reading the diff

Three commits, on purpose:

  1. config, ignore file, scripts
  2. the reformat — mechanical, no behaviour change
  3. .git-blame-ignore-revs listing commit 2

Run git config blame.ignoreRevsFile .git-blame-ignore-revs once and git blame will skip straight past the reformat.

🤖 Generated with Claude Code

https://claude.ai/code/session_01UvjGNAS9CMfEGNW26tUR4P

catomean and others added 3 commits August 29, 2026 11:34
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>
@catomean
catomean force-pushed the chore/add-a-formatter branch from 7cb158a to be645f1 Compare August 29, 2026 09:39
The previous commit regenerated pnpm-lock.yaml with local pnpm 11, which
re-resolved the `github:catomean/ai-forms` shorthand from a codeload tarball
to git+ssh. CI runs pnpm 9, which cannot read that entry — and could not fetch
over SSH even if it could, having no key. The lockfile was valid on the machine
that wrote it and broken everywhere else.

Resolved with pnpm 9 instead. The rollout script now derives the major from
packageManager/PNPM_VERSION and refuses any lockfile that gains an ssh-form
resolution.
pnpm records whichever transport it could use when the lockfile was written.
This laptop has an SSH key, so pnpm wrote git+ssh; CI has none and the install
died on 'Permission denied (publickey)'. Resolving with GIT_SSH_COMMAND=/bin/false
reproduces CI's capabilities and yields git+https, which needs no credentials
for a public repo.
kivvi already depended on prettier, so this PR is script wiring, not a new
dependency — and it should not have rewritten the lockfile at all.

Regenerating it re-resolved the `github:catomean/ai-forms` shorthand three
different ways, none of which CI could use: git+ssh (no key on the runner),
then git+https (fetches, but pnpm's virtual-store path for a git dep failed to
import). Only main's original codeload tarball works. The resolution recorded
in a lockfile depends on what the machine writing it could reach, which makes
'it resolved fine locally' worth nothing.

So: restore main's lockfile and change only the specifier, which is what
--frozen-lockfile actually compares, and format with 3.8.0 — the version this
repo's own lockfile already pinned — rather than dragging it to the fleet's
3.9.6 and reformatting against a version it does not install.
@github-actions
github-actions Bot merged commit afbe985 into main Aug 29, 2026
1 check passed
@github-actions
github-actions Bot deleted the chore/add-a-formatter branch August 29, 2026 10:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant