Skip to content

chore(format): establish and enforce a prettier baseline - #23

Merged
kamilmysliwiec merged 3 commits into
masterfrom
chore/prettier-baseline
Oct 12, 2026
Merged

kamilmysliwiec merged 3 commits into
masterfrom
chore/prettier-baseline

Conversation

@kamilmysliwiec

Copy link
Copy Markdown
Member

PR Type

  • Build related changes
  • CI related changes

What is the current behavior?

Prettier is a dev dependency, but nothing runs it: 50 of 68 TypeScript files fail prettier --check, CI has no format step, the lint-staged task list is empty, and the contribution guide asks for 100-character lines while .prettierrc uses the default 80.

Closes #22.

What is the new behavior?

  • .prettierrc sets printWidth: 120. That is closest to how the code is already written: 120 changes 39 files, against 44 at 100 and 50 at 80, and it produced roughly half the diff of 100 in line count.
  • npm run format:check (non-mutating) runs in the CI build job after lint.
  • The pre-commit hook now formats staged *.ts files through lint-staged.
  • CONTRIBUTING.md documents the 120-character width and the format commands, replacing the stale DEVELOPER.md#clang-format link.
  • One formatting-only commit brings the codebase to the baseline. .git-blame-ignore-revs lists it, so git blame skips it (GitHub applies this automatically; locally run git config blame.ignoreRevsFile .git-blame-ignore-revs).

Please merge with a merge commit, not a squash, so the commit SHA in .git-blame-ignore-revs stays valid.

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

Format check, build, lint, typecheck and the full test suite pass locally (900 passed, 16 skipped).

Open PRs touching .ts files will conflict after this lands. Resolve by taking their side and running npm run format.

Set printWidth to 120, add a non-mutating format:check script and run it in CI, and make the pre-commit hook format staged TypeScript files. Align the contribution guide with the configuration.
@kamilmysliwiec
kamilmysliwiec merged commit 06a0845 into master Oct 12, 2026
10 checks passed
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.

[discussion]: establish and enforce a clean Prettier baseline

1 participant