Prettier yapılandırma oluşturucu ve oyun alanı

Prettier latest yükleniyor…

Prettier seçenek referansı

Aşağıdaki her seçenek yukarıdaki oluşturucuda mevcuttur. Gösterilen varsayılanlar Prettier 3.9.6 sürümündendir.

bracketSameLineBracket Same Line

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

Varsayılan
false
CLI bayrağı
--bracket-same-line

bracketSpacingBracket Spacing

the spaces inside object braces, and everywhere they follow

Varsayılan
true
CLI bayrağı
--no-bracket-spacing

objectWrapObject Wrap

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

Varsayılan
"preserve"
CLI bayrağı
--object-wrap
İzin verilen değerler
preservecollapse

proseWrapProse Wrap

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

Varsayılan
"preserve"
CLI bayrağı
--prose-wrap
İzin verilen değerler
alwaysneverpreserve

singleAttributePerLineSingle Attribute Per Line

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

Varsayılan
false
CLI bayrağı
--single-attribute-per-line

singleQuoteSingle Quote

a preference Prettier overrides whenever escaping would suffer

Varsayılan
false
CLI bayrağı
--single-quote

embeddedLanguageFormattingEmbedded Language Formatting

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

Varsayılan
"auto"
CLI bayrağı
--embedded-language-formatting
İzin verilen değerler
autooff

endOfLineEnd Of Line

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

Varsayılan
"lf"
CLI bayrağı
--end-of-line
İzin verilen değerler
lfcrlfcrauto

printWidthPrint Width

the width Prettier aims for, not a hard limit

Varsayılan
80
CLI bayrağı
--print-width

tabWidthTab Width

how wide one indentation level is, in columns

Varsayılan
2
CLI bayrağı
--tab-width

useTabsUse Tabs

tabs for indentation, and why accessibility is the strongest argument

Varsayılan
false
CLI bayrağı
--use-tabs

htmlWhitespaceSensitivityHtml Whitespace Sensitivity

the option that stops Prettier changing how your page renders

Varsayılan
"css"
CLI bayrağı
--html-whitespace-sensitivity
İzin verilen değerler
cssstrictignore

vueIndentScriptAndStyleVue Indent Script And Style

whether a Vue SFC indents inside its script and style blocks

Varsayılan
false
CLI bayrağı
--vue-indent-script-and-style

arrowParensArrow Parens

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

Varsayılan
"always"
CLI bayrağı
--arrow-parens
İzin verilen değerler
alwaysavoid

experimentalOperatorPositionExperimental Operator Position

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

Varsayılan
"end"
CLI bayrağı
--experimental-operator-position
İzin verilen değerler
startend

experimentalTernariesExperimental Ternaries

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

Varsayılan
false
CLI bayrağı
--experimental-ternaries

jsxSingleQuoteJsx Single Quote

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

Varsayılan
false
CLI bayrağı
--jsx-single-quote

quotePropsQuote Props

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

Varsayılan
"as-needed"
CLI bayrağı
--quote-props
İzin verilen değerler
as-neededconsistentpreserve

semiSemi

semicolons, and the ASI hazards behind the default

Varsayılan
true
CLI bayrağı
--no-semi

trailingCommaTrailing Comma

the option that exists to make diffs smaller

Varsayılan
"all"
CLI bayrağı
--trailing-comma
İzin verilen değerler
alles5none

checkIgnorePragmaCheck Ignore Pragma

lets a file opt itself out of formatting entirely

Varsayılan
false
CLI bayrağı
--check-ignore-pragma

cursorOffsetCursor Offset

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

Varsayılan
-1
CLI bayrağı
--cursor-offset

insertPragmaInsert Pragma

stamps a @format marker on every file Prettier formats

Varsayılan
false
CLI bayrağı
--insert-pragma

rangeEndRange End

the exclusive end of a partial format

Varsayılan
CLI bayrağı
--range-end

rangeStartRange Start

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

Varsayılan
0
CLI bayrağı
--range-start

requirePragmaRequire Pragma

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

Varsayılan
false
CLI bayrağı
--require-pragma