Add Prettier (config + scripts), not yet applied

printWidth 100 to stay close to the existing hand-formatting; single
quotes; trailing commas. `npm run format` / `npm run format:check`.
The formatting pass itself is the next commit so it stays isolated.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017Ve7HLspzeG2xDPtJQ8vmu
This commit is contained in:
chris 2026-09-10 11:22:46 -04:00
parent 803ed2a988
commit dfd848d506
4 changed files with 33 additions and 1 deletions

7
.prettierignore Normal file
View File

@ -0,0 +1,7 @@
dist
dev-dist
node_modules
package-lock.json
src/data/snapshot.json
docs/screenshots
CHANGELOG.md

5
.prettierrc.json Normal file
View File

@ -0,0 +1,5 @@
{
"singleQuote": true,
"printWidth": 100,
"trailingComma": "all"
}

17
package-lock.json generated
View File

@ -17,6 +17,7 @@
"workbox-window": "^7.4.1"
},
"devDependencies": {
"prettier": "3.9.6",
"vite": "^6.4.3",
"vite-plugin-pwa": "^1.3.0"
},
@ -4925,6 +4926,22 @@
"node": "^10 || ^12 || >=14"
}
},
"node_modules/prettier": {
"version": "3.9.6",
"resolved": "https://registry.npmjs.org/prettier/-/prettier-3.9.6.tgz",
"integrity": "sha512-OpN0zzVdiaiAhxpuuj5efpIS4sY9j7bY6uR5mnj5yPzGkdkjNKSJeUThPb60Jw29QuAZgA4o+/iB49kFiaBX6g==",
"dev": true,
"license": "MIT",
"bin": {
"prettier": "bin/prettier.cjs"
},
"engines": {
"node": ">=14"
},
"funding": {
"url": "https://github.com/prettier/prettier?sponsor=1"
}
},
"node_modules/pretty-bytes": {
"version": "6.1.1",
"resolved": "https://registry.npmjs.org/pretty-bytes/-/pretty-bytes-6.1.1.tgz",

View File

@ -9,13 +9,16 @@
"prebuild": "node scripts/build-snapshot.mjs",
"dev": "vite",
"build": "vite build",
"preview": "vite preview"
"preview": "vite preview",
"format": "prettier --write .",
"format:check": "prettier --check ."
},
"engines": {
"node": ">=20"
},
"license": "MIT",
"devDependencies": {
"prettier": "3.9.6",
"vite": "^6.4.3",
"vite-plugin-pwa": "^1.3.0"
},