JavaScript CSS TypeScript Other
prashant-andani and ikatyang Use destructuring for readability and optimzations at 'for' loop leng…
…th property… (#4842)

* Use destructuring for readability and optimzations at for loop length property

* Destructure variables for easy maintainability of code

* PR review fix

* refactor: fix linting
Latest commit 12cb8a9 Jul 16, 2018
Permalink
Failed to load latest commit information.
.circleci Report test summaries to CircleCI (#4704) Jul 7, 2018
.github Lock closed issues and PRs after 3 months of inactivity (#4802) Jul 5, 2018
bin refactor(cli): separate files and make it pure as possible (#2730) Sep 3, 2017
docs Add stylelint-prettier to related projects (#4839) Jul 15, 2018
scripts Report test summaries to CircleCI (#4704) Jul 7, 2018
src Use destructuring for readability and optimzations at 'for' loop leng… Jul 16, 2018
tests Blacklist this in functional composition heuristics (#4836) Jul 12, 2018
tests_config Upgrade to Jest 23 (#4809) Jul 4, 2018
tests_integration feat(json): add jsonc to aliases and use it to find parser in markdow… Jul 7, 2018
website Added Unibeautify (#4834) Jul 11, 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.13.7 Jun 28, 2018
CONTRIBUTING.md Format docs with Prettier 1.13 May 27, 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 Report test summaries to CircleCI (#4704) Jul 7, 2018
package.json refactor(typescript): remove unnecessary experimental types (#4819) Jul 10, 2018
standalone.js feat: support YAML (#4563) Jun 21, 2018
yarn.lock refactor(typescript): remove unnecessary experimental types (#4819) Jul 10, 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.