Sha256: 9a00f416de89272ca3c1fd3093ed4ccffcd3910360f1b3db1da2d6aeb9c0f640
Contents?: true
Size: 1.62 KB
Versions: 6
Compression:
Stored size: 1.62 KB
Contents
# Prevent unformatted schema tags (`SchemaJsonFormat`) _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. ## Examples The following examples contain code snippets that either fail or pass this check. ### ✗ Fail ```liquid {% schema %} { "locales": { "en": { "title": "Welcome", "product": "Product" }, "fr": { "title": "Bienvenue", "produit": "Produit" } } } {% endschema %} ``` ### ✓ Pass ```liquid {% schema %} { "locales": { "en": { "title": "Welcome", "missing": "Product" }, "fr": { "title": "Bienvenue", "missing": "TODO" } } } {% endschema %} ``` ## Options The following example contains the default configuration for this check: ```yaml SchemaJsonFormat: enabled: true severity: style start_level: 0 indent: ' ' ``` | Parameter | Description | | --- | --- | | enabled | Whether the check is enabled. | | severity | The [severity](https://shopify.developers/themes/tools/theme-check/configuration#check-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. | ## Disabling this check 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. ## Resources - [Rule source][codesource] - [Documentation source][docsource] [codesource]: /lib/theme_check/checks/schema_json_format.rb [docsource]: /docs/checks/schema_json_format.md
Version data entries
6 entries across 6 versions & 1 rubygems