Skip to content
Prettier is an opinionated code formatter.
Branch: master
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 Update FUNDING.yml May 23, 2019
bin refactor(cli): separate files and make it pure as possible (#2730) Sep 3, 2017
docs Add exit code information to cli docs (#6049) Apr 16, 2019
scripts Remove eval() call from the bundle (#6129) May 17, 2019
src TypeScript: Keep line breaks within mapped types. (#6146) May 24, 2019
tests TypeScript: Keep line breaks within mapped types. (#6146) May 24, 2019
tests_config fix: get rid of CRLF (#5494) Dec 8, 2018
tests_integration Fix plugin resolution tests May 24, 2019
website Playground: Remove `parser` from Copy config JSON (#6155) May 25, 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
.prettierrc Add empty .prettierrc to project root (#6125) May 15, 2019
.yarnrc chore(yarn): disable integrity migration Oct 27, 2018
CHANGELOG.md Update CHANGELOG.md May 14, 2019
CHANGELOG.unreleased.md TypeScript: Keep line breaks within mapped types. (#6146) May 24, 2019
CODE_OF_CONDUCT.md Add a code of conduct (#5891) Feb 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 Remove eval() call from the bundle (#6129) May 17, 2019
standalone.js refactor: move index.js and standalone.js to src (#5054) Sep 6, 2018
yarn.lock Remove eval() call from the bundle (#6129) May 17, 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.

You can’t perform that action at this time.