Schema URL

Type: object | string

One of

1. object object
2. string string

Definitions

optionsDefinition object
arrowParens enum | enum

Include parentheses around a sole arrow function parameter.

Default: "always"
bracketSameLine boolean

Put > of opening tags on the last line instead of on a new line.

Default: false
bracketSpacing boolean

Print spaces between brackets.

Default: true
checkIgnorePragma boolean

Check whether the file's first docblock comment contains '@noprettier' or '@noformat' to determine if it should be formatted.

Default: false
cursorOffset integer

Print (to stderr) where a cursor at the given position would move to after formatting.

Default: -1
embeddedLanguageFormatting enum | enum

Control how Prettier formats quoted code embedded in the file.

Default: "auto"
endOfLine enum | enum | enum | enum

Which end of line characters to apply.

Default: "lf"
experimentalOperatorPosition enum | enum

Where to print operators when binary expressions wrap lines.

Default: "end"
experimentalTernaries boolean

Use curious ternaries, with the question mark after the condition.

Default: false
filepath string

Specify the input filepath. This will be used to do parser inference.

htmlWhitespaceSensitivity enum | enum | enum

How to handle whitespaces in HTML.

Default: "css"
insertPragma boolean

Insert @format pragma into file's first docblock comment.

Default: false
jsxSingleQuote boolean

Use single quotes in JSX.

Default: false
objectWrap enum | enum

How to wrap object literals.

Default: "preserve"
parser enum | enum | enum | enum | enum | enum | enum | enum | enum | enum | enum | enum | enum | enum | enum | enum | enum | enum | enum | enum | enum | enum | enum | enum | enum | string

Which parser to use.

plugins string[]

Add a plugin. Multiple plugins can be passed as separate --plugins.

Default:
[]
printWidth integer

The line length where Prettier will try wrap.

Default: 80
proseWrap enum | enum | enum

How to wrap prose.

Default: "preserve"
quoteProps enum | enum | enum

Change when properties in objects are quoted.

Default: "as-needed"
rangeEnd integer

Format code ending at a given character offset (exclusive). The range will extend forwards to the end of the selected statement.

Default: null
rangeStart integer

Format code starting at a given character offset. The range will extend backwards to the start of the first line containing the selected statement.

Default: 0
requirePragma boolean

Require either '@prettier' or '@format' to be present in the file's first docblock comment in order for it to be formatted.

Default: false
semi boolean

Print semicolons.

Default: true
singleAttributePerLine boolean

Enforce single attribute per line in HTML, Vue and JSX.

Default: false
singleQuote boolean

Use single quotes instead of double quotes.

Default: false
tabWidth integer

Number of spaces per indentation level.

Default: 2
trailingComma enum | enum | enum

Print trailing commas wherever possible when multi-line.

Default: "all"
useTabs boolean

Indent with tabs instead of spaces.

Default: false
vueIndentScriptAndStyle boolean

Indent script and style tags in Vue files.

Default: false
overridesDefinition object
overrides object[]

Provide a list of patterns to override prettier configuration.