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 Quoteความชอบที่ Prettier จะข้ามให้เองเมื่อการ escape จะแย่ลง
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 Widthความกว้างที่ Prettier พยายามทำให้ได้ ไม่ใช่ขีดจำกัดตายตัว
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-neededconsistentpreservesemiSemiเซมิโคลอน และกับดัก ASI ที่อยู่เบื้องหลังค่าเริ่มต้น
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