Volver al ranking

prettier/prettier

JavaScriptprettier.io

Prettier is an opinionated code formatter.

formatterprinterprettierastjavascriptflowtypescriptcssscsslessjsxvue
Crecimiento de estrellas
Estrellas
52.1k
Forks
4.9k
Crecimiento semanal
Issues
1.2k
20k40k
nov 2016ene 2020abr 2023jul 2026
Artefactosnpmnpm 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?

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.

Repositorios relacionados
psf/black

The uncompromising Python code formatter

PythonPyPIMIT Licensepythoncode
black.readthedocs.io/en/stable/
41.7k2.8k
biomejs/biome

A toolchain for web projects, aimed to provide functionalities to maintain them. Biome offers formatter and linter, usable via CLI and LSP.

Rustcrates.ioApache License 2.0cssformatter
biomejs.dev
25.3k1.1k
rome/tools

Unified developer tools for JavaScript, TypeScript, and the web

Rustcrates.ioMIT Licenseformatterlinter
docs.rome.tools
23.4k644
google/yapf

A formatter for Python files

PythonPyPIApache License 2.0pythonformatter
14k901
mvdan/sh

A shell parser, formatter, and interpreter with bash and zsh support; includes shfmt

GoGo ModulesBSD 3-Clause "New" or "Revised" Licensegoparser
pkg.go.dev/mvdan.cc/sh/v3
8.9k426
PyCQA/isort

A Python utility / library to sort imports.

PythonPyPIMIT Licenseauto-formatterisort
isort.readthedocs.io
7k667
rust-lang/rustfmt

Format Rust code

Rustcrates.ioApache License 2.0rustrustfmt
rust-lang.github.io/rustfmt/
6.9k1k
google/google-java-format

Reformats Java source code to comply with Google Java Style.

JavaMavenOtherjavaformatter
6.2k927
diffplug/spotless

Keep your code spotless

JavaMavenApache License 2.0gradlejava
5.6k543
prettier/prettier-vscode

Visual Studio Code extension for Prettier

TypeScriptnpmMIT Licenseformattertypescript
marketplace.visualstudio.com/items
5.5k520
google/gts

☂️ TypeScript style guide, formatter, and linter.

TypeScriptnpmApache License 2.0typescriptlinter
github.com/google/gts
5.3k210
shufo/vscode-blade-formatter

An opinionated Blade file formatter for VSCode

TypeScriptnpmMIT Licenselaravelvscode
marketplace.visualstudio.com/items
5.2k44