{
"name": "prettier",
"description": "Run Prettier from the command line",
"options": [
{
"names": [
"-c",
"--check"
],
"description": "Check if your files are formatted",
"takes_arg": true,
"arg": {
"name": "file, dir, or glob",
"is_variadic": true,
"template": "filepaths"
}
},
{
"names": [
"-l",
"--list-different"
],
"description": "Print the names of files that are different from Prettier's formatting"
},
{
"names": [
"-w",
"--write"
],
"description": "Edit files in-place"
},
{
"names": [
"--arrow-parens"
],
"description": "Include parentheses around a sole arrow function parameter",
"takes_arg": true,
"arg": {
"name": "mode",
"suggestions": [
"always",
"avoid"
]
}
},
{
"names": [
"--no-bracket-spacing"
],
"description": "Do not print spaces between brackets"
},
{
"names": [
"--embedded-language-formatting"
],
"description": "Control how Prettier formats quoted code embedded in the file",
"takes_arg": true,
"arg": {
"name": "mode",
"suggestions": [
"auto",
"off"
]
}
},
{
"names": [
"--end-of-line"
],
"description": "Which end of line characters to apply",
"takes_arg": true,
"arg": {
"name": "choice",
"suggestions": [
"lf",
"crlf",
"cr",
"auto"
]
}
},
{
"names": [
"--html-whitespace-sensitivity"
],
"description": "How to handle whitespaces in HTML",
"takes_arg": true,
"arg": {
"name": "choice",
"suggestions": [
"css",
"strict",
"ignore"
]
}
},
{
"names": [
"--jsx-bracket-same-line"
],
"description": "Put > on the last line instead of at a new line"
},
{
"names": [
"--jsx-single-quote"
],
"description": "Use single quotes in JSX"
},
{
"names": [
"--parser"
],
"description": "Which parser to use",
"takes_arg": true,
"arg": {
"name": "parser",
"suggestions": [
"flow",
"babel",
"babel-flow",
"babel-ts",
"typescript",
"espree",
"meriyah",
"css",
"less",
"scss",
"json",
"json5",
"json-stringify",
"graphql",
"markdown",
"mdx",
"vue",
"yaml",
"html",
"angular",
"lwc"
]
}
},
{
"names": [
"--print-width"
],
"description": "The line length where Prettier will try wrap",
"takes_arg": true,
"arg": {
"name": "int"
}
},
{
"names": [
"--prose-wrap"
],
"description": "How to wrap prose",
"takes_arg": true,
"arg": {
"suggestions": [
"always",
"never",
"preserve"
]
}
},
{
"names": [
"--quote-props"
],
"description": "Change when properties in objects are quoted",
"takes_arg": true,
"arg": {
"name": "when",
"suggestions": [
"as-needed",
"consistent",
"preserve"
]
}
},
{
"names": [
"--no-semi"
],
"description": "Do not print semicolons, except at the beginning of lines which may need them"
},
{
"names": [
"--single-quote"
],
"description": "Use single quotes instead of double quotes"
},
{
"names": [
"--tab-width"
],
"description": "Number of spaces per indentation level",
"takes_arg": true,
"arg": {
"name": "int"
}
},
{
"names": [
"--trailing-comma"
],
"description": "Print trailing commas wherever possible when multi-line",
"takes_arg": true,
"arg": {
"name": "type",
"suggestions": [
"es5",
"none",
"all"
]
}
},
{
"names": [
"--use-tabs"
],
"description": "Indent with tabs instead of spaces"
},
{
"names": [
"--vue-indent-script-and-style"
],
"description": "Indent script and style tags in Vue files"
},
{
"names": [
"--config"
],
"description": "Path to a Prettier configuration file (.prettierrc, package.json, prettier.config.js)",
"takes_arg": true,
"arg": {
"name": "path",
"template": "filepaths"
}
},
{
"names": [
"--no-config"
],
"description": "Do not look for a configuration file"
},
{
"names": [
"--config-precedence"
],
"description": "Define in which order config files and CLI options should be evaluated",
"takes_arg": true,
"arg": {
"name": "precedence",
"suggestions": [
"cli-override",
"file-override",
"prefer-file"
]
}
},
{
"names": [
"--no-editorconfig"
],
"description": "Don't take .editorconfig into account when parsing configuration"
},
{
"names": [
"--find-config-path"
],
"description": "Finds a path to the configuration file for the given input file",
"takes_arg": true,
"arg": {
"name": "file",
"template": "filepaths"
}
},
{
"names": [
"--ignore-path"
],
"description": "Path to a file with patterns describing files to ignore",
"takes_arg": true,
"arg": {
"name": "path",
"template": "filepaths"
}
},
{
"names": [
"--plugin"
],
"description": "Add a plugin",
"takes_arg": true,
"arg": {
"name": "path",
"template": "folders"
}
},
{
"names": [
"--plugin-search-dir"
],
"description": "Custom directory that contains prettier plugins in node_modules subdirectory",
"takes_arg": true,
"arg": {
"name": "path",
"is_variadic": true,
"template": "folders"
}
},
{
"names": [
"--with-node-modules"
],
"description": "Process files inside 'node_modules' directory"
},
{
"names": [
"--cursor-offset"
],
"description": "Print (to stderr) where a cursor at the given position would move to after formatting",
"takes_arg": true,
"arg": {
"name": "int"
}
},
{
"names": [
"--range-end"
],
"description": "Format code ending at a given character offset (exclusive)",
"takes_arg": true,
"arg": {
"name": "int"
}
},
{
"names": [
"--range-start"
],
"description": "Format code starting at a given character offset",
"takes_arg": true,
"arg": {
"name": "int"
}
},
{
"names": [
"--no-color"
],
"description": "Do not colorize error messages"
},
{
"names": [
"--file-info"
],
"description": "Extract the following info (as JSON) for a given file path",
"takes_arg": true,
"arg": {
"name": "path",
"template": "filepaths"
}
},
{
"names": [
"-h",
"--help"
],
"description": "Show CLI usage, or details about the given flag",
"takes_arg": true,
"arg": {
"name": "flag"
}
},
{
"names": [
"-u",
"--ignore-unknown"
],
"description": "Ignore unknown files"
},
{
"names": [
"--insert-pragma"
],
"description": "Insert @format pragma into file's first docblock comment"
},
{
"names": [
"--loglevel"
],
"description": "What level of logs to report",
"takes_arg": true,
"arg": {
"name": "level",
"suggestions": [
"silent",
"error",
"warn",
"log",
"debug"
]
}
},
{
"names": [
"--require-pragma"
],
"description": "Require either '@prettier' or '@format' to be present in the file's first docblock comment in order for it to be formatted"
},
{
"names": [
"--stdin-filepath"
],
"description": "Path to the file to pretend that stdin comes from",
"takes_arg": true,
"arg": {
"name": "path",
"template": "filepaths"
}
},
{
"names": [
"--support-info"
],
"description": "Print support information as JSON"
},
{
"names": [
"-v",
"--version"
],
"description": "Print Prettier version"
},
{
"names": [
"--debug-check"
],
"description": "This will cause Prettier to print an error message if it detects that code correctness might have changed"
},
{
"names": [
"--no-error-on-unmatched-pattern"
],
"description": "Prevent errors when pattern is unmatched"
}
],
"args": [
{
"name": "file, dir or glob",
"is_variadic": true,
"template": "filepaths"
}
]
}