Configuration options for the Oxfmt.
Most options are the same as Prettier's options. See also https://prettier.io/docs/options
In addition, some options are our own extensions.
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 | null
Ignore case when sorting. (Default: true)
experimentalSortImports.internalPattern
type: string[]
Glob patterns to identify internal imports.
experimentalSortImports.newlinesBetween
type: boolean | null
Add newlines between import groups. (Default: true)
experimentalSortImports.order
type: string | null
Sort order. (Default: "asc")
experimentalSortImports.partitionByComment
type: boolean | null
Partition imports by comments. (Default: false)
experimentalSortImports.partitionByNewline
type: boolean | null
Partition imports by newlines. (Default: false)
experimentalSortImports.sortSideEffects
type: boolean | null
Sort side-effect imports. (Default: false)
experimentalSortPackageJson
type: boolean | null
Experimental: Sort package.json keys. (Default: true)
ignorePatterns
type: string[]
Ignore files matching these glob patterns. Current working directory is used as the root.
insertFinalNewline
type: boolean | null
Whether to insert a final newline at the end of the file. (Default: true)
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)