f0b63f3dff344eeef8734682e322f13d3f608383
# Conflicts: # CONTRIBUTING.md # cspell.json # docs/options.md # package.json # scripts/build/bundler.mjs # src/language-css/loc.js # src/language-css/parser-postcss.js # src/language-css/utils/index.js # tests/format/js/arrows-bind/jsfmt.spec.js # tests/format/js/async-do-expressions/jsfmt.spec.js # tests/format/js/bind-expressions/jsfmt.spec.js # tests/format/js/classes/top-level-super/jsfmt.spec.js # tests/format/js/comments-pipeline-own-line/jsfmt.spec.js # tests/format/js/decorator-comments/jsfmt.spec.js # tests/format/js/decorators-export/jsfmt.spec.js # tests/format/js/decorators/jsfmt.spec.js # tests/format/js/do/jsfmt.spec.js # tests/format/js/export-default/escaped/jsfmt.spec.js # tests/format/js/export-extension/jsfmt.spec.js # tests/format/js/export-star/jsfmt.spec.js # tests/format/js/exports/jsfmt.spec.js # tests/format/js/invalid-code/jsfmt.spec.js # tests/format/js/logical-assignment/jsfmt.spec.js # tests/format/js/multiparser-invalid/jsfmt.spec.js # tests/format/js/no-semi-babylon-extensions/jsfmt.spec.js # tests/format/js/object-property-comment/jsfmt.spec.js # tests/format/js/partial-application/jsfmt.spec.js # tests/format/js/pipeline-operator/jsfmt.spec.js # tests/format/js/private-in/jsfmt.spec.js # tests/format/js/record/jsfmt.spec.js # tests/format/js/reserved-word/jsfmt.spec.js # tests/format/js/strings/jsfmt.spec.js # tests/format/js/throw_expressions/jsfmt.spec.js # tests/format/js/trailing-whitespace/jsfmt.spec.js # tests/format/js/v8_intrinsic/jsfmt.spec.js # tests/format/misc/errors/js/literal/jsfmt.spec.js # tests/format/misc/errors/js/object/jsfmt.spec.js # tests/format/misc/errors/js/variable-declarator/jsfmt.spec.js # tests/integration/__tests__/bundle.js # tsconfig.json # yarn.lock
Opinionated Code Formatter
JavaScript
· TypeScript
· Flow
· JSX
· JSON
CSS
· SCSS
· Less
HTML
· Vue
· Angular
GraphQL
· 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%