JavaScript CSS TypeScript Other
ikatyang feat: support MDX (#4975)
* feat: support MDX

* refactor: flip condition
Latest commit 1790211 Aug 13, 2018
Permalink
Failed to load latest commit information.
.circleci Report test summaries to CircleCI (#4704) Jul 7, 2018
.github Release 1.14.2 Aug 9, 2018
bin refactor(cli): separate files and make it pure as possible (#2730) Sep 3, 2017
docs fix: update flow support info (#4943) Aug 8, 2018
scripts chore: improve release scripts (#4933) Aug 8, 2018
src feat: support MDX (#4975) Aug 13, 2018
tests feat: support MDX (#4975) Aug 13, 2018
tests_config fix(typescript): use the first error when both failed (#4947) Aug 9, 2018
tests_integration feat: support MDX (#4975) Aug 13, 2018
website feat: support MDX (#4975) Aug 13, 2018
.appveyor.yml Get tests passing on Windows (#4579) May 28, 2018
.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
.gitignore Report test summaries to CircleCI (#4704) Jul 7, 2018
.ignore Remove .npmignore and update .ignore (#2560) Jul 30, 2017
.pre-commit-hooks.yaml Add support for markdown with pre-commit (#4021) Feb 21, 2018
.prettierignore Implement getSupportInfo() and use it for inference (#3033) Nov 3, 2017
.travis.yml Travis - Allow failures in Node 6 (#4690) Jun 14, 2018
.yarnrc Add .yarnrc to use exact versions (#2016) Jun 7, 2017
CHANGELOG.md Release 1.14.2 Aug 9, 2018
CONTRIBUTING.md docs(perf): add performance section to CONTRIBUTING.md (#4846) Jul 23, 2018
LICENSE Happy new year 2018! (#3620) Dec 31, 2017
README.md Update AppVeyor badge to organization (#4828) Jul 10, 2018
commands.md Format docs with Prettier 1.13 May 27, 2018
index.js Don't default parser to babylon (#4528) May 23, 2018
jest.config.js fix(typescript): use the first error when both failed (#4947) Aug 9, 2018
package.json fix(config): better error message for unsupported extension (#4969) Aug 11, 2018
standalone.js chore: enable glimmer parser on preview playground (#4915) Aug 1, 2018
yarn.lock fix(config): better error message for unsupported extension (#4969) Aug 11, 2018

README.md

Prettier Banner

Opinionated Code Formatter

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

Travis CI Build Status CircleCI Build Status AppVeyor Build Status Codecov Coverage Status Blazing Fast
npm version monthly 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.