Skip to content

Commit afdfb1e

Browse files
catomeanclaude
andcommitted
chore: add a formatter, matching the style this repo already writes
singleQuote=true was chosen by counting this repo's own imports, not by fleet decree. The fleet is genuinely split and the two repos that already had a .prettierrc disagreed with each other, so there was no standard to restore. Quote style does not cross repo boundaries; having a gate does. Markdown is ignored for now — prettier rewraps prose, which would bury the real diff. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
1 parent 714b0da commit afdfb1e

4 files changed

Lines changed: 63 additions & 3 deletions

File tree

.prettierignore

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# Build output and vendored trees — formatting these is noise.
2+
node_modules
3+
.next
4+
dist
5+
build
6+
out
7+
coverage
8+
.turbo
9+
.vercel
10+
*.min.js
11+
*.min.css
12+
13+
# Generated during a build, so it is absent locally and present in CI — which
14+
# makes a clean local --check no evidence at all. Contentlayer's output also
15+
# uses import assertions, which prettier's parser rejects outright.
16+
.contentlayer
17+
.astro
18+
.svelte-kit
19+
storybook-static
20+
test-results
21+
playwright-report
22+
23+
# Lockfiles are generated; prettier would rewrite them wholesale.
24+
package-lock.json
25+
pnpm-lock.yaml
26+
yarn.lock
27+
28+
# Markdown is deliberately out of scope for now. Prettier rewraps prose, which
29+
# is where it is most opinionated and least useful, and it would bury the real
30+
# diff. Remove this line when you want docs formatted too.
31+
*.md

.prettierrc

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"semi": true,
3+
"singleQuote": true,
4+
"printWidth": 100,
5+
"tabWidth": 2,
6+
"trailingComma": "all",
7+
"arrowParens": "always",
8+
"endOfLine": "lf"
9+
}

package-lock.json

Lines changed: 18 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,14 +44,17 @@
4444
"lint": "eslint .",
4545
"typecheck": "tsc -p tsconfig.json --noEmit",
4646
"test": "node --test test/*.test.js",
47-
"verify": "npm run lint && npm run typecheck && npm run build && npm test",
48-
"prepare": "npm run build"
47+
"verify": "npm run format:check && npm run lint && npm run typecheck && npm run build && npm test",
48+
"prepare": "npm run build",
49+
"format": "prettier --write .",
50+
"format:check": "prettier --check ."
4951
},
5052
"devDependencies": {
5153
"@eslint/js": "^9.39.5",
5254
"@types/node": "^22.10.2",
5355
"eslint": "^9.39.5",
5456
"globals": "^15.15.0",
57+
"prettier": "3.9.6",
5558
"typescript": "^5.8.2",
5659
"typescript-eslint": "^8.67.0"
5760
}

0 commit comments

Comments
 (0)