![]() This fixes https://github.com/prettier/prettier/issues/42. It adds support for .editorconfig's `indent_style`, `indent_size`, `tab_width`, and `max_line_length` properties. It doesn't support the `end_of_line` property as described in https://github.com/prettier/prettier/issues/42#issuecomment-327073326, but that could be added later. The same goes for `quote_type` (https://github.com/prettier/prettier-atom/issues/293#issue-267288335). * Make test .prettierrc not set config for all file extensions This makes it easier to keep tests isolated. |
||
---|---|---|
.github | ||
bin | ||
docs | ||
scripts | ||
src | ||
tests | ||
tests_config | ||
tests_integration | ||
website | ||
.codecov.yml | ||
.eslintignore | ||
.eslintrc.js | ||
.flowconfig | ||
.gitignore | ||
.ignore | ||
.pre-commit-hooks.yaml | ||
.prettierignore | ||
.travis.yml | ||
.yarnrc | ||
CHANGELOG.md | ||
CONTRIBUTING.md | ||
LICENSE | ||
README.md | ||
commands.md | ||
index.js | ||
jest.config.js | ||
package.json | ||
yarn.lock |
README.md
Opinionated Code Formatter
JavaScript · Flow · TypeScript · CSS · SCSS · Less · GraphQL · JSON · Markdown
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!
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.