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
cursorOffset integer

Print (to stderr) where a cursor at the given position would move to after formatting. This option cannot be used with --range-start and --range-end.

Default: -1
editorconfig boolean

Whether parse the .editorconfig file in your project and convert its properties to the corresponding Prettier configuration. This configuration will be overridden by .prettierrc, etc.

Default: false
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"
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
parser 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.

pluginSearchDirs string[] | enum

Custom directory that contains prettier plugins in node_modules subdirectory. Overrides default behavior when plugins are searched relatively to the location of Prettier. Multiple values are accepted.

Default:
[]
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. This option cannot be used with --cursor-offset.

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. This option cannot be used with --cursor-offset.

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: "es5"
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.