.prettierrc Generator
Build a .prettierrc.json for your project. Every Prettier option that matters, in one form, with the modern defaults pre-selected. Download or copy.
How to use the .prettierrc Generator
Toggle the options; the JSON updates live. The defaults match modern style — 100-col width, 2-space indent, double quotes, semicolons, trailing commas everywhere. Drop the file at your repo root.
What a .prettierrc file controls
Prettier reformats your code to one canonical style on every save or commit, which ends the endless debates over quote style, trailing commas, and line width — but only once you have pinned the handful of options it exposes. Left unconfigured, teammates on different Prettier versions or editor defaults can still produce conflicting output, which is exactly the inconsistency the tool is meant to remove.
This builds a .prettierrc.json with the options that actually change the result — print width, quotes, semicolons, trailing commas, tab width — defaulted to modern conventions. Prettier governs the languages it understands (JS, TS, CSS, JSON, Markdown, and more); for the editor-level basics that apply to every file type, add an .editorconfig generator file, and if you are writing TypeScript, set up its compiler with the tsconfig.json generator.
Common use cases
- End style debates — one config decides quotes, commas, and width for the whole team.
- CI formatting checks — fail a build when code is not formatted to the agreed style.
- Format on save — wire the config into your editor so saving normalises code instantly.
- Consistent diffs — formatting noise disappears, so reviews focus on real changes.
- Shared presets — commit the file so every clone of the repo formats identically.