prettier
TypeScript icon, indicating that this package has built-in type declarations

3.6.2 • Public • Published

Prettier Banner

Opinionated Code Formatter

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

CI Status Coverage Status Blazing Fast
npm version weekly downloads from npm code style: prettier Follow Prettier on X

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

Install · Options · CLI · API

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.

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
3.6.29,961,476latest
4.0.0-alpha.123,123next

Version History

VersionDownloads (Last 7 Days)Published
3.6.29,961,476
3.6.1325,018
3.6.0269,629
4.0.0-alpha.123,123
3.5.37,896,995
4.0.0-alpha.1120
3.5.2275,130
3.5.1468,807
3.5.0175,976
3.4.22,376,974
3.4.1202,674
3.4.016,594
4.0.0-alpha.101,442
3.3.33,634,127
4.0.0-alpha.9142
3.3.2771,605
3.3.1125,113
3.3.066,643
3.2.52,173,820
3.2.4214,035
3.2.32,346
3.2.247,231
3.2.14,407
3.2.01,105
4.0.0-alpha.815,695
4.0.0-alpha.741
4.0.0-alpha.65
4.0.0-alpha.510
3.1.1551,823
4.0.0-alpha.4179
4.0.0-alpha.3514
4.0.0-alpha.24
4.0.0-alpha.15
4.0.0-alpha.05
3.1.0446,276
3.0.3887,167
3.0.297,504
3.0.193,278
3.0.0590,748
3.0.0-alpha.12165
3.0.0-alpha.117
3.0.0-alpha.105
3.0.0-alpha.9-for-vscode1,442
3.0.0-alpha.8-for-vscode6
2.8.811,183,677
2.8.7606,287
2.8.659,699
2.8.533,561
3.0.0-alpha.61,283
3.0.0-alpha.58
2.8.4481,053
2.8.3229,366
2.8.255,718
2.8.1249,519
2.8.0132,044
3.0.0-alpha.41,440
3.0.0-alpha.35
3.0.0-alpha.236
3.0.0-alpha.126
3.0.0-alpha.0563
2.7.11,552,609
2.7.012,545
2.6.2475,251
2.6.148,540
2.6.049,055
2.5.1581,783
2.5.067,353
2.4.1360,843
2.4.036,350
2.3.2436,924
2.3.1160,513
2.3.0972,392
2.2.1819,844
2.2.017,138
2.1.2275,626
2.1.187,097
2.1.05,467
2.0.5427,647
2.0.448,525
2.0.3849
2.0.225,389
2.0.13,821
2.0.06,531
1.19.12,132,104
1.19.05,712
1.18.2231,510
1.18.12,486
1.18.01,238
1.17.126,283
1.17.042,539
1.16.495,580
1.16.363,735
1.16.2620
1.16.17,027
1.16.01,053
1.15.355,454
1.15.217,997
1.15.12,548
1.15.01,968
1.14.381,511
1.14.230,368
1.14.1155
1.14.05,746
1.13.727,431
1.13.63,771
1.13.510,674
1.13.46,683
1.13.3620
1.13.24,029
1.13.15
1.13.02,330
1.12.128,671
1.12.05,945
1.11.124,061
1.11.0275
1.11.0-rc.15
1.10.235,273
1.10.11,646
1.10.010
1.9.28,770
1.9.11,444
1.9.0171
1.8.27,710
1.8.1163
1.8.089
1.7.414,074
1.7.3858
1.7.2792
1.7.119
1.7.06,180
1.6.14,314
1.6.0301
1.6.0-beta24
1.5.35,647
1.5.22,379
1.5.15
1.5.010
1.4.42,257
1.4.37
1.4.2784
1.4.118
1.4.09
1.4.0-beta9
1.3.12,460
1.3.0104
1.2.2738
1.2.17
1.2.08
1.1.036
1.0.2174
1.0.19
1.0.014
0.22.03,831
0.21.0158
0.20.013
0.19.0692
0.18.0137
0.17.115
0.17.06
0.16.042
0.15.014
0.14.112
0.14.09
0.13.118
0.11.088
0.0.106
0.0.99
0.0.811
0.0.716
0.0.68
0.0.510
0.0.47
0.0.314
0.0.26
0.0.121

Package Sidebar

Install

npm i prettier

Homepage

prettier.io

Weekly Downloads

54,227,462

Version

3.6.2

License

MIT

Unpacked Size

8.46 MB

Total Files

56

Last publish

Collaborators

  • jlongster
  • lydell
  • thorn0
  • vjeux
  • fisker
  • suchipi
  • duailibe
  • ikatyang
  • azz
  • sosukesuzuki
  • prettier-bot