Know Your Tech Stack

Discover what web technologies do and how they're used all in one place!

Prettier

What is Prettier?

An opinionated code formatter that enforces a consistent style by parsing your code and re-printing it with its own rules, taking the burden of code formatting off developers. Supports JavaScript, TypeScript, CSS, HTML, JSON, Markdown, and many other languages. Eliminates all debates about code style by providing a single, consistent formatting standard. Used by companies like Facebook, Google, and Microsoft. Known for its zero-configuration approach and ability to format code automatically.

When to use it

  • Perfect for automatically formatting code, ensuring consistent code style across projects, and eliminating formatting discussions in code reviews.
  • Ideal when you want to focus on code logic rather than formatting, or when working in teams that need consistent code style.
  • Excellent for projects using multiple languages, when you want editor integration, or need to format code as part of your CI/CD pipeline.
  • Commonly used alongside ESLint, in pre-commit hooks, and in editor configurations.

When NOT to use it

  • When you need custom formatting rules - Prettier is opinionated and less configurable
  • Projects requiring specific code style - Prettier enforces its own style
  • When formatting conflicts with ESLint - requires additional configuration
  • Non-code files requiring formatting - limited language support

Related Technologies

More in Tool

Learning Resources