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

Watching For Changes

If you prefer to have prettier watch for changes from the command line you can use a package like onchange. For example:

npx onchange '**/*.js' -- npx prettier --write {{changed}}

or add the following to your package.json

  "scripts": {
    "prettier-watch": "onchange '**/*.js' -- prettier --write {{changed}}"
  },
← Pre-commit HookIntegrating with ESLint →
Prettier
Docs
AboutUsage
Community
User ShowcaseStack OverflowChat on Gitter@PrettierCode on TwitterFollow Prettier on Twitter
More
BlogGitHubIssuesStar