Skip to content

chore: add prettier 3.9.6 (sibling config), format, wire lint into CI - #39

Merged
bvalosek merged 1 commit into
mainfrom
prettier-3.9
Sep 9, 2026
Merged

chore: add prettier 3.9.6 (sibling config), format, wire lint into CI#39
bvalosek merged 1 commit into
mainfrom
prettier-3.9

Conversation

@bvalosek

@bvalosek bvalosek commented Sep 9, 2026

Copy link
Copy Markdown
Member

Brings this repo onto the same prettier version and config as the sibling metalabel repos, checks the reformat in, and makes pnpm lint a CI gate. This repo had no formatter before.

Added

Package Resolved Notes
prettier 3.9.6 matches the siblings
@ianvs/prettier-plugin-sort-imports 4.7.1 matches the siblings

Both cleared the 7-day quarantine on their own; no waivers.

  • .prettierrc.json byte-identical to the siblings (printWidth: 100, singleQuote, trailingComma: all, import-sort plugin).
  • .prettierignore covers the usual dirs plus the two generator outputs, openapi.json and src/generated/, with a comment: pnpm generate rewrites them and CI byte-compares both against a fresh run, so formatting them would report drift every check. Verified with prettier --file-info (ignored: true for both) and a pnpm generate clean-diff after a full pnpm format.
  • format / lint scripts (sibling names).
  • Lint step in ci.yml and in release.yml's test job (which already re-runs the other gates against the tagged commit because CI doesn't fire on tags). release-npm untouched.
  • AGENTS.md "Checks" now lists five gates.

Reformatted: 7 files, formatting only

  • AGENTS.md one emphasis marker; README.md one table's padding; scripts/update-spec.mjs a ternary collapsed onto one line.
  • src/index.ts, tests/client.spec.ts, tests/readme-mirror.spec.ts, tests/readme-signed-fetch.ts: the sort-imports plugin removed the blank line between import groups. Zero imports reordered.

One asymmetry worth knowing: prettier reformats tests/readme-signed-fetch.ts but not the README code block it mirrors (the plugin doesn't run on fenced code in markdown). The readme-mirror.spec.ts contract filters blank lines and sorts imports before comparing, so a blank-line divergence is invisible to it and the mirror test passes. If a future prettier/plugin change reformats embedded code differently from a standalone file, that contract won't see it.

Checks

Gate Result
pnpm lint clean
pnpm typecheck exit 0
pnpm test pass
pnpm build ESM + DTS success
pnpm generate → diff clean

Not a release.

🤖 Generated with Claude Code

https://claude.ai/code/session_01EZfED2cWfs5cJTRK9GmjQs

Adds prettier 3.9.6 + @ianvs/prettier-plugin-sort-imports 4.7.1 with the
.prettierrc.json the sibling metalabel repos use, a .prettierignore that
keeps the two generator outputs (openapi.json, src/generated/) out of the
formatter so the byte-compare gate stays honest, `format`/`lint` scripts,
and a Lint step in ci.yml and release.yml before typecheck. Reformats 7
files, formatting only: the sort-imports plugin reordered zero imports
(blank-line removal only), one ternary collapsed, one emphasis marker and
one table padding normalized.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EZfED2cWfs5cJTRK9GmjQs
@bvalosek
bvalosek merged commit 8add459 into main Sep 9, 2026
1 check passed
@bvalosek
bvalosek deleted the prettier-3.9 branch September 9, 2026 01:10
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