build: add prettier tooling and formatting config - #128
Merged
Conversation
Phase A of the prettier rollout: the tooling only. No file is reformatted and no CI check is added, so this cannot turn CI red and cannot conflict with open branches. - pin prettier 3.9.6 as an exact root devDependency - add `format` / `format:check` scripts - add .prettierignore (build output, package-lock.json, CHANGELOG.md, the captured bexio HTML fixtures) - add .gitattributes so a Windows checkout gets LF working files; without it core.autocrlf=true makes format:check flag every file locally - wire up format-on-save with prettier scoped per language, so the default formatter does not claim the .ps1 build scripts See docs/superpowers/specs/2026-08-05-prettier-format-sweep-design.md.
Cyclodex
pushed a commit
that referenced
this pull request
Aug 5, 2026
Commit hashes should stay stable. A merge commit is the only one of GitHub's three merge methods that lets a branch's commits reach `main` with the SHAs they already had, and rewritten hashes invalidate anything that points at them. Squash merging is disabled on this repository, which reads as an invitation to rebase-merge instead — it is not. That is how #128 landed as a new SHA, and the same mistake on the prettier sweep would have left `.git-blame-ignore-revs` naming a commit that does not exist on `main`.
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.
Phase A of two. No file in this PR was reformatted.
This adds the Prettier tooling only. The repo has had a
.prettierrcchecked in for a long time, but Prettier itself was never installed anywhere — so the config was only ever honoured by whoever happened to have the editor extension switched on.Design doc:
docs/superpowers/specs/2026-08-05-prettier-format-sweep-design.mdWhat's in here
prettier@3.9.6pinned as an exact root devDependency (.npmrcsetssave-exact=true, so no caret). This is the one intendedpackage-lock.jsonchange.format/format:checkscripts in the rootpackage.json, right aftertypecheck..prettierignore— build/test output (Prettier 3 does not read.gitignore),package-lock.json,CHANGELOG.md, and the captured bexio HTML fixtures.manifest.jsonand.release-please-manifest.jsonare not excluded:updateManifest.jsedits them by regex replacement, so a formatted version survives a release untouched..gitattributeswith* text=auto eol=lf. Git for Windows shipscore.autocrlf=truein its system config, so without this a fresh Windows clone gets CRLF working files andformat:checkflags every file locally while CI stays happy. The index is already 100% LF, sogit add --renormalize .is a no-op and this file changes no content.editor.defaultFormatterwould also claimBuild.ps1/CreateRelease.ps1, which Prettier cannot format. Plus a.vscode/extensions.jsonrecommending the extension.Deliberately not added:
eslint-config-prettier(the one ESLint config here has no stylistic rules, so there is nothing to turn off) and any pre-commit hook framework (the repo has none today).npm run format:checkfails by designThat is expected until Phase B. It reports 108 files and exits 1.
Why Phase B is held back
Phase B is
style: format repo with prettier(a single formatting-only commit) followed byci: enforce prettier formatting(the CI step plus the sweep's SHA in.git-blame-ignore-revs). Adding the CI check now would make CI red, and the sweep would conflict with every open branch.It is gated on the unmerged work in
claude/bexio-extension-issue-12-4ad9dblanding onmain— three commits, all insidepackages/sidePanel-import/src/components/ImportEntries/, squarely in the sweep's path.Both
style:andci:are configured ashiddeninrelease-please-config.json, so the cosmetic commit stays out of the release notes.Verification
npm ci --workspaces --include-workspace-rootnpx prettier --version3.9.6, resolved fromnode_modules/prettiernpm run format:checknpm run typechecknpm testnpm run test:e2egit diff --stat origin/main...HEAD