{
@jsonschema(schema="http://json-schema.org/draft-07/schema#")
@jsonschema(id="https://json.schemastore.org/prettierrc.json")
matchN(1, [matchN(2, [#optionsDefinition & {
...
}, #overridesDefinition & {
...
}]), string])
#optionsDefinition: {
arrowParens?: matchN(1, ["always", "avoid"])
bracketSameLine?: bool
bracketSpacing?: bool
checkIgnorePragma?: bool
cursorOffset?: int
embeddedLanguageFormatting?: matchN(1, ["auto", "off"])
endOfLine?: matchN(1, ["lf", "crlf", "cr", "auto"])
experimentalOperatorPosition?: matchN(1, ["start", "end"])
experimentalTernaries?: bool
filepath?: string
htmlWhitespaceSensitivity?: matchN(1, ["css", "strict", "ignore"])
insertPragma?: bool
jsxSingleQuote?: bool
objectWrap?: matchN(1, ["preserve", "collapse"])
parser?: matchN(>=1, ["flow", "babel", "babel-flow", "babel-ts", "typescript", "acorn", "espree", "meriyah", "css", "less", "scss", "json", "json5", "jsonc", "json-stringify", "graphql", "markdown", "mdx", "vue", "yaml", "glimmer", "html", "angular", "lwc", "mjml", string])
plugins?: [...string]
printWidth?: int
proseWrap?: matchN(1, ["always", "never", "preserve"])
quoteProps?: matchN(1, ["as-needed", "consistent", "preserve"])
rangeEnd?: int
rangeStart?: int
requirePragma?: bool
semi?: bool
singleAttributePerLine?: bool
singleQuote?: bool
tabWidth?: int
trailingComma?: matchN(1, ["all", "es5", "none"])
useTabs?: bool
vueIndentScriptAndStyle?: bool
...
}
#overridesDefinition: {
overrides?: [...close({
files!: matchN(1, [string, [...string]])
excludeFiles?: matchN(1, [string, [...string]])
options?: #optionsDefinition
})]
...
}
}Include parentheses around a sole arrow function parameter.
Put > of opening tags on the last line instead of on a new line.
Print spaces between brackets.
Check whether the file's first docblock comment contains '@noprettier' or '@noformat' to determine if it should be formatted.
Print (to stderr) where a cursor at the given position would move to after formatting.
Control how Prettier formats quoted code embedded in the file.
Which end of line characters to apply.
Where to print operators when binary expressions wrap lines.
Use curious ternaries, with the question mark after the condition.
How to handle whitespaces in HTML.
Insert @format pragma into file's first docblock comment.
Use single quotes in JSX.
How to wrap object literals.
matchN(>=1, ["flow", "babel", "babel-flow", "babel-ts", "typescript", "acorn", "espree", "meriyah", "css", "less", "scss", "json", "json5", "jsonc", "json-stringify", "graphql", "markdown", "mdx", "vue", "yaml", "glimmer", "html", "angular", "lwc", "mjml", string])
Which parser to use.
The line length where Prettier will try wrap.
How to wrap prose.
Change when properties in objects are quoted.
Format code starting at a given character offset. The range will extend backwards to the start of the first line containing the selected statement.
Require either '@prettier' or '@format' to be present in the file's first docblock comment in order for it to be formatted.
Enforce single attribute per line in HTML, Vue and JSX.
Use single quotes instead of double quotes.
Print trailing commas wherever possible when multi-line.
Indent script and style tags in Vue files.
[...close({
files!: matchN(1, [string, [...string]])
excludeFiles?: matchN(1, [string, [...string]])
options?: #optionsDefinition
})]Provide a list of patterns to override prettier configuration.
Schema for .prettierrc