Prettier

Prettier

  • Playground
  • About
  • Usage
  • Blog
  • GitHub

›Usage

About

  • What is Prettier?
  • Why Prettier?
  • Prettier vs. Linters
  • Option Philosophy
  • Rationale

Usage

  • Install
  • CLI
  • API
  • Browser
  • Plugins (Beta)
  • Pre-commit Hook
  • Watching For Changes
  • Integrating with ESLint
  • Ignoring Code

Configuring Prettier

  • Options
  • Configuration File

Editors

  • Editor Integration
  • WebStorm Setup
  • Vim Setup

Misc

  • Technical Details
  • Related Projects
Edit

Install

Install with yarn:

yarn add prettier --dev --exact
# or globally
yarn global add prettier

We're using yarn but you can use npm if you like:

npm install --save-dev --save-exact prettier
# or globally
npm install --global prettier

We recommend pinning an exact version of prettier in your package.json as we introduce stylistic changes in patch releases.

← RationaleCLI →
Prettier
Docs
AboutUsage
Community
User ShowcaseStack OverflowChat on Gitter@PrettierCode on TwitterFollow Prettier on Twitter
More
BlogGitHubIssuesStar