Repository navigation
Format with Prettier (formatting only) - #58
Merged
Merged
Conversation
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
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.
Commit 2 is
f15c95643662c452e929e508997e410f262d84ee.What this does
Formats the repo with Prettier 3.3.3 (
singleQuote,printWidth120,trailingCommaes5). No hand-written code changes.985c124Config only: prettier@3.3.3 (exact),.prettierrc,.prettierignore.f15c956npx prettier --write .and nothing else (50 files).c449406.git-blame-ignore-revs(commit 2),npx prettier --check .in CI right afternpm ci(the repo has no lint step), a note in CLAUDE.md. There is no AGENTS.md.124d9a1Extra commit: bump to v57 and runtools/build.py. Formattingapp/andshared/changes the hashes inapp/sw.jsand the CSS copied into the overlay and demo page, so CI'sbuild.py --checkwould fail without it, and CI also requires the version bump. Only generated files and the version line change.Ignored in
.prettierignoreNothing had to be ignored for non-idempotency: two
--writeruns gave the same result and--checkpasses. These are ignored for other reasons:shared/ink-core.js:tools/build_overlay.pydeletes the line ending in// @strip-inline(the export list). Prettier wraps that export over many lines and moves the marker, soexportleaked 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 bytools/build.py.app/sw.js,app/version.json,app/index.html,app/report/index.html: also written bybuild.pywith regexes that expect the current markup (e.g.content="...">); Prettier's" />madebuild.py --checkfail.app/vendor/(checked byte for byte byvendor_libs.py), lockfiles,tests/fixtures/Old_v13.html(old overlay used as a compatibility fixture),node_modules/and test output.docs/, by the owner's choice.Lockfile diff
Only prettier (
package-lock.json+18/-1,package.json+2/-1):prettier3.3.3 added to the root devDependencies and one newnode_modules/prettierentry (resolved, integrity, dev, MIT, bin, engines node >=14, funding). Nothing else changed.Verification
python3 tools/build.py --checkandtools/vendor_libs.py --check: pass.npx prettier --check .: pass; a second--writechanged 0 files.shared/strings.jsandtools/report-relay.gs; CSS and HTML text normalised). The one lenient miss isbranding/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 ofmain.Generated by Claude Code