prettier
Prettier is an opinionated code formatter
Last updated 2 years ago by prettier-bot .
MIT · Repository · Bugs · Original npm
$ cnpm install prettier 
SYNC missed versions from official npm registry.

Prettier Banner

Opinionated Code Formatter

JavaScript · TypeScript · Flow · JSX · JSON
CSS · SCSS · Less
HTML · Vue · Angular
GraphQL · Markdown · YAML
Your favorite language?

Github Actions Build Status Github Actions Build Status Github Actions Build Status Codecov Coverage Status Blazing Fast
npm version weekly downloads from npm code style: prettier Follow Prettier on Twitter

Intro

Prettier is an opinionated code formatter. It enforces a consistent style by parsing your code and re-printing it with its own rules that take the maximum line length into account, wrapping code when necessary.

Input

foo(reallyLongArg(), omgSoManyParameters(), IShouldRefactorThis(), isThereSeriouslyAnotherOne());

Output

foo(
  reallyLongArg(),
  omgSoManyParameters(),
  IShouldRefactorThis(),
  isThereSeriouslyAnotherOne()
);

Prettier can be run in your editor on-save, in a pre-commit hook, or in CI environments to ensure your codebase has a consistent style without devs ever having to post a nit-picky comment on a code review ever again!


Documentation

Install · Options · CLI · API

Playground


Badge

Show the world you're using Prettiercode style: prettier

[![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square)](https://github.com/prettier/prettier)

Contributing

See CONTRIBUTING.md.

Current Tags

  • 3.0.0                                ...           latest (2 years ago)
  • 3.0.0-alpha.12                                ...           next (2 years ago)

27 Versions

  • 3.0.0-alpha.12                                ...           2 years ago
  • 3.0.0                                ...           2 years ago
  • 2.8.8                                ...           2 years ago
  • 2.8.2                                ...           3 years ago
  • 3.0.0-alpha.4                                ...           3 years ago
  • 3.0.0-alpha.1                                ...           3 years ago
  • 3.0.0-alpha.0                                ...           3 years ago
  • 2.1.2                                ...           5 years ago
  • 2.7.1                                ...           3 years ago
  • 2.6.2                                ...           3 years ago
  • 2.6.1                                ...           3 years ago
  • 2.6.0                                ...           3 years ago
  • 2.3.0                                ...           4 years ago
  • 2.5.1                                ...           4 years ago
  • 2.4.1                                ...           4 years ago
  • 2.4.0                                ...           4 years ago
  • 2.3.2                                ...           4 years ago
  • 2.2.1                                ...           5 years ago
  • 2.1.1                                ...           5 years ago
  • 1.16.3                                ...           7 years ago
  • 2.0.4                                ...           5 years ago
  • 1.15.3                                ...           7 years ago
  • 1.17.0                                ...           6 years ago
  • 1.18.2                                ...           6 years ago
  • 1.5.3                                ...           8 years ago
  • 2.0.5                                ...           5 years ago
  • 1.19.1                                ...           6 years ago
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (0)
None
Dev Dependencies (0)
None
Dependents (0)
None

Copyright 2013 - present © cnpmjs.org