bracketSameLineBracket Same Line
where the closing angle bracket of a multi-line tag lands
- По умолчанию
false- Флаг CLI
--bracket-same-line
Каждая опция ниже доступна в генераторе выше. Показанные значения по умолчанию взяты из Prettier 3.9.6.
bracketSameLineBracket Same Linewhere the closing angle bracket of a multi-line tag lands
false--bracket-same-linebracketSpacingBracket Spacingthe spaces inside object braces, and everywhere they follow
true--no-bracket-spacingobjectWrapObject WrapPrettier's one deliberate escape hatch, and how to switch it off
"preserve"--object-wrappreservecollapseproseWrapProse Wraphow Markdown paragraphs are wrapped, and why the default leaves them alone
"preserve"--prose-wrapalwaysneverpreservesingleAttributePerLineSingle Attribute Per Lineone attribute per line, for markup diffs that read like code diffs
false--single-attribute-per-linesingleQuoteSingle Quotea preference Prettier overrides whenever escaping would suffer
false--single-quoteembeddedLanguageFormattingEmbedded Language Formattingformatting the CSS, HTML and GraphQL hiding inside your template literals
"auto"--embedded-language-formattingautooffendOfLineEnd Of Lineline endings, and the Windows diff problem this option was created to end
"lf"--end-of-linelfcrlfcrautoprintWidthPrint Widththe width Prettier aims for, not a hard limit
80--print-widthtabWidthTab Widthhow wide one indentation level is, in columns
2--tab-widthuseTabsUse Tabstabs for indentation, and why accessibility is the strongest argument
false--use-tabshtmlWhitespaceSensitivityHtml Whitespace Sensitivitythe option that stops Prettier changing how your page renders
"css"--html-whitespace-sensitivitycssstrictignorevueIndentScriptAndStyleVue Indent Script And Stylewhether a Vue SFC indents inside its script and style blocks
false--vue-indent-script-and-stylearrowParensArrow Parensparentheses around a lone arrow parameter, and the edit cost of leaving them off
"always"--arrow-parensalwaysavoidexperimentalOperatorPositionExperimental Operator Positionwhether a wrapped operator trails the line above or leads the line below
"end"--experimental-operator-positionstartendexperimentalTernariesExperimental Ternariesan opt-in answer to Prettier's longest-running formatting argument
false--experimental-ternariesjsxSingleQuoteJsx Single Quotequote style for JSX attributes, kept separate from your JavaScript strings
false--jsx-single-quotequotePropsQuote Propswhen object keys get quoted, and the consistency option most people want
"as-needed"--quote-propsas-neededconsistentpreservesemiSemisemicolons, and the ASI hazards behind the default
true--no-semitrailingCommaTrailing Commathe option that exists to make diffs smaller
"all"--trailing-commaalles5nonecheckIgnorePragmaCheck Ignore Pragmalets a file opt itself out of formatting entirely
false--check-ignore-pragmacursorOffsetCursor Offsetthe option that stops format-on-save losing your place
-1--cursor-offsetinsertPragmaInsert Pragmastamps a @format marker on every file Prettier formats
false--insert-pragmarangeEndRange Endthe exclusive end of a partial format
—--range-endrangeStartRange Startthe start of a partial format, and how Format Selection actually works
0--range-startrequirePragmaRequire Pragmathe option that lets a huge codebase adopt Prettier one file at a time
false--require-pragma