An opinionated code formatter (evacuated from NSA/Microsoft Github)

Lucas Azzola abef84684d Add AppVeyor and Blazing to Badges (#4628) 6 gadi atpakaļ
.circleci d0cd112a6f Store artifacts in CircleCI (#4502) 6 gadi atpakaļ
.github 77c0e940f3 docs(issue_template): bump version to 1.13.4 6 gadi atpakaļ
bin c4e5463514 refactor(cli): separate files and make it pure as possible (#2730) 7 gadi atpakaļ
docs e9b7c7ff9b chore: fix 2 TODOs (#4591) 6 gadi atpakaļ
scripts 26b13b6274 chore(scripts): update ISSUE_TEMPLATE and exclude tarball (#4620) 6 gadi atpakaļ
src a4da6e6c8e Inline _ or $ in the root of a method chain (#4621) 6 gadi atpakaļ
tests a4da6e6c8e Inline _ or $ in the root of a method chain (#4621) 6 gadi atpakaļ
tests_config b0cb63a7bb Use destructuring for imports (#4554) 6 gadi atpakaļ
tests_integration 75e86b9e6b fix(cli): no regression for --debug-check + --list-different (#4600) 6 gadi atpakaļ
website 1669a7b38b Redirect the broken 1.13 blog link to the correct one (#4570) 6 gadi atpakaļ
.appveyor.yml 19cdd5fde2 Get tests passing on Windows (#4579) 6 gadi atpakaļ
.codecov.yml 02639da9a9 Improve coverage and remove some dead code (#2504) 7 gadi atpakaļ
.eslintignore 52a2a46b3c New build system (#4449) 6 gadi atpakaļ
.eslintrc.yml 1ed3865cb6 lint fixes 6 gadi atpakaļ
.flowconfig 05b921efdd Build the dist/ with rollup (#1794) 7 gadi atpakaļ
.gitignore 4edfb67f55 Include webpack to bundle the playground 6 gadi atpakaļ
.ignore 8ede13267e Remove .npmignore and update .ignore (#2560) 7 gadi atpakaļ
.pre-commit-hooks.yaml d298c51cba Add support for markdown with pre-commit (#4021) 6 gadi atpakaļ
.prettierignore e436adae04 Implement getSupportInfo() and use it for inference (#3033) 7 gadi atpakaļ
.travis.yml ded8524acd Drop node 4 support for development (#4537) 6 gadi atpakaļ
.yarnrc f261ad4efb Add .yarnrc to use exact versions (#2016) 7 gadi atpakaļ
CHANGELOG.md dfefe259db chore(release): 1.13.4 6 gadi atpakaļ
CONTRIBUTING.md 412b064df8 Format docs with Prettier 1.13 6 gadi atpakaļ
LICENSE c6304fb426 Happy new year 2018! (#3620) 6 gadi atpakaļ
README.md abef84684d Add AppVeyor and Blazing to Badges (#4628) 6 gadi atpakaļ
commands.md 412b064df8 Format docs with Prettier 1.13 6 gadi atpakaļ
index.js 5c6e0802af Don't default parser to babylon (#4528) 6 gadi atpakaļ
jest.config.js b0cb63a7bb Use destructuring for imports (#4554) 6 gadi atpakaļ
package.json ae6abe4d8c chore: bump own prettier to 1.13.4 6 gadi atpakaļ
standalone.js 5508546de8 Add formatWithCursor, check, doc, and util to the standalone build (#4556) 6 gadi atpakaļ
yarn.lock ae6abe4d8c chore: bump own prettier to 1.13.4 6 gadi atpakaļ

README.md

Prettier Banner

Opinionated Code Formatter

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

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