Prettier was created by James Long in January 2017 and quickly became the standard code formatter for JavaScript projects. It’s maintained by a team of volunteers and supported through Open Collective donations.
The philosophy behind Prettier is simple: stop arguing about code style. Instead of offering dozens of configurable options, Prettier makes most stylistic decisions for you. It parses your code into an AST and reprints it from scratch, ignoring whatever formatting existed before. The result is consistent code across your entire team with zero effort.
Prettier supports JavaScript, TypeScript, CSS, HTML, JSON, Markdown, YAML, GraphQL, and many more languages through plugins. The community has built plugins for PHP, Java, Ruby, Swift, and other languages. It integrates with every major editor — VS Code, WebStorm, Vim, Emacs — and can run as a pre-commit hook to catch unformatted code before it reaches the repository.
One of the smartest design choices was keeping configuration options minimal. There are only about a dozen settings: print width, tab width, semicolons, quotes, and a few others. This means teams can adopt Prettier in minutes without weeks of bikeshedding over style guides.
Prettier gets downloaded over 35 million times per week on npm. With over 49,000 GitHub stars, it’s one of the most popular developer tools ever created. Major companies and open-source projects like React, Angular, and Vue all use Prettier.