Skip to content

Configuration options for the formatter. ​

Most options are the same as Prettier's options. See also https://prettier.io/docs/options

arrowParens ​

type: string | null

Include parentheses around a sole arrow function parameter. (Default: "always")

bracketSameLine ​

type: boolean | null

Put the > of a multi-line JSX element at the end of the last line instead of being alone on the next line. (Default: false)

bracketSpacing ​

type: boolean | null

Print spaces between brackets in object literals. (Default: true)

embeddedLanguageFormatting ​

type: string | null

Control whether formats quoted code embedded in the file. (Default: "auto")

endOfLine ​

type: string | null

Which end of line characters to apply. (Default: "lf")

experimentalSortImports ​

type: object | null

Experimental: Sort import statements. Disabled by default.

experimentalSortImports.groups ​

type: array | null

Custom groups configuration for organizing imports. Each array element represents a group, and multiple group names in the same array are treated as one. Accepts both string and string[] as group elements.

experimentalSortImports.groups[n] ​

type: string[]

experimentalSortImports.ignoreCase ​

type: boolean

default: true

experimentalSortImports.newlinesBetween ​

type: boolean

default: true

experimentalSortImports.order ​

type: string | null

experimentalSortImports.partitionByComment ​

type: boolean

default: false

experimentalSortImports.partitionByNewline ​

type: boolean

default: false

experimentalSortImports.sortSideEffects ​

type: boolean

default: false

ignorePatterns ​

type: string[]

Ignore files matching these glob patterns. Current working directory is used as the root.

jsxSingleQuote ​

type: boolean | null

Use single quotes instead of double quotes in JSX. (Default: false)

objectWrap ​

type: string | null

How to wrap object literals when they could fit on one line or span multiple lines. (Default: "preserve") NOTE: In addition to Prettier's "preserve" and "collapse", we also support "always".

printWidth ​

type: integer | null

The line length that the printer will wrap on. (Default: 100)

quoteProps ​

type: string | null

Change when properties in objects are quoted. (Default: "as-needed")

semi ​

type: boolean | null

Print semicolons at the ends of statements. (Default: true)

singleAttributePerLine ​

type: boolean | null

Put each attribute on a new line in JSX. (Default: false)

singleQuote ​

type: boolean | null

Use single quotes instead of double quotes. (Default: false)

tabWidth ​

type: integer | null

Number of spaces per indentation level. (Default: 2)

trailingComma ​

type: string | null

Print trailing commas wherever possible. (Default: "all")

useTabs ​

type: boolean | null

Use tabs for indentation or spaces. (Default: false)

Released under the MIT License.