Prettier fixed for Allman brace style
 
 
 
 
 
 
Go to file
Lucas Azzola 71a5533c4e
Move all docs to website (#3139)
* Sync README -> docs/options.md

* Sync README -> docs/*.md

* Misc fixups

* Remove markdown-toc

* Remove insert-pragma from ToC

* Never again!

* Move all docs to ./docs

* Remove yarn toc

* Fix inter-doc links

* Fix links in footer

* Clean up README.md

* Add basic description to README.md

* Use flat badges

* Move editor guides to website

* Improve prettier-ignore docs

* Fixup bad find/replace

* Add JSON to README

* Fix custom parser API link

* Fixup GitHub centering, add downloads badge

* Add 1.8 docs

* docs(website): mention markdown on homepage (#1)

* Add intro

* Add watching-files.md

* Fix markdown syntax highlighting

* Switch back to .md links
2017-11-07 14:39:07 +11:00
.github 1.7.4 2017-10-03 19:46:42 +10:00
bin refactor(cli): separate files and make it pure as possible (#2730) 2017-09-03 19:21:06 +10:00
docs Move all docs to website (#3139) 2017-11-07 14:39:07 +11:00
scripts Move all docs to website (#3139) 2017-11-07 14:39:07 +11:00
src Add support for JSXSpreadChild and fix comments inside JSXSpread (#3163) 2017-11-07 14:23:10 +11:00
tests Add support for JSXSpreadChild and fix comments inside JSXSpread (#3163) 2017-11-07 14:23:10 +11:00
tests_config Fix util.getStringWidth for falsy input (#3092) 2017-10-24 15:19:27 +11:00
tests_integration Move all docs to website (#3139) 2017-11-07 14:39:07 +11:00
website Move all docs to website (#3139) 2017-11-07 14:39:07 +11:00
.codecov.yml Improve coverage and remove some dead code (#2504) 2017-07-17 23:31:42 +10:00
.eslintignore chore(eslint): ignore `/tests_integration/cli/` 2017-09-03 21:50:19 +08:00
.eslintrc.js lint: Add yoda rule with range exception (#2433) 2017-07-09 00:53:00 +10:00
.flowconfig Build the dist/ with rollup (#1794) 2017-05-28 21:49:41 -07:00
.gitignore Move all docs to website (#3139) 2017-11-07 14:39:07 +11:00
.ignore Remove .npmignore and update .ignore (#2560) 2017-07-31 08:47:00 +10:00
.pre-commit-hooks.yaml Use `files:` over `types:` in pre-commit configuration (#2759) 2017-09-05 12:17:02 -07:00
.prettierignore Implement getSupportInfo() and use it for inference (#3033) 2017-11-03 18:06:25 +11:00
.travis.yml Move all docs to website (#3139) 2017-11-07 14:39:07 +11:00
.yarnrc Add .yarnrc to use exact versions (#2016) 2017-06-06 18:04:52 -07:00
CHANGELOG.md Fix typo and escape code block character (#2972) 2017-10-03 20:39:52 +02:00
CONTRIBUTING.md Mention labels docs in CONTRIBUTING.md (#2950) 2017-10-02 07:44:45 +02:00
LICENSE Add MIT license 2017-01-10 09:06:32 -05:00
README.md Move all docs to website (#3139) 2017-11-07 14:39:07 +11:00
commands.md Update commands.md 2017-06-07 11:43:06 -07:00
index.js Implement getSupportInfo() and use it for inference (#3033) 2017-11-03 18:06:25 +11:00
jest.config.js Make production tests always run against dist/ (attempt 2) (#2942) 2017-10-02 17:58:55 +02:00
package.json Move all docs to website (#3139) 2017-11-07 14:39:07 +11:00
yarn.lock Move all docs to website (#3139) 2017-11-07 14:39:07 +11:00

README.md

Prettier Banner

Opinionated Code Formatter

JavaScript · Flow · TypeScript · CSS · SCSS · Less · GraphQL · JSON · Markdown

Gitter Travis Codecov npm version npm version code style: prettier

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 ran 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 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.