English | 日本語
Shared Prettier config.
via South Park on GIPHY
Use the nozo CLI:
pnpx nozo initThis adds @nozomiishii/prettier-config and prettier to your
devDependencies (pinned), sets "type": "module", adds format /
format:fix / prettier scripts, and writes a prettier.config.ts that
re-exports the shared config.
Files that should never be formatted (pnpm-lock.yaml, submodules/**,
next-env.d.ts, **/routeTree.gen.ts, *.md, *.mdx,
**/.claude/settings.json) are excluded via requirePragma: true overrides in
this config rather than a .prettierignore file.
**/.claude/settings.json also needs parser: jsonc: Claude Code writes it
with multi-line arrays, and the json parser ignores requirePragma while
jsonc honors it.
A .prettierignore would duplicate patterns already in .gitignore and
invite drift between the two. Prettier 3.x already honors .gitignore
automatically, so most ignore needs are covered without a dedicated file.
For the same reason, the Prettier 3.6 checkIgnorePragma option
(@noformat / @noprettier) is not adopted: it adds another opt-out
surface without removing the .prettierignore problem.
Prettier's experimental* options (e.g. experimentalOperatorPosition,
experimentalTernaries) are not adopted, now or in the future. We
wait for them to stabilize and become defaults. Formatting is fine as
long as it's consistent — there is no value in chasing experimental
output changes.
