Formatter Validator Minifier Escape / Unescape JSON ↔ String JSON ↔ YAML JSON → CSV NDJSON / JSON Lines JSON → Types JSON ↔ XML JSON Diff JSON Patch Canonicalize (RFC 8785) Schema Validator Schema Generator JSONPath Tester JWT Decoder JSON Errors Schemas More Tools
JSONTools / Schema registry / prettierrc.json
Schema registry

prettierrc.json

.prettierrc configuration file

.prettierrc.prettierrc.json.prettierrc.yml.prettierrc.yaml

Check your file against this schema

Opens the validator with this schema already loaded. Paste your .prettierrc and it validates in your browser — nothing is uploaded.

Validate a .prettierrc → View raw schema

Fields

Generated directly from the schema, following local $refs, to two levels of nesting.

Field Type Description
arrowParensoneOfInclude parentheses around a sole arrow function parameter.
default: "always"
bracketSameLinebooleanPut > of opening tags on the last line instead of on a new line.
default: false
bracketSpacingbooleanPrint spaces between brackets.
default: true
checkIgnorePragmabooleanCheck whether the file's first docblock comment contains '@noprettier' or '@noformat' to determine if it should be formatted.
default: false
cursorOffsetintegerPrint (to stderr) where a cursor at the given position would move to after formatting.
default: -1
embeddedLanguageFormattingoneOfControl how Prettier formats quoted code embedded in the file.
default: "auto"
endOfLineoneOfWhich end of line characters to apply.
default: "lf"
experimentalOperatorPositiononeOfWhere to print operators when binary expressions wrap lines.
default: "end"
experimentalTernariesbooleanUse curious ternaries, with the question mark after the condition.
default: false
filepathstringSpecify the input filepath. This will be used to do parser inference.
htmlWhitespaceSensitivityoneOfHow to handle whitespaces in HTML.
default: "css"
insertPragmabooleanInsert @format pragma into file's first docblock comment.
default: false
jsxSingleQuotebooleanUse single quotes in JSX.
default: false
objectWraponeOfHow to wrap object literals.
default: "preserve"
parseranyOfWhich parser to use.
pluginsarray<string>Add a plugin. Multiple plugins can be passed as separate `--plugin`s.
default: []
printWidthintegerThe line length where Prettier will try wrap.
default: 80
proseWraponeOfHow to wrap prose.
default: "preserve"
quotePropsoneOfChange when properties in objects are quoted.
default: "as-needed"
rangeEndintegerFormat code ending at a given character offset (exclusive). The range will extend forwards to the end of the selected statement.
default: null
rangeStartintegerFormat code starting at a given character offset. The range will extend backwards to the start of the first line containing the selected statement.
default: 0
requirePragmabooleanRequire either '@prettier' or '@format' to be present in the file's first docblock comment in order for it to be formatted.
default: false
semibooleanPrint semicolons.
default: true
singleAttributePerLinebooleanEnforce single attribute per line in HTML, Vue and JSX.
default: false
singleQuotebooleanUse single quotes instead of double quotes.
default: false
tabWidthintegerNumber of spaces per indentation level.
default: 2
trailingCommaoneOfPrint trailing commas wherever possible when multi-line.
default: "all"
useTabsbooleanIndent with tabs instead of spaces.
default: false
vueIndentScriptAndStylebooleanIndent script and style tags in Vue files.
default: false
overridesarray<object>Provide a list of patterns to override prettier configuration.

What we found in this schema

Specification sections for the keywords in this schema

Keyword Document Section
$idJSON Schema Core, draft 2020-12§8.2.1 — The "$id" Keyword
$refJSON Schema Core, draft 2020-12§8.2.3.1 — Direct References with "$ref"
$schemaJSON Schema Core, draft 2020-12§8.1.1 — "$schema"
constJSON Schema Validation, draft 2020-12§6.1.3 — "const"
defaultJSON Schema Validation, draft 2020-12§9.2 — "default"
descriptionJSON Schema Validation, draft 2020-12§9.1 — "title" and "description"
itemsJSON Schema Core, draft 2020-12§10.3.1.2 — "items"
oneOfJSON Schema Core, draft 2020-12§10.2.1.3 — "oneOf"
propertiesJSON Schema Core, draft 2020-12§10.3.2.1 — "properties"
typeJSON Schema Validation, draft 2020-12§6.1.1 — "type"

Documents

Attribution

This schema comes from SchemaStore, distributed under the Apache License 2.0. Copyright 2015–present Mads Kristensen and contributors. View the original file. The field table and audit on this page are generated by JSONTools.tools; the schema itself is unmodified.

← All schemas