https://github.com/prettier/prettier
Prettier is an opinionated code formatter.
https://github.com/prettier/prettier
angular ast css flow formatter graphql html javascript json jsx less markdown prettier printer scss typescript vue yaml
Last synced: about 1 month ago
JSON representation
Prettier is an opinionated code formatter.
- Host: GitHub
- URL: https://github.com/prettier/prettier
- Owner: prettier
- License: mit
- Created: 2016-11-29T17:13:37.000Z (almost 10 years ago)
- Default Branch: main
- Last Pushed: 2026-10-14T01:20:37.000Z (about 1 month ago)
- Last Synced: 2026-10-14T02:15:31.598Z (about 1 month ago)
- Topics: angular, ast, css, flow, formatter, graphql, html, javascript, json, jsx, less, markdown, prettier, printer, scss, typescript, vue, yaml
- Language: JavaScript
- Homepage: https://prettier.io
- Size: 174 MB
- Stars: 52,445
- Watchers: 447
- Forks: 5,039
- Open Issues: 1,439
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- Funding: FUNDING.json
- License: LICENSE
- Security: .github/SECURITY.md
Awesome Lists containing this project
- awesome-javascript - prettier/prettier - Prettier is an opinionated code formatter. (Language and Tooling / Linters and Formatters)
- awesome - Prettier - A code formatter. (Project Management)
- awesome-frontend - prettier - 更主观的风格自动修改 (工程)
- awesome-github-projects - prettier - Prettier is an opinionated code formatter. ⭐52,417 `JavaScript` 🔥 (🌐 Web Development - Frontend)
- awesome - prettier - Prettier is an opinionated code formatter. (JavaScript)
- awesome-fe-resources - prettier - :格式化代码:JS/CSS 等 (工程化相关)
- super-awesome-chat-app-react - Prettier's GitHub page
- awesome-nodejs - prettier - ❤Prettier is an opinionated code formatter.  (Repository / Linter & Formatter)
- awesome-reactc3-bulma - Prettier's GitHub page
- styled-awesomeness - Prettier's GitHub page
- awesome - prettier/prettier - Prettier is an opinionated code formatter. (JavaScript)
- our-awesome-app - Prettier's GitHub page
- awesome-nodejs - prettier - ❤"有主见"的多语言代码格式化程序。  (GIT 仓库 / 代码校验 和 格式化工具)
- awesome - prettier/prettier
- awesome-ux - Prettier's GitHub page
- awesome-planner - Prettier's GitHub page
- Shopify-Guide - Prettier - printing it with its own rules that take the maximum line length into account, wrapping code when necessary. (GraphQL Tool, Libraries, and Frameworks)
- awesome-cra-v2 - Prettier's GitHub page
- awesome-robofriends - Prettier's GitHub page
- awesome-form - Prettier's GitHub page
- awesome-playlists - Prettier's GitHub page
- awesome-javascript-cn - Prettier - :Prettier 是一款固执(严格)的代码格式化工具。 (QA 工具)
- awesome-fe - prettier - 更主观的风格自动修改。 (工程)
- awesome-web - Prettier's GitHub page
- awesome-web-development - Prettier is an opinionated code formatter
- awesome-github-star - prettier
- awesome - prettier - an opinionated code formatter (Development tools)
- awesome-javascript - prettier - Prettier is an opinionated code formatter. ` 📝 6 days ago ` (QA Tools [🔝](#readme))
- awesome-react-testing - Prettier
- awesome-starred - prettier/prettier - Prettier is an opinionated code formatter. (graphql)
- awesome-engineering - Prettier
- awesome - prettier/prettier - Prettier is an opinionated code formatter. (JavaScript)
- awesome-list - prettier
- awesome-libraries - prettier - Very fast code formatting. (Tooling / General)
- VSCode-Guide - Prettier - printing it with its own rules that take the maximum line length into account, wrapping code when necessary. (GraphQL Tool, Libraries, and Frameworks)
- awesome-side-quests - prettier/prettier
- A-collection-of-awesome-browser-side-JavaScript-libraries-resources-and-shiny-things. - prettier - Prettier is an opinionated code formatter. (QA Tools / Runner)
- awesome-javascript - prettier - Prettier is an opinionated code formatter. - ★ 28587 (QA Tools)
- awesome-javascript - prettier - Prettier is an opinionated code formatter. (QA Tools)
- github-ultimate-repos - prettier/prettier - | ⭐ 52,382★ | 🍴 5,008 | 💻 `JavaScript`🔗 <https://github.com/prettier/prettier>📝 Prettier is an opinionated code formatter.⚙️ `Source code lexing & recursive descent parsing -> AST abstract syntax tree -> SSA intermediate representation (LLVM IR) -> dead-code elimination & machine code emission.` (📜 Master Categorized Repository Directory (100% Clickable Links) / [44] COMPILERS, INTERPRETERS, VIRTUAL MACHINES, LANGUAGE TOOLCHAINS & JIT ENGINES)
- fucking-awesome-javascript - prettier - Prettier is an opinionated code formatter. (QA Tools)
- awesome-bookmarks - prettier - 更主观的风格自动修改 (工程)
- awesome-f2e-libs - prettier - 更主观的风格自动修改。 (工程)
- my-awesome-list - prettier
- awesome-javascript-libraries - prettier/prettier - Prettier is an opinionated code formatter. (Uncategorized / Uncategorized)
- jimsghstars - prettier/prettier - Prettier is an opinionated code formatter. (JavaScript)
- stars - prettier
- awesome-nodejs - prettier - ❤支持多种语言的代码格式化程序 (Uncategorized / Uncategorized)
- awesome-remark - prettier - Opinionated code formatter. (Built on remark)
- awesome-markdown - Prettier - Formats Markdown and MDX consistently across a project. Configure prose wrapping and review the diff; formatting does not verify content or links.<br> (Miscellaneous / Checking and Assistance)
README
[](https://prettier.io)
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
```js
foo(reallyLongArg(), omgSoManyParameters(), IShouldRefactorThis(), isThereSeriouslyAnotherOne());
```
### Output
```js
foo(
reallyLongArg(),
omgSoManyParameters(),
IShouldRefactorThis(),
isThereSeriouslyAnotherOne(),
);
```
Prettier can be run [in your editor](https://prettier.io/docs/editors) on-save, in a [pre-commit hook](https://prettier.io/docs/precommit), or in [CI environments](https://prettier.io/docs/cli#list-different) 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](https://prettier.io/docs/)**
[Install](https://prettier.io/docs/install) ·
[Options](https://prettier.io/docs/options) ·
[CLI](https://prettier.io/docs/cli) ·
[API](https://prettier.io/docs/api)
**[Playground](https://prettier.io/playground/)**
---
## Badge
Show the world you're using _Prettier_ → [](https://github.com/prettier/prettier)
```md
[](https://github.com/prettier/prettier)
```
## Contributing
See [CONTRIBUTING.md](CONTRIBUTING.md).