Prettier 설정 생성기 및 플레이그라운드

Prettier latest을(를) 로드하는 중…

Prettier 옵션 레퍼런스

아래의 모든 옵션은 위 생성기에서 사용할 수 있습니다. 표시된 기본값은 Prettier 3.9.6 기준입니다.

bracketSameLineBracket Same Line

where the closing angle bracket of a multi-line tag lands

기본값
false
CLI 플래그
--bracket-same-line

bracketSpacingBracket Spacing

the spaces inside object braces, and everywhere they follow

기본값
true
CLI 플래그
--no-bracket-spacing

objectWrapObject Wrap

Prettier's one deliberate escape hatch, and how to switch it off

기본값
"preserve"
CLI 플래그
--object-wrap
허용되는 값
preservecollapse

proseWrapProse Wrap

how Markdown paragraphs are wrapped, and why the default leaves them alone

기본값
"preserve"
CLI 플래그
--prose-wrap
허용되는 값
alwaysneverpreserve

singleAttributePerLineSingle Attribute Per Line

one attribute per line, for markup diffs that read like code diffs

기본값
false
CLI 플래그
--single-attribute-per-line

singleQuoteSingle Quote

a preference Prettier overrides whenever escaping would suffer

기본값
false
CLI 플래그
--single-quote

embeddedLanguageFormattingEmbedded Language Formatting

formatting the CSS, HTML and GraphQL hiding inside your template literals

기본값
"auto"
CLI 플래그
--embedded-language-formatting
허용되는 값
autooff

endOfLineEnd Of Line

line endings, and the Windows diff problem this option was created to end

기본값
"lf"
CLI 플래그
--end-of-line
허용되는 값
lfcrlfcrauto

printWidthPrint Width

the width Prettier aims for, not a hard limit

기본값
80
CLI 플래그
--print-width

tabWidthTab Width

how wide one indentation level is, in columns

기본값
2
CLI 플래그
--tab-width

useTabsUse Tabs

tabs for indentation, and why accessibility is the strongest argument

기본값
false
CLI 플래그
--use-tabs

htmlWhitespaceSensitivityHtml Whitespace Sensitivity

the option that stops Prettier changing how your page renders

기본값
"css"
CLI 플래그
--html-whitespace-sensitivity
허용되는 값
cssstrictignore

vueIndentScriptAndStyleVue Indent Script And Style

whether a Vue SFC indents inside its script and style blocks

기본값
false
CLI 플래그
--vue-indent-script-and-style

arrowParensArrow Parens

parentheses around a lone arrow parameter, and the edit cost of leaving them off

기본값
"always"
CLI 플래그
--arrow-parens
허용되는 값
alwaysavoid

experimentalOperatorPositionExperimental Operator Position

whether a wrapped operator trails the line above or leads the line below

기본값
"end"
CLI 플래그
--experimental-operator-position
허용되는 값
startend

experimentalTernariesExperimental Ternaries

an opt-in answer to Prettier's longest-running formatting argument

기본값
false
CLI 플래그
--experimental-ternaries

jsxSingleQuoteJsx Single Quote

quote style for JSX attributes, kept separate from your JavaScript strings

기본값
false
CLI 플래그
--jsx-single-quote

quotePropsQuote Props

when object keys get quoted, and the consistency option most people want

기본값
"as-needed"
CLI 플래그
--quote-props
허용되는 값
as-neededconsistentpreserve

semiSemi

semicolons, and the ASI hazards behind the default

기본값
true
CLI 플래그
--no-semi

trailingCommaTrailing Comma

the option that exists to make diffs smaller

기본값
"all"
CLI 플래그
--trailing-comma
허용되는 값
alles5none

checkIgnorePragmaCheck Ignore Pragma

lets a file opt itself out of formatting entirely

기본값
false
CLI 플래그
--check-ignore-pragma

cursorOffsetCursor Offset

the option that stops format-on-save losing your place

기본값
-1
CLI 플래그
--cursor-offset

insertPragmaInsert Pragma

stamps a @format marker on every file Prettier formats

기본값
false
CLI 플래그
--insert-pragma

rangeEndRange End

the exclusive end of a partial format

기본값
CLI 플래그
--range-end

rangeStartRange Start

the start of a partial format, and how Format Selection actually works

기본값
0
CLI 플래그
--range-start

requirePragmaRequire Pragma

the option that lets a huge codebase adopt Prettier one file at a time

기본값
false
CLI 플래그
--require-pragma