All apps/Prettier

Prettier

prettier

Prettier is an opinionated code formatter for JavaScript, TypeScript, CSS, JSON, Markdown and more.

Runs as prettier|macOS, Linux, Windows|prettier.io

Autocomplete

Fig spec, with what the manifest adds · 44 options
Published once and never changed; check the digest before caching
sha256
6fc8a6408141600531176f8667f5f5b56d4280ee370c4d3e054a693594549342
Size
10139 bytes
OptionsOn prettier itself
-c--check
Check if your files are formatted <file, dir, or glob>
-l--list-different
Print the names of files that are different from Prettier's formatting
-w--write
Edit files in-place
--arrow-parens
Include parentheses around a sole arrow function parameter <mode>
--no-bracket-spacing
Do not print spaces between brackets
--embedded-language-formatting
Control how Prettier formats quoted code embedded in the file <mode>
--end-of-line
Which end of line characters to apply <choice>
--html-whitespace-sensitivity
How to handle whitespaces in HTML <choice>
--jsx-bracket-same-line
Put > on the last line instead of at a new line
--jsx-single-quote
Use single quotes in JSX
--parser
Which parser to use <parser>
--print-width
The line length where Prettier will try wrap <int>
--prose-wrap
How to wrap prose <value>
--quote-props
Change when properties in objects are quoted <when>
--no-semi
Do not print semicolons, except at the beginning of lines which may need them
--single-quote
Use single quotes instead of double quotes
--tab-width
Number of spaces per indentation level <int>
--trailing-comma
Print trailing commas wherever possible when multi-line <type>
--use-tabs
Indent with tabs instead of spaces
--vue-indent-script-and-style
Indent script and style tags in Vue files
--config
Path to a Prettier configuration file (.prettierrc, package.json, prettier.config.js) <path>
--no-config
Do not look for a configuration file
--config-precedence
Define in which order config files and CLI options should be evaluated <precedence>
--no-editorconfig
Don't take .editorconfig into account when parsing configuration
--find-config-path
Finds a path to the configuration file for the given input file <file>
--ignore-path
Path to a file with patterns describing files to ignore <path>
--plugin
Add a plugin <path>
--plugin-search-dir
Custom directory that contains prettier plugins in node_modules subdirectory <path>
--with-node-modules
Process files inside 'node_modules' directory
--cursor-offset
Print (to stderr) where a cursor at the given position would move to after formatting <int>
--range-end
Format code ending at a given character offset (exclusive) <int>
--range-start
Format code starting at a given character offset <int>
--no-color
Do not colorize error messages
--file-info
Extract the following info (as JSON) for a given file path <path>
-h--help
Show CLI usage, or details about the given flag <flag>
-u--ignore-unknown
Ignore unknown files
--insert-pragma
Insert @format pragma into file's first docblock comment
--loglevel
What level of logs to report <level>
--require-pragma
Require either '@prettier' or '@format' to be present in the file's first docblock comment in order for it to be formatted
--stdin-filepath
Path to the file to pretend that stdin comes from <path>
--support-info
Print support information as JSON
-v--version
Print Prettier version
--debug-check
This will cause Prettier to print an error message if it detects that code correctness might have changed
--no-error-on-unmatched-pattern
Prevent errors when pattern is unmatched
ArgumentsPositional, in order
<file, dir or glob>
· optional · repeatable · filepaths