Skip to content

Add Prettier with a pre-commit hook, and format the tree - #89

Merged
david-sling merged 3 commits into
mainfrom
prettier
Sep 28, 2026
Merged

david-sling merged 3 commits into
mainfrom
prettier

Conversation

@david-sling

Copy link
Copy Markdown
Owner

Adds Prettier with one style everywhere: single quotes, no semicolons, 120 characters wide, trailing commas. lib/, cli/ and tests/ already used this style, so most of the reformat is the UI's double quotes and semicolons.

Commits

  1. Tooling: .prettierrc.json, .prettierignore, husky, and lint-staged. The pre-commit hook formats only the files being committed. npm run format and npm run format:check cover the whole tree.
  2. Reformat: the output of npm run format and nothing else (100 files).
  3. .git-blame-ignore-revs: points at commit 2 so it stays out of blame. GitHub reads this file on its own. Locally, run git config blame.ignoreRevsFile .git-blame-ignore-revs once per clone.

Only code files are formatted, not markdown, JSON or CSS. A test compares the join prompt in docs/PRODUCT.md character for character with its copy in lib, so a formatter shouldn't reflow it.

prepare: husky runs during the Docker npm ci too. Husky prints a notice there when it finds no .git, and exits 0.

Checks

format:check, the typecheck, ESLint, the app suite (608 tests) and the CLI suite (148 tests) all pass on the reformatted tree.

Merge order

Merge this after the error-hints PR. Rebase onto main, re-run npm run format, and regenerate commit 3 with the new hash.

🤖 Generated with Claude Code

david-sling and others added 3 commits September 29, 2026 00:57
One style across the repo: single quotes, no semicolons, 120 wide, trailing
commas. It is the style lib/, cli/ and tests/ were already written in; the
UI's double quotes and semicolons go with it.

The pre-commit hook runs lint-staged, which formats only the files being
committed. npm run format and format:check cover the whole tree. Only code
is formatted, not markdown, JSON or CSS: the join prompt in PRODUCT.md is
compared character for character with its copy in lib, and a formatter has no
business reflowing it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
npm run format, and nothing else. Mostly the UI moving to single quotes and
no semicolons, and long calls rewrapped at 120.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
GitHub reads .git-blame-ignore-revs on its own. Locally, git blame needs
git config blame.ignoreRevsFile .git-blame-ignore-revs once per clone.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@vercel

vercel Bot commented Sep 28, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
wave Ready Ready Preview Sep 28, 2026 7:29pm UTC

@david-sling
david-sling merged commit 584639e into main Sep 28, 2026
6 checks passed
@david-sling
david-sling deleted the prettier branch September 28, 2026 19:31

This branch was successfully deployed

1 active deployment
Preview — 9b316e8e Deployed Sep 28, 2026 by vercel[bot]
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.

1 participant