Discover modules > cue.dev/x/npmjs/prettier
v0.7.0
#Schema: ¶

Schema for .prettierrc

#optionsDefinition: ¶
arrowParens?: matchN(1, ["always", "avoid"]) ¶

Include parentheses around a sole arrow function parameter.

bracketSameLine?: bool ¶

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

bracketSpacing?: bool ¶

Print spaces between brackets.

checkIgnorePragma?: bool ¶

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

cursorOffset?: int ¶

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

embeddedLanguageFormatting?: matchN(1, ["auto", "off"]) ¶

Control how Prettier formats quoted code embedded in the file.

endOfLine?: matchN(1, ["lf", "crlf", "cr", "auto"]) ¶

Which end of line characters to apply.

experimentalOperatorPosition?: matchN(1, ["start", "end"]) ¶

Where to print operators when binary expressions wrap lines.

experimentalTernaries?: bool ¶

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

filepath?: string ¶

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

htmlWhitespaceSensitivity?: matchN(1, ["css", "strict", "ignore"]) ¶

How to handle whitespaces in HTML.

insertPragma?: bool ¶

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

jsxSingleQuote?: bool ¶

Use single quotes in JSX.

objectWrap?: matchN(1, ["preserve", "collapse"]) ¶

How to wrap object literals.

parser?:
click to see definition
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.

plugins?: [...string] ¶

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

[...]: string
printWidth?: int ¶

The line length where Prettier will try wrap.

proseWrap?: matchN(1, ["always", "never", "preserve"]) ¶

How to wrap prose.

quoteProps?: matchN(1, ["as-needed", "consistent", "preserve"]) ¶

Change when properties in objects are quoted.

rangeEnd?: int ¶

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

rangeStart?: int ¶

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

requirePragma?: bool ¶

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

semi?: bool ¶

Print semicolons.

singleAttributePerLine?: bool ¶

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

singleQuote?: bool ¶

Use single quotes instead of double quotes.

tabWidth?: int ¶

Number of spaces per indentation level.

trailingComma?: matchN(1, ["all", "es5", "none"]) ¶

Print trailing commas wherever possible when multi-line.

useTabs?: bool ¶

Indent with tabs instead of spaces.

vueIndentScriptAndStyle?: bool ¶

Indent script and style tags in Vue files.

#overridesDefinition: ¶
overrides?:
click to see definition
[...close({
	// Include these files in this override.
	files!: matchN(1, [string, [...string]])

	// Exclude these files from this override.
	excludeFiles?: matchN(1, [string, [...string]])
	options?:      #optionsDefinition
})]
¶

Provide a list of patterns to override prettier configuration.

[...]:
files!: matchN(1, [string, [...string]])

Include these files in this override.

excludeFiles?: matchN(1, [string, [...string]])

Exclude these files from this override.

options?: #optionsDefinition

Source files

  • schema.cue