Prettier Config Logo

Prettier Config

Experimental Ternaries

Uses a new ternary formatting style that aims to be more readable and consistent. This will likely become the default in future versions.

Since Prettier 3.1.0

Experimental Operator Position

Controls where operators are placed when a line breaks (at the start or end of the line).

Since Prettier 3.5.0

Print Width

Specifies the line length that the printer will wrap on. Note: This is not a hard limit, but a guideline.

Since Prettier 0.0.0

Tab Width

Specifies the number of spaces per indentation-level.

Since Prettier 0.0.0

Tabs

Indent lines with tabs instead of spaces.

Since Prettier 0.0.0

Semicolons

Print semicolons at the ends of statements.

Since Prettier 0.0.0

Quotes

Use single quotes instead of double quotes.

Since Prettier 0.0.0

Quote Props

Control when properties in objects are quoted.

Since Prettier 1.17.0

JSX Quotes

Use single quotes instead of double quotes in JSX.

Since Prettier 1.15.0

Trailing Commas

Print trailing commas wherever possible in multi-line comma-separated syntactic structures.

Since Prettier 0.0.0

Bracket Spacing

Print spaces between brackets in object literals.

Since Prettier 0.0.0

Object Wrap

Controls how object literals are wrapped when they exceed the print width.

Since Prettier 3.5.0

Bracket Line

Put the > of a multi-line HTML (HTML, JSX, Vue, Angular) element at the end of the last line instead of being alone on the next line.

Since Prettier 2.4.0

Arrow Function Parentheses

Include parentheses around a sole arrow function parameter.

Since Prettier 1.9.0

Range Start

Format only a segment of a file, starting at a given character offset.

Since Prettier 0.0.0

Range End

Format only a segment of a file, ending at a given character offset (exclusive).

Since Prettier 0.0.0

Parser

Specify which parser to use. Prettier automatically infers this from the file extension, but you can override it.

Since Prettier 0.0.0

File Path

Specify the file name to use to infer which parser to use.

Since Prettier 0.0.0

Require Pragma

Prettier can restrict itself to only format files that contain a special comment, called a pragma, at the top of the file.

Since Prettier 1.7.0

Insert Pragma

Insert a special @format marker at the top of files specifying that the file has been formatted with Prettier.

Since Prettier 1.8.0

Prose Wrap

How to wrap prose in markdown files (by default, Prettier wraps prose to the print width).

Since Prettier 1.8.2

HTML Whitespace Sensitivity

Specify the global whitespace sensitivity for HTML files.

Since Prettier 1.15.0

Vue Indent Script and Style

Whether or not to indent the code inside <script> and <style> tags in Vue files.

Since Prettier 1.19.0

End of Line

Specify the line ending character to use.

Since Prettier 1.15.0

Embedded Language Formatting

Control whether Prettier formats quoted code embedded in the file.

Since Prettier 2.1.0

Single Attribute Per Line

Put each attribute on its own line of code in HTML, Vue, and JSX.

Since Prettier 2.6.0

Official Plugins

The list of plugins to use by Prettier.

Since Prettier 0.0.0