Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/deno/std/prettier/vendor/index.d.ts>RequiredOptions

A modern runtime for JavaScript and TypeScript.
Go to Latest
interface RequiredOptions
implements [[doc.printer].Options]
import { type RequiredOptions } from "https://deno.land/x/deno@v0.22.0/std/prettier/vendor/index.d.ts";

Properties

semi: boolean

Print semicolons at the ends of statements.

singleQuote: boolean

Use single quotes instead of double quotes.

jsxSingleQuote: boolean

Use single quotes in JSX.

trailingComma: "none" | "es5" | "all"

Print trailing commas wherever possible.

bracketSpacing: boolean

Print spaces between brackets in object literals.

jsxBracketSameLine: boolean

Put the > of a multi-line JSX element at the end of the last line instead of being alone on the next line.

rangeStart: number

Format only a segment of a file.

rangeEnd: number

Format only a segment of a file.

Specify which parser to use.

filepath: string

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

requirePragma: boolean

Prettier can restrict itself to only format files that contain a special comment, called a pragma, at the top of the file. This is very useful when gradually transitioning large, unformatted codebases to prettier.

insertPragma: boolean

Prettier can insert a special @format marker at the top of files specifying that the file has been formatted with prettier. This works well when used in tandem with the --require-pragma option. If there is already a docblock at the top of the file then this option will add a newline to it with the @format marker.

proseWrap:
| boolean
| "always"
| "never"
| "preserve"

By default, Prettier will wrap markdown text as-is since some services use a linebreak-sensitive renderer. In some cases you may want to rely on editor/viewer soft wrapping instead, so this option allows you to opt out.

arrowParens: "avoid" | "always"

Include parentheses around a sole arrow function parameter.

plugins: Array<string | Plugin>

The plugin API is in a beta state.

htmlWhitespaceSensitivity: "css" | "strict" | "ignore"

How to handle whitespaces in HTML.

endOfLine:
| "auto"
| "lf"
| "crlf"
| "cr"

Which end of line characters to apply.

quoteProps: "as-needed" | "consistent" | "preserve"

Change when properties in objects are quoted.