Version 1.9.0+
This check exists to ensure the JSON in your schemas is pretty.
It exists as a facilitator for its auto-correction. This way you can right-click fix the problem.
The following examples contain code snippets that either fail or pass this check.
{% schema %}
{
"locales": {
"en": {
"title": "Welcome", "product": "Product"
},
"fr": { "title": "Bienvenue", "product": "Produit" }
}
}
{% endschema %}
{% schema %}
{
"locales": {
"en": {
"title": "Welcome",
"product": "Product"
},
"fr": {
"title": "Bienvenue",
"product": "Produit"
}
}
}
{% endschema %}
The following example contains the default configuration for this check:
SchemaJsonFormat:
enabled: true
severity: style
start_level: 0
indent: ' '
Parameter | Description |
---|---|
enabled | Whether the check is enabled. |
severity | The severity of the check. |
start_level | The indentation level. If you prefer an indented schema, set this to 1. |
indent | The character(s) used for indentation levels. |
This check is safe to disable. You might want to disable this check if you do not care about the visual appearance of your schema tags.