Skip to content

Latest commit

 

History

History

README.md

@nozomiishii/prettier-config

English | 日本語

Shared Prettier config.


Coding

via South Park on GIPHY


Install

Use the nozo CLI:

pnpx nozo init

This 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.

Included Plugins

Policy

File exclusion: requirePragma over .prettierignore

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.

Experimental options

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.