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: 6 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 (almost 8 years ago)
- Default Branch: main
- Last Pushed: 2024-04-12T10:00:28.000Z (7 months ago)
- Last Synced: 2024-04-13T21:20:08.276Z (7 months 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: 114 MB
- Stars: 48,177
- Watchers: 420
- Forks: 4,108
- Open Issues: 1,336
-
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. ![](https://img.shields.io/github/stars/prettier/prettier.svg?style=social&label=Star) (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 - prettier/prettier - Prettier is an opinionated code formatter. (JavaScript)
- awesome-nodejs - prettier - ❤"有主见"的多语言代码格式化程序。 ![](https://img.shields.io/github/stars/prettier/prettier.svg?style=social&label=Star) (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-starred - prettier/prettier - Prettier is an opinionated code formatter. (markdown)
- 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
- awesome-javascript - prettier - Prettier is an opinionated code formatter. - ★ 28587 (QA Tools)
- 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
README
[![Prettier Banner](https://unpkg.com/[email protected]/images/prettier-banner-light.svg)](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/en/editors.html) on-save, in a [pre-commit hook](https://prettier.io/docs/en/precommit.html), or in [CI environments](https://prettier.io/docs/en/cli.html#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/en/)**
[Install](https://prettier.io/docs/en/install.html) ·
[Options](https://prettier.io/docs/en/options.html) ·
[CLI](https://prettier.io/docs/en/cli.html) ·
[API](https://prettier.io/docs/en/api.html)**[Playground](https://prettier.io/playground/)**
---
## Badge
Show the world you're using _Prettier_ → [![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square)](https://github.com/prettier/prettier)
```md
[![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square)](https://github.com/prettier/prettier)
```## Contributing
See [CONTRIBUTING.md](CONTRIBUTING.md).