1001Ferramentas
🛠️Dev

Prettier Config Generator

Generates a ready .prettierrc with the most common choices: single quotes, no semicolons, trailing commas and a 100-column line.


  

An opinionated starting point for formatting

New project, three people, three editor setups. The first pull request rewrites half a file because someone swapped single quotes for double ones. The fix is a .prettierrc at the root so the formatter decides, but then you open the Prettier docs, find twenty options and push the decision to later. Later never arrives, and the diffs keep getting noisier.

The Generate button here always returns the same block: no semicolons, single quotes, trailing commas everywhere, a print width of 100, two-space indentation, mandatory parentheses on arrow functions and lf line endings. Worth stating plainly: there are no controls to change those values, even though the tool description promises choices. Treat it as a starting point, not a configurator.

Save the output as .prettierrc.json at the repository root and edit whatever your team disagrees with. The two lines that usually spark debate are semi false and printWidth 100; the rest rarely bothers anyone. The lf setting only ends the CRLF fight on Windows if .gitattributes backs it up. Nothing leaves your machine: the JSON is assembled in the browser.

Frequently asked questions

Can I pick double quotes or semicolons?
Not on this page. The output is fixed at single quotes with no semicolons. Since it is a seven-line JSON file, flipping semi to true in your editor takes less time than reading this answer.
Where does .prettierrc.json go?
At the project root, next to package.json. Prettier searches upward from the file being formatted, so a subfolder can carry its own config when you need one.
Do I still need ESLint?
They solve different problems: Prettier handles shape, ESLint handles rules. If you run both, add eslint-config-prettier to switch off the ESLint style rules that fight the formatter.

Related Tools