Skip to content

Standard Prettier overrides ​

By default, the same formatting options are used as configured through the standard prettier options. By using versions of these standard options prefixed with pug, you can override pug formatting options even when using pug embedded in other files, e.g. vue single-file components:

Bracket Spacing ​

pugBracketSpacing

Print spaces between brackets in object literals.

Bracket Same Line ​

pugBracketSameLine

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

pugPrintWidth

Specify the line length that the printer will wrap on.

Semicolons ​

pugSemi

Print semicolons at the ends of code statements.

Quotes ​

pugSingleQuote

Use single quotes instead of double quotes.
Please note that the opposite setting will be used automatically for inlined JavaScript when inside of quotes.

Tab Width ​

pugTabWidth

Use spaces for indentation and specify the number of spaces per indentation-level.

Tabs ​

pugUseTabs

Indent lines with tabs instead of spaces.
Overrides pugTabWidth

Arrow Function Parentheses ​

pugArrowParens

Include parentheses around a sole arrow function parameter.

Released under the MIT License.