馃寽
馃尀
prettier

prettier

v2.7.1

Prettier is an opinionated code formatter

npm install prettier

README

Prettier Banner

Opinionated Code Formatter

JavaScript 路 TypeScript 路 Flow 路 JSX 路 JSON
CSS 路 SCSS 路 Less
HTML 路 Vue 路 Angular
GraphQL 路 Markdown 路 YAML
Your favorite language?

Github Actions Build Status Github Actions Build Status Github Actions Build Status Codecov Coverage Status Blazing Fast
npm version weekly downloads from npm code style: prettier Follow Prettier on Twitter

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!


Documentation

InstallOptionsCLIAPI

Playground


Badge

Show the world you're using Prettiercode style: prettier

[![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.

Release Notes

2.7.1
By fisker Cheung 鈥 Published on June 16, 2022

馃敆 Changelog

2.7.0
By fisker Cheung 鈥 Published on June 14, 2022
2.6.2
By Sosuke Suzuki 鈥 Published on April 2, 2022

馃敆 Changelog

2.6.1
By Sosuke Suzuki 鈥 Published on March 25, 2022

馃敆 Changelog

2.6.0
By Sosuke Suzuki 鈥 Published on March 16, 2022

馃敆 Release note

2.5.1
By Sosuke Suzuki 鈥 Published on December 4, 2021

馃敆 Changelog

2.5.0
By Sosuke Suzuki 鈥 Published on November 25, 2021
2.4.1
By Sosuke Suzuki 鈥 Published on September 16, 2021

馃敆 Changelog

2.4.0
By Sosuke Suzuki 鈥 Published on September 9, 2021
2.3.2
By Sosuke Suzuki 鈥 Published on June 26, 2021

General

License
MIT
Typescript Types
Tree-shakeable
No

Popularity

GitHub Stargazers
43.9K
Community Interest
44.4K
Number of Forks
3,518

Maintenance

Commits
10/219/220150
Last Commit
Open Issues
897
Closed Issues
4,793
Open Pull Requests
213
Closed Pull Requests
1,033

Versions

Versions Released
10/219/2202
Latest Version Released
Jun 16, 2022
Current Tags
latest2.7.1

Contributors

fisker
fisker
Commits: 798
vjeux
vjeux
Commits: 571
ikatyang
ikatyang
Commits: 430
duailibe
duailibe
Commits: 284
thorn0
thorn0
Commits: 264
sosukesuzuki
sosukesuzuki
Commits: 249
azz
azz
Commits: 241
lydell
lydell
Commits: 149
jlongster
jlongster
Commits: 128
josephfrazier
josephfrazier
Commits: 92
existentialism
existentialism
Commits: 80
j-f1
j-f1
Commits: 47
lipis
lipis
Commits: 47
suchipi
suchipi
Commits: 35
yamafaktory
yamafaktory
Commits: 34