مولّد إعدادات Prettier وساحة التجربة

جارٍ تحميل Prettier latest…

مرجع خيارات Prettier

كل خيار أدناه متاح في المولّد أعلاه. القيم الافتراضية المعروضة مأخوذة من Prettier 3.9.6.

bracketSameLineBracket Same Line

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

القيمة الافتراضية
false
خيار سطر الأوامر
--bracket-same-line

bracketSpacingBracket Spacing

the spaces inside object braces, and everywhere they follow

القيمة الافتراضية
true
خيار سطر الأوامر
--no-bracket-spacing

objectWrapObject Wrap

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

القيمة الافتراضية
"preserve"
خيار سطر الأوامر
--object-wrap
القيم المسموح بها
preservecollapse

proseWrapProse Wrap

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

القيمة الافتراضية
"preserve"
خيار سطر الأوامر
--prose-wrap
القيم المسموح بها
alwaysneverpreserve

singleAttributePerLineSingle Attribute Per Line

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

القيمة الافتراضية
false
خيار سطر الأوامر
--single-attribute-per-line

singleQuoteSingle Quote

a preference Prettier overrides whenever escaping would suffer

القيمة الافتراضية
false
خيار سطر الأوامر
--single-quote

embeddedLanguageFormattingEmbedded Language Formatting

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

القيمة الافتراضية
"auto"
خيار سطر الأوامر
--embedded-language-formatting
القيم المسموح بها
autooff

endOfLineEnd Of Line

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

القيمة الافتراضية
"lf"
خيار سطر الأوامر
--end-of-line
القيم المسموح بها
lfcrlfcrauto

printWidthPrint Width

the width Prettier aims for, not a hard limit

القيمة الافتراضية
80
خيار سطر الأوامر
--print-width

tabWidthTab Width

how wide one indentation level is, in columns

القيمة الافتراضية
2
خيار سطر الأوامر
--tab-width

useTabsUse Tabs

tabs for indentation, and why accessibility is the strongest argument

القيمة الافتراضية
false
خيار سطر الأوامر
--use-tabs

htmlWhitespaceSensitivityHtml Whitespace Sensitivity

the option that stops Prettier changing how your page renders

القيمة الافتراضية
"css"
خيار سطر الأوامر
--html-whitespace-sensitivity
القيم المسموح بها
cssstrictignore

vueIndentScriptAndStyleVue Indent Script And Style

whether a Vue SFC indents inside its script and style blocks

القيمة الافتراضية
false
خيار سطر الأوامر
--vue-indent-script-and-style

arrowParensArrow Parens

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

القيمة الافتراضية
"always"
خيار سطر الأوامر
--arrow-parens
القيم المسموح بها
alwaysavoid

experimentalOperatorPositionExperimental Operator Position

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

القيمة الافتراضية
"end"
خيار سطر الأوامر
--experimental-operator-position
القيم المسموح بها
startend

experimentalTernariesExperimental Ternaries

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

القيمة الافتراضية
false
خيار سطر الأوامر
--experimental-ternaries

jsxSingleQuoteJsx Single Quote

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

القيمة الافتراضية
false
خيار سطر الأوامر
--jsx-single-quote

quotePropsQuote Props

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

القيمة الافتراضية
"as-needed"
خيار سطر الأوامر
--quote-props
القيم المسموح بها
as-neededconsistentpreserve

semiSemi

semicolons, and the ASI hazards behind the default

القيمة الافتراضية
true
خيار سطر الأوامر
--no-semi

trailingCommaTrailing Comma

the option that exists to make diffs smaller

القيمة الافتراضية
"all"
خيار سطر الأوامر
--trailing-comma
القيم المسموح بها
alles5none

checkIgnorePragmaCheck Ignore Pragma

lets a file opt itself out of formatting entirely

القيمة الافتراضية
false
خيار سطر الأوامر
--check-ignore-pragma

cursorOffsetCursor Offset

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

القيمة الافتراضية
-1
خيار سطر الأوامر
--cursor-offset

insertPragmaInsert Pragma

stamps a @format marker on every file Prettier formats

القيمة الافتراضية
false
خيار سطر الأوامر
--insert-pragma

rangeEndRange End

the exclusive end of a partial format

القيمة الافتراضية
خيار سطر الأوامر
--range-end

rangeStartRange Start

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

القيمة الافتراضية
0
خيار سطر الأوامر
--range-start

requirePragmaRequire Pragma

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

القيمة الافتراضية
false
خيار سطر الأوامر
--require-pragma