prettierrc.json
.prettierrc configuration file
.prettierrc.prettierrc.json.prettierrc.yml.prettierrc.yaml
Validate
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.
Reference
Fields
Generated directly from the schema, following local
$refs, to two levels of nesting.
| Field | Type | Description |
|---|---|---|
arrowParens | oneOf | Include parentheses around a sole arrow function parameter. default: "always" |
bracketSameLine | boolean | Put > of opening tags on the last line instead of on a new line. default: false |
bracketSpacing | boolean | Print spaces between brackets. default: true |
checkIgnorePragma | boolean | Check whether the file's first docblock comment contains '@noprettier' or '@noformat' to determine if it should be formatted. default: false |
cursorOffset | integer | Print (to stderr) where a cursor at the given position would move to after formatting. default: -1 |
embeddedLanguageFormatting | oneOf | Control how Prettier formats quoted code embedded in the file. default: "auto" |
endOfLine | oneOf | Which end of line characters to apply. default: "lf" |
experimentalOperatorPosition | oneOf | Where to print operators when binary expressions wrap lines. default: "end" |
experimentalTernaries | boolean | Use curious ternaries, with the question mark after the condition. default: false |
filepath | string | Specify the input filepath. This will be used to do parser inference. |
htmlWhitespaceSensitivity | oneOf | How to handle whitespaces in HTML. default: "css" |
insertPragma | boolean | Insert @format pragma into file's first docblock comment. default: false |
jsxSingleQuote | boolean | Use single quotes in JSX. default: false |
objectWrap | oneOf | How to wrap object literals. default: "preserve" |
parser | anyOf | Which parser to use. |
plugins | array<string> | Add a plugin. Multiple plugins can be passed as separate `--plugin`s. default: [] |
printWidth | integer | The line length where Prettier will try wrap. default: 80 |
proseWrap | oneOf | How to wrap prose. default: "preserve" |
quoteProps | oneOf | Change when properties in objects are quoted. default: "as-needed" |
rangeEnd | integer | Format code ending at a given character offset (exclusive). The range will extend forwards to the end of the selected statement. default: null |
rangeStart | integer | Format 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 |
requirePragma | boolean | Require either '@prettier' or '@format' to be present in the file's first docblock comment in order for it to be formatted. default: false |
semi | boolean | Print semicolons. default: true |
singleAttributePerLine | boolean | Enforce single attribute per line in HTML, Vue and JSX. default: false |
singleQuote | boolean | Use single quotes instead of double quotes. default: false |
tabWidth | integer | Number of spaces per indentation level. default: 2 |
trailingComma | oneOf | Print trailing commas wherever possible when multi-line. default: "all" |
useTabs | boolean | Indent with tabs instead of spaces. default: false |
vueIndentScriptAndStyle | boolean | Indent script and style tags in Vue files. default: false |
overrides | array<object> | Provide a list of patterns to override prettier configuration. |
Audit
What we found in this schema
- Declared draft: draft-07
- Validates cleanly against its own meta-schema.
- Has 1 place(s) where keywords sit beside
$ref. Under draft-07 those keywords are silently ignored by every conforming validator — first at#/definitions/overridesDefinition/properties/overrides/items/properties/options. - 33 properties, 100% carrying a description, max nesting depth 11.
Standards
Specification sections for the keywords in this schema
| Keyword | Document | Section |
|---|---|---|
$id | JSON Schema Core, draft 2020-12 | §8.2.1 — The "$id" Keyword |
$ref | JSON Schema Core, draft 2020-12 | §8.2.3.1 — Direct References with "$ref" |
$schema | JSON Schema Core, draft 2020-12 | §8.1.1 — "$schema" |
const | JSON Schema Validation, draft 2020-12 | §6.1.3 — "const" |
default | JSON Schema Validation, draft 2020-12 | §9.2 — "default" |
description | JSON Schema Validation, draft 2020-12 | §9.1 — "title" and "description" |
items | JSON Schema Core, draft 2020-12 | §10.3.1.2 — "items" |
oneOf | JSON Schema Core, draft 2020-12 | §10.2.1.3 — "oneOf" |
properties | JSON Schema Core, draft 2020-12 | §10.3.2.1 — "properties" |
type | JSON Schema Validation, draft 2020-12 | §6.1.1 — "type" |
Documents
- JSON Schema Core, draft 2020-12 — JSON Schema: A Media Type for Describing JSON Documents, A. Wright, H. Andrews, B. Hutton, G. Dennis, Eds., 2022. draft-bhutton-json-schema-01. An expired Internet-Draft with no formal standing in the IETF standards process; it is nonetheless the specification of record for JSON Schema 2020-12, published by json-schema.org.
- JSON Schema Validation, draft 2020-12 — JSON Schema Validation: A Vocabulary for Structural Validation of JSON, A. Wright, H. Andrews, B. Hutton, Eds., 2022.
- RFC 8259 (STD 90) — The JavaScript Object Notation (JSON) Data Interchange Format, T. Bray, Ed., 2017. The format a schema describes.
- RFC 6901 — JavaScript Object Notation (JSON) Pointer. Defines the pointer syntax used by $ref fragments and the ~0 / ~1 escapes.
Source
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.