description Prettier Overview
Prettier is an opinionated code formatter that enforces consistent style across an entire codebasefrom semicolons to quote usagewith minimal configuration. By automating formatting on save, it eliminates endless style debates during code reviews, allowing teams to focus purely on logic and architecture rather than stylistic debates.
help Prettier FAQ
What problem does Prettier solve that ESLint does not?
Prettier formats code automatically, while ESLint mainly catches code-quality and correctness rules. A common setup is to let Prettier handle style with commands like prettier --write and let ESLint handle bugs.
What are Prettier's default formatting opinions?
Prettier defaults include a print width of 80 characters and semicolons enabled for JavaScript. Teams can change a few options in a .prettierrc file, but the tool is intentionally not highly configurable.
Can Prettier format TypeScript and Markdown too?
Yes, Prettier supports JavaScript, TypeScript, JSON, CSS, HTML, Markdown, YAML, and other formats. That makes it useful in mixed web repos where package.json, README.md, and .ts files should all stay consistent.
When would a team choose Biome or dprint instead of Prettier?
Biome combines formatting and linting for JavaScript and TypeScript in one Rust-based tool. dprint is another fast formatter with a plugin system, but Prettier remains the familiar default in many Node.js projects.
explore Explore More
Similar to Prettier
See all arrow_forwardReviews & Comments
Write a Review
Be the first to review
Share your thoughts with the community and help others make better decisions.