den232
1
Theme check reports
style: SchemaJsonFormat: JSON formatting could be improved.
{% schema %}
^^^^^^^
But here is my schema … What could be wrong?
{% schema %}
{
“name”: “Strand length to string”,
“target”: “section”,
“settings”: [
{
“type”: “product”,
“id”: “product”,
“label”: “Product”,
“autofill”: true
}
]
}
{% endschema %}
I can’t really tell what your indents are but the common issues are:
- It’s expecting 2 spaces for indents.
- it expects objects in arrays in settings to be on their own line
[
some array object,
another array object
]
If you are on vs code. just do “Quick Fix” from the hint that comes up when you hover over “schema”.
Had the same issue with the DAWN theme. It was one of so many offenses with a default theme I just cloned.
The error with “SchemaJsonFormat” is auto-correctable and can be resolved with
shopify theme check -a
Note: the -a option is a “short version” of –auto-correct.
References: