dcf44ffbdc2f403de02f12516b0c6d5d5813b16f
* feat: support YAML * fix: do not indent sequence in mappingValue * docs: add yaml to index.md * fix: reduce `SyntaxError: Node#parse consumed no characters` * chore: remove old-build and new-worker.js * refactor * refactor * refactor * refactor * refactor * refactor * refactor * refactor * refactor * refactor * refactor * refactor * fix: no space after `<<` * fix: add yaml to standalone test * test: add tests * fix: next empty line in flow collection * fix: tabs are not allowed http://yaml.org/spec/1.2/spec.html#space/indentation/ * fix: update parser * feat: rewrite the mappingItem logic * feat: indent sequence in mapping * feat(doc): add ifBreak#groupId and group#id * chore: fix node 4 * chore: add tools_yaml.svg * chore: remove resolved TODO * refactor: remove unnecessary workaround * chore(worker): importScriptOnce * chore(build): rename with babelPlugins * make it rollup compatible * feat: support singleQuote * refactor
Opinionated Code Formatter
JavaScript · Flow · TypeScript · CSS · SCSS · Less · JSX · Vue · GraphQL · JSON · Markdown · YAML · Your favorite language?
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!
Badge
Show the world you're using Prettier →
[](https://github.com/prettier/prettier)
Contributing
See CONTRIBUTING.md.
Languages
JavaScript
98.6%
CSS
0.9%
Vue
0.2%
HTML
0.2%
MDX
0.1%
