prettier

Prettier is an opinionated code formatter.

Github星跟踪图

Prettier Banner

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.

主要指标

概览
名称与所有者prettier/prettier
主编程语言JavaScript
编程语言JavaScript (语言数: 10)
平台
许可证MIT License
所有者活动
创建于2016-11-29 17:13:37
推送于2025-05-15 04:55:06
最后一次提交
发布数167
最新版本名称4.0.0-alpha.12 (发布于 )
第一版名称0.0.1 (发布于 )
用户参与
星数50.4k
关注者数415
派生数4.5k
提交数10.1k
已启用问题?
问题数6879
打开的问题数1212
拉请求数8672
打开的拉请求数258
关闭的拉请求数1314
项目设置
已启用Wiki?
已存档?
是复刻?
已锁定?
是镜像?
是私有?