No description
Find a file
2026-06-03 15:40:52 +08:00
.github Update GitHub Actions (#19221) 2026-05-27 17:51:56 +08:00
.vscode Update babel to v8.0.0-rc.1 (#18822) 2026-02-01 08:57:18 +08:00
.yarn Update yarn to v4.16 (#19268) 2026-06-03 01:46:24 +08:00
benchmarks Add PrintResult for doc printer (#18372) 2026-01-02 13:41:28 +08:00
bin Bundle "Experimental CLI" (#17396) 2025-05-06 10:34:05 +08:00
changelog_unreleased Preserve blank lines between JSX attributes (#19161) 2026-06-03 15:40:52 +08:00
docs Update --ignore-path docs for clarity (#18917) 2026-06-03 05:13:40 +08:00
packages Merge branch 'v3.8.x' 2026-04-15 08:46:42 +08:00
scripts Update yarn to v4.16 (#19268) 2026-06-03 01:46:24 +08:00
src Preserve blank lines between JSX attributes (#19161) 2026-06-03 15:40:52 +08:00
tests Preserve blank lines between JSX attributes (#19161) 2026-06-03 15:40:52 +08:00
types/angular-html-parser Update dependency espree to v11.1.0 (#18688) 2026-01-20 22:42:25 +08:00
vendors Update babel to v8.0.0-rc.1 (#18822) 2026-02-01 08:57:18 +08:00
website Update yarn to v4.16 (#19268) 2026-06-03 01:46:24 +08:00
.codecov.yml Fix codecov status check (#13646) 2022-10-17 08:25:32 +08:00
.editorconfig renaming jsfmt.spec.js to format.test.js (#16244) 2024-05-06 10:25:10 +08:00
.git-blame-ignore-revs Git blame ignore 3.7.0 2025-11-27 16:32:25 +08:00
.gitattributes
.gitignore Remove .gitpod.yml 2025-11-30 02:46:38 +08:00
.ignore fix: Adjacent JSX elements should be allowed in mdx (#6332) 2019-07-29 14:32:24 +03:00
.prettierignore Update babel to v8.0.0-rc.1 (#18822) 2026-02-01 08:57:18 +08:00
.yarnrc.yml Update yarn to v4.16 (#19268) 2026-06-03 01:46:24 +08:00
CHANGELOG.md Merge branch 'v3.8.x' 2026-04-15 09:05:23 +08:00
commands.md Major refactor (#18381) 2025-12-01 07:25:25 +08:00
CONTRIBUTING.md Move 3rd-party tests into languages (#18746) 2026-01-25 11:23:53 +08:00
cspell.json Add @poliklot/prettier-plugin-handlebars to community plugins (#19107) 2026-05-19 02:14:19 +08:00
eslint.config.js Update babel to v8.0.0-rc.1 (#18822) 2026-02-01 08:57:18 +08:00
FUNDING.json Claim prettier/prettier on Drips (#16195) 2024-04-04 06:55:00 -07:00
index.js Use named export instead of default export (#12740) 2022-05-05 15:03:08 +08:00
jest.config.js Refactor tests (#18743) 2026-01-25 10:30:19 +08:00
knip.config.js Update devDependencies (major) (#18957) 2026-03-22 09:23:14 +08:00
LICENSE Update copyright line (#5455) 2019-01-03 07:21:32 -05:00
netlify.toml Validate doc with __js_expression in playground (#17668) 2025-08-05 15:54:42 +08:00
package.json Update yarn to v4.16 (#19268) 2026-06-03 01:46:24 +08:00
prettier.config.js Update docs to encourage user import plugin themself (#18411) 2025-12-06 14:43:36 +08:00
puppeteer.config.cjs Skip puppeteer installation 2026-01-23 17:05:03 +08:00
README.md Update badges (#17447) 2025-05-08 19:26:30 +08:00
standalone.js Use named export instead of default export (#12740) 2022-05-05 15:03:08 +08:00
tsconfig.json Update dependency typescript to v6 (#18971) 2026-04-10 06:19:27 +08:00
yarn.lock Update typescript-eslint to v8.60.1 (#19269) 2026-06-03 01:37:35 +08:00

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.