Opinionated Code Formatter JavaScript · TypeScript · Flow · JSX · JSON CSS · SCSS · Less HTML · Vue · Angular GraphQL · Markdown · YAML Your favorite language?…

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
<!-- prettier-ignore -->js
foo(reallyLongArg(), omgSoManyParameters(), IShouldRefactorThis(), isThereSeriouslyAnotherOne());
Output
js
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_ → 
md
[](https://github.com/prettier/prettier)
Contributing
See [CONTRIBUTING.md](CONTRIBUTING.md).
Members
-
prettier ★ PINNED
Prettier is an opinionated code formatter.
JavaScript ★ 52k 5h agoExplain → -
prettier-vscode ★ PINNED
Visual Studio Code extension for Prettier
TypeScript ★ 5.5k 1mo agoExplain → -
plugin-php ★ PINNED
Prettier PHP Plugin
PHP ★ 1.9k 7h agoExplain → -
plugin-ruby ★ PINNED
Prettier Ruby Plugin
JavaScript ★ 1.5k 1y agoExplain → -
plugin-xml ★ PINNED
Prettier XML plugin
JavaScript ★ 277 1d agoExplain → -
eslint-config-prettier
Turns off all rules that are unnecessary or might conflict with Prettier.
JavaScript ★ 5.9k 4mo agoExplain → -
prettier-eslint
Code :arrow_right: `prettier` :arrow_right: `eslint --fix` :arrow_right: Formatted Code :sparkles:
TypeScript ★ 4.1k 10d agoExplain → -
eslint-plugin-prettier
ESLint plugin for Prettier formatting
JavaScript ★ 3.6k 7d agoExplain → -
pretty-quick
⚡ Get Pretty Quick
TypeScript ★ 2.3k 13d agoExplain → -
vim-prettier
A Vim plugin for Prettier
Vim Script ★ 1.8k 17d agoExplain → -
tslint-config-prettier
Use TSLint with Prettier without any conflict
TypeScript ★ 1.2k 3y agoExplain → -
prettier-atom ▣
An atom package for the prettier formatter.
JavaScript ★ 748 3y agoExplain → -
prettier-eslint-cli
CLI for prettier-eslint
TypeScript ★ 545 9d agoExplain → -
plugin-python ▣
Prettier Python Plugin
JavaScript ★ 521 7y agoExplain → -
prettier-emacs
Minor mode to format code on file save
Emacs Lisp ★ 399 1mo agoExplain → -
stylelint-prettier
Stylelint plugin for Prettier formatting
JavaScript ★ 382 5mo agoExplain → -
stylelint-config-prettier ▣
Turns off all rules that are unnecessary or might conflict with prettier.
JavaScript ★ 371 3y agoExplain → -
plugin-swift ▣
[DEPRECATED] Prettier Swift Plugin - WARNING: The AST parser is not stable yet
JavaScript ★ 271 4y agoExplain → -
tslint-plugin-prettier
Runs Prettier as a TSLint rule and reports differences as individual TSLint issues
TypeScript ★ 232 3y agoExplain → -
plugin-pug
Prettier Pug Plugin
TypeScript ★ 208 1d agoExplain → -
prettier-browser-extension
Prettier Browser Extension
JavaScript ★ 205 2y agoExplain → -
plugin-lua
Prettier Lua Plugin (WIP)
Lua ★ 83 2y agoExplain → -
angular-html-parser ⑂
An HTML parser extracted from Angular with some modifications
TypeScript ★ 45 2d agoExplain → -
prettier-cli
A faster CLI for Prettier.
JavaScript ★ 41 2d agoExplain → -
prettier-logo
The Prettier logo.
JavaScript ★ 41 3y agoExplain → -
prettier-synchronized
Synchronous version of Prettier
JavaScript ★ 36 1mo agoExplain → -
yaml-unist-parser
A YAML parser that produces output compatible with unist
TypeScript ★ 28 1mo agoExplain → -
stylelint-config-prettier-scss
Turns off all CSS and SCSS rules that are unnecessary or might conflict with prettier.
JavaScript ★ 25 3y agoExplain → -
prettier-printer ▣
Library for building and pretty printing text documents
JavaScript ★ 24 9y agoExplain → -
prettier-linter-helpers
Helper functions for exposing prettier changes within linting tools
JavaScript ★ 22 3mo agoExplain → -
angular-estree-parser
A parser that converts Angular source code into an ESTree-compatible form
TypeScript ★ 17 25d agoExplain → -
prettier-regression-testing
Automates the prettier/prettier regression checks with GitHub Actions.
TypeScript ★ 15 10d agoExplain → -
prettier-rpc ▣
Single-file build of prettier with JSON-RPC communication
JavaScript ★ 13 9y agoExplain → -
parse-srcset
A spec-conformant JavaScript parser for the HTML5 srcset attribute
JavaScript ★ 10 3y agoExplain → -
pre-commit ▣
Mirror of Prettier package for pre-commit.
JavaScript ★ 7 5y agoExplain → -
plugin-haml ▣
Plugin for the HAML template language
JavaScript ★ 5 5y agoExplain → -
html-ua-styles
User agent stylesheet defined in the WHATWG HTML specification.
JavaScript ★ 3 7h agoExplain → -
html-event-attributes
List of HTML event handler attributes.
JavaScript ★ 2 1mo agoExplain → -
html-tags
List of HTML tags, including obsoleted tags.
JavaScript ★ 2 1mo agoExplain → -
prettier-plugin-mdx1
Prettier MDX1 plugin
JavaScript ★ 2 5mo agoExplain → -
is-es5-identifier-name
Check if provided string is an `IdentifierName` as specified in ECMA262 edition 5.1 section 7.6.
JavaScript ★ 2 1mo agoExplain → -
core-test-fixtures
Test fixtures for Prettier core.
JavaScript ★ 2 5y agoExplain → -
eslint-plugin-prettier-internal-rules ▣
Wrapper for Prettier internal rules
JavaScript ★ 1 2y agoExplain → -
.github
Default community health files for @prettier repositories.
★ 0 1y agoExplain → -
shared-workflows
Shared workflows for Prettier organization
★ 0 7mo agoExplain →
No repos match these filters.