prettier
TLDR
Format a file
$ prettier --write [file.js]
Format multiple files$ prettier --write "[**/*.js]"
Check formatting$ prettier --check [file.js]
Format with specific parser$ prettier --parser [typescript] [file]
Show diff$ prettier --write --list-different [file.js]
SYNOPSIS
prettier [options] [files]
DESCRIPTION
prettier is an opinionated code formatter. Supports many languages.
The tool formats JS, CSS, HTML, and more. Enforces consistent style.
prettier formats code.
PARAMETERS
FILES
Files to format.--write
Edit files in place.--check
Check if formatted.--parser NAME
Force parser.--config FILE
Config file path.--single-quote
Use single quotes.--tab-width N
Tab width.
CAVEATS
Node.js required. Opinionated defaults.
HISTORY
Prettier was created for consistent code formatting across projects.


