Skip to content

Format with Prettier (formatting only) - #58

Merged
BPMData merged 4 commits into
mainfrom
ccr-d414e439-dybw6q
Nov 27, 2026
Merged

BPMData merged 4 commits into
mainfrom
ccr-d414e439-dybw6q

Conversation

@BPMData

@BPMData BPMData commented Nov 27, 2026

Copy link
Copy Markdown
Owner

⚠️ Merge with Create a merge commit, not Squash or Rebase. .git-blame-ignore-revs points at commit 2's hash, which only survives a merge commit.

Commit 2 is f15c95643662c452e929e508997e410f262d84ee.

What this does

Formats the repo with Prettier 3.3.3 (singleQuote, printWidth 120, trailingComma es5). No hand-written code changes.

  1. 985c124 Config only: prettier@3.3.3 (exact), .prettierrc, .prettierignore.
  2. f15c956 npx prettier --write . and nothing else (50 files).
  3. c449406 .git-blame-ignore-revs (commit 2), npx prettier --check . in CI right after npm ci (the repo has no lint step), a note in CLAUDE.md. There is no AGENTS.md.
  4. 124d9a1 Extra commit: bump to v57 and run tools/build.py. Formatting app/ and shared/ changes the hashes in app/sw.js and the CSS copied into the overlay and demo page, so CI's build.py --check would fail without it, and CI also requires the version bump. Only generated files and the version line change.

Ignored in .prettierignore

Nothing had to be ignored for non-idempotency: two --write runs gave the same result and --check passes. These are ignored for other reasons:

  • shared/ink-core.js: tools/build_overlay.py deletes the line ending in // @strip-inline (the export list). Prettier wraps that export over many lines and moves the marker, so export leaked into the inline script and the overlay stopped loading (Unexpected token 'export'). Follow-up: make the build strip it properly, then remove this ignore.
  • /index.html, /overlay/ink_overlay.html: generated by tools/build.py.
  • app/sw.js, app/version.json, app/index.html, app/report/index.html: also written by build.py with regexes that expect the current markup (e.g. content="...">); Prettier's " /> made build.py --check fail.
  • app/vendor/ (checked byte for byte by vendor_libs.py), lockfiles, tests/fixtures/Old_v13.html (old overlay used as a compatibility fixture), node_modules/ and test output.
  • Markdown and docs/, by the owner's choice.

Lockfile diff

Only prettier (package-lock.json +18/-1, package.json +2/-1): prettier 3.3.3 added to the root devDependencies and one new node_modules/prettier entry (resolved, integrity, dev, MIT, bin, engines node >=14, funding). Nothing else changed.

Verification

  • Lint, unit tests, smoke script: this repo has none.
  • python3 tools/build.py --check and tools/vendor_libs.py --check: pass.
  • npx prettier --check .: pass; a second --write changed 0 files.
  • Playwright e2e: 143 passed, 0 failed (final tree, Chromium).
  • Token check (acorn tokenizer for JS; whitespace, commas, semicolons, parens and comments dropped, strings compared by value): 44 of 50 files match strictly, 49 of 50 in the lenient pass. Strict misses are all known Prettier effects (unquoted keys in shared/strings.js and tools/report-relay.gs; CSS and HTML text normalised). The one lenient miss is branding/preview.html: it opens <html> but never closes it, and Prettier adds the missing </html>.

After merge

Open branches will need npx prettier --write . on their changed files, then a merge of main.


Generated by Claude Code

Adds prettier 3.3.3 (exact version) as a dev dependency, a .prettierrc, and a
.prettierignore for vendored code, lockfiles, markdown/docs and the files
tools/build.py generates or edits. Nothing is reformatted in this commit.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Ad4FSbVeAwPGzwwmzi736N
Result of `npx prettier --write .` with the config from the previous commit.
No code changes. Generated files are not touched here; they are rebuilt in a
later commit because their hashes depend on the formatted sources.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Ad4FSbVeAwPGzwwmzi736N
- .git-blame-ignore-revs points at the formatting commit
- CI runs `npx prettier --check .` right after `npm ci`
- CLAUDE.md: run `npx prettier --write` on changed files

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Ad4FSbVeAwPGzwwmzi736N
Formatting shared/ and app/ changes the file hashes in app/sw.js and the CSS
copied into the overlay and demo page, so tools/build.py has to be run again.
Also the usual version bump (v56 to v57) that CI requires on every PR.
No hand-written code changed.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Ad4FSbVeAwPGzwwmzi736N
@BPMData
BPMData merged commit caf6b68 into main Nov 27, 2026
1 check passed
@BPMData
BPMData deleted the ccr-d414e439-dybw6q branch November 28, 2026 06:28
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.

2 participants