chore: add prettier 3.9.6 (sibling config), format, wire lint into CI - #39
Merged
Conversation
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
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.
Brings this repo onto the same prettier version and config as the sibling metalabel repos, checks the reformat in, and makes
pnpm linta CI gate. This repo had no formatter before.Added
prettier@ianvs/prettier-plugin-sort-importsBoth cleared the 7-day quarantine on their own; no waivers.
.prettierrc.jsonbyte-identical to the siblings (printWidth: 100,singleQuote,trailingComma: all, import-sort plugin)..prettierignorecovers the usual dirs plus the two generator outputs,openapi.jsonandsrc/generated/, with a comment:pnpm generaterewrites them and CI byte-compares both against a fresh run, so formatting them would report drift every check. Verified withprettier --file-info(ignored: truefor both) and apnpm generateclean-diff after a fullpnpm format.format/lintscripts (sibling names).Lintstep inci.ymland inrelease.yml'stestjob (which already re-runs the other gates against the tagged commit because CI doesn't fire on tags).release-npmuntouched.Reformatted: 7 files, formatting only
AGENTS.mdone emphasis marker;README.mdone table's padding;scripts/update-spec.mjsa 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.tsbut not the README code block it mirrors (the plugin doesn't run on fenced code in markdown). Thereadme-mirror.spec.tscontract 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
pnpm lintpnpm typecheckpnpm testpnpm buildpnpm generate→ diffNot a release.
🤖 Generated with Claude Code
https://claude.ai/code/session_01EZfED2cWfs5cJTRK9GmjQs