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
Print spaces between brackets in object literals.
Bracket Same Line
Put the )
of a multi-line element at the end of the last line instead of being alone on the next line.
Print Width
Specify the line length that the printer will wrap on.
Semicolons
Print semicolons at the ends of code statements.
Quotes
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
Use spaces for indentation and specify the number of spaces per indentation-level.
Tabs
Indent lines with tabs instead of spaces.
Overrides pugTabWidth
Arrow Function Parentheses
Include parentheses around a sole arrow function parameter.