Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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: 3 days 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 (about 8 years ago)
- Default Branch: main
- Last Pushed: 2025-02-15T04:20:03.000Z (5 days ago)
- Last Synced: 2025-02-15T04:24:18.819Z (5 days 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: 138 MB
- Stars: 49,945
- Watchers: 419
- Forks: 4,460
- Open Issues: 1,444
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Security: .github/SECURITY.md
Awesome Lists containing this project
- stars - prettier/prettier
- awesome - prettier - Prettier is an opinionated code formatter. (JavaScript)
- my-awesome-list - prettier
- awesome - prettier/prettier - Prettier is an opinionated code formatter. (JavaScript)
- 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
- our-awesome-app - Prettier's GitHub page
- awesome - prettier/prettier - Prettier is an opinionated code formatter. (JavaScript)
- awesome-nodejs - prettier - ❤"有主见"的多语言代码格式化程序。  (GIT 仓库 / 代码校验 和 格式化工具)
- awesome-libraries - prettier
- awesome-repositories - prettier/prettier - Prettier is an opinionated code formatter. (JavaScript)
- awesome-ux - Prettier's GitHub page
- awesome-planner - Prettier's GitHub page
- awesome-github-star - prettier
- 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-starts - prettier/prettier - Prettier is an opinionated code formatter. (JavaScript)
- awesome-cra-v2 - Prettier's GitHub page
- awesome-list - prettier
- awesome-robofriends - Prettier's GitHub page
- awesome-form - Prettier's GitHub page
- StarryDivineSky - prettier/prettier
- awesome-playlists - Prettier's GitHub page
- wall-of-awesomeness - Editor Integration
- awesome-alternatives-in-rust - Prettier
- awesome-remark - prettier - Opinionated code formatter. (Built on remark)
- awesome-f2e-libs - **prettier** - 更主观的风格自动修改。 (工程 / redux 扩展)
- awesome-nodejs - prettier - ❤支持多种语言的代码格式化程序 (Uncategorized / Uncategorized)
- awesome-javascript - prettier - Prettier is an opinionated code formatter. (QA Tools / Runner)
- awesome-fe - **prettier** - 更主观的风格自动修改。 (工程 / macros)
- awesome-web - Prettier's GitHub page
- awesome - Prettier's GitHub page
- awesomedribble - Editor Integration
- style-awesome - Prettier's GitHub page
- awesome - Prettier - A code formatter. (Project Management)
- awesome-fe-resources - prettier
- jimsghstars - prettier/prettier - Prettier is an opinionated code formatter. (JavaScript)
- myawesomeapp - Editor Integration
- awesome - prettier - an opinionated code formatter (Development tools)
- awesome - prettier - an opinionated code formatter (Development tools)
- awesome-starred - prettier/prettier - Prettier is an opinionated code formatter. (JavaScript)
- awesome-starred - prettier/prettier - Prettier is an opinionated code formatter. (JavaScript)
- stars - prettier
- stars - prettier
- awesome-javascript - prettier - Prettier is an opinionated code formatter. - ★ 28587 (QA Tools)
- awesome-engineering - Prettier
- awesome-starred - prettier/prettier - Prettier is an opinionated code formatter. (css)
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).