Prettier is an opinionated code formatter.
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.azure-pipelines chore(azure): node v4 compatible yarn (#5766) Jan 18, 2019
.github docs: add CHANGELOG.unreleased.md (#5775) Jan 21, 2019
bin refactor(cli): separate files and make it pure as possible (#2730) Sep 3, 2017
docs Update ext install command to match readme (#5784) Jan 21, 2019
scripts chore(scripts): add update-stable-docs to release script (#5772) Jan 20, 2019
src fix(mdx): correctly recognize inline JSX (#5783) Jan 22, 2019
tests fix(mdx): correctly recognize inline JSX (#5783) Jan 22, 2019
tests_config fix: get rid of CRLF (#5494) Dec 8, 2018
tests_integration fix(api): do not report the same deprecation warning more than once (#… Jan 20, 2019
website Fix typo (#5776) Jan 20, 2019
.codecov.yml Improve coverage and remove some dead code (#2504) Jul 17, 2017
.eslintignore Introduce Release script (#4631) Jun 5, 2018
.eslintrc.yml lint fixes Apr 17, 2018
.flowconfig Build the dist/ with rollup (#1794) May 29, 2017
.gitattributes fix: get rid of CRLF (#5494) Dec 8, 2018
.gitignore chore: update azure pipelines (#5611) Dec 18, 2018
.ignore Remove .npmignore and update .ignore (#2560) Jul 30, 2017
.pre-commit-hooks.yaml docs(blog): 1.15 release (#5296) Nov 7, 2018
.prettierignore Implement getSupportInfo() and use it for inference (#3033) Nov 3, 2017
.yarnrc chore(yarn): disable integrity migration Oct 27, 2018
CHANGELOG.md Release 1.16.0 Jan 20, 2019
CHANGELOG.unreleased.md fix(mdx): correctly recognize inline JSX (#5783) Jan 22, 2019
CONTRIBUTING.md Rename "babylon" with "babel" (#5647) Dec 27, 2018
LICENSE Update copyright line (#5455) Jan 3, 2019
README.md chore: update azure pipelines (#5611) Dec 18, 2018
azure-pipelines.yml chore: update azure pipelines (#5611) Dec 18, 2018
commands.md Add a new `trim` command to trim whitespaces in the current line (#4772) Oct 6, 2018
index.js refactor: move index.js and standalone.js to src (#5054) Sep 6, 2018
jest.config.js chore: update azure pipelines (#5611) Dec 18, 2018
package.json Bump Prettier dependency to 1.16.0 Jan 20, 2019
standalone.js refactor: move index.js and standalone.js to src (#5054) Sep 6, 2018
yarn.lock Bump Prettier dependency to 1.16.0 Jan 20, 2019

README.md

Prettier Banner

Opinionated Code Formatter

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

Azure Pipelines Build Status Codecov Coverage Status Blazing Fast
npm version weekly downloads from npm code style: prettier Chat on Gitter 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.