JavaScript TypeScript CSS Other
Permalink
Failed to load latest commit information.
.github 1.9.2 Dec 12, 2017
bin refactor(cli): separate files and make it pure as possible (#2730) Sep 3, 2017
docs Make `--ignore-path` link more specific in docs (#3690) Jan 9, 2018
scripts Automatically load plugins from package.json (#3624) Jan 5, 2018
src Allow Plugins to preprocess text (#3664) Jan 9, 2018
tests Wrap conditionals and await in parens in spread property (#3681) Jan 9, 2018
tests_config Allow Plugins to preprocess text (#3664) Jan 9, 2018
tests_integration Allow Plugins to preprocess text (#3664) Jan 9, 2018
website Allow Plugins to preprocess text (#3664) Jan 9, 2018
.codecov.yml Improve coverage and remove some dead code (#2504) Jul 17, 2017
.eslintignore chore(eslint): ignore `/tests_integration/cli/` Sep 3, 2017
.eslintrc.yml Add `root: true` to .eslintrc.yml (#3519) Dec 18, 2017
.flowconfig Build the dist/ with rollup (#1794) May 29, 2017
.gitignore Docs build script (#3332) Nov 27, 2017
.ignore Remove .npmignore and update .ignore (#2560) Jul 30, 2017
.pre-commit-hooks.yaml Use `files:` over `types:` in pre-commit configuration (#2759) Sep 5, 2017
.prettierignore Implement getSupportInfo() and use it for inference (#3033) Nov 3, 2017
.travis.yml Revert "Set travis dist to "precise"" (#3510) Dec 17, 2017
.yarnrc Add .yarnrc to use exact versions (#2016) Jun 7, 2017
CHANGELOG.md Add Blog, Populate with Release Notes (#3604) Dec 31, 2017
CONTRIBUTING.md Prettify style in playground and code block languages (#3419) Dec 6, 2017
LICENSE Happy new year 2018! (#3620) Dec 31, 2017
README.md docs(readme): travis master badge (#3666) Jan 7, 2018
commands.md Update the command documentation and add types (#3494) Dec 18, 2017
index.js Allow Plugins to preprocess text (#3664) Jan 9, 2018
jest.config.js Automatically load plugins from package.json (#3624) Jan 5, 2018
package.json Automatically load plugins from package.json (#3624) Jan 5, 2018
yarn.lock Automatically load plugins from package.json (#3624) Jan 5, 2018

README.md

Prettier Banner

Opinionated Code Formatter

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

Gitter Travis Codecov npm version monthly downloads code style: prettier 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.