Skip to content
Prettier is an opinionated code formatter.
JavaScript CSS TypeScript HTML Other
Branch: master
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.azure-pipelines Add changelog lint script (#7320) Jan 15, 2020
.github Rename SECURITY.md to .github/SECURITY.md Nov 13, 2019
bin refactor(cli): separate files and make it pure as possible (#2730) Sep 3, 2017
changelog_unreleased Support printing inline handlebars in html (through embed function) (#… Jan 21, 2020
docs handlebars: Add prettier-ignore (#7275) Jan 20, 2020
scripts Switch `rollup-plugin-node-resolve` to `@rollup/plugin-node-resolve` (#… Jan 18, 2020
src Support printing inline handlebars in html (through embed function) (#… Jan 21, 2020
tests Support printing inline handlebars in html (through embed function) (#… Jan 21, 2020
tests_config tests: "Expected" and "Received" are mixed up in parser verification … Dec 10, 2019
tests_integration Fix quote style, enable `quote` rule (#7304) Jan 14, 2020
website website: remove `eslint-disable` in landing.js (#7329) Jan 21, 2020
.codecov.yml Improve coverage and remove some dead code (#2504) Jul 17, 2017
.editorconfig Add `.editorconfig` (#7252) Jan 14, 2020
.eslintignore Introduce Release script (#4631) Jun 5, 2018
.eslintrc.yml Fix quote style, enable `quote` rule (#7304) Jan 14, 2020
.flowconfig Build the dist/ with rollup (#1794) May 29, 2017
.gitattributes fix: get rid of CRLF (#5494) Dec 8, 2018
.gitignore Ignore test files (#7018) Nov 20, 2019
.ignore fix: Adjacent JSX elements should be allowed in mdx (#6332) Jul 29, 2019
.pre-commit-hooks.yaml docs(blog): 1.15 release (#5296) Nov 7, 2018
.prettierignore set up cspell (#6684) Oct 24, 2019
.prettierrc Add empty .prettierrc to project root (#6125) May 15, 2019
.yarnrc chore(yarn): disable integrity migration Oct 27, 2018
CHANGELOG.md Add missing headings to changelog Nov 9, 2019
CODE_OF_CONDUCT.md Add a code of conduct (#5891) Feb 22, 2019
CONTRIBUTING.md Add basic instructions on how to run Prettier locally for debugging. (#… Oct 20, 2019
LICENSE Update copyright line (#5455) Jan 3, 2019
README.md chore: update azure pipelines (#5611) Dec 18, 2018
azure-pipelines.yml Run CI on the `next` branch Nov 10, 2019
commands.md Add a new `trim` command to trim whitespaces in the current line (#4772) Oct 6, 2018
cspell.json Add changelog lint script (#7320) Jan 15, 2020
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 rollup from 1.29.0 to 1.29.1 (#7405) Jan 21, 2020
standalone.js refactor: move index.js and standalone.js to src (#5054) Sep 6, 2018
tsconfig.json Start JSDoc type linting (#6770) Nov 2, 2019
yarn.lock Bump rollup from 1.29.0 to 1.29.1 (#7405) Jan 21, 2020

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.