ValidSettingsKey
- Identifies keys inside
presets.[].settings
anddefault.settings
that do not exist insettings.[].id
within the same file's schema - Identifies keys inside
presets.[](recursive .blocks.[]).settings
anddefault.blocks.[].settings
that do not exist insettings.[].id
within the referenced block's schema
Anchor to ExamplesExamples
The following examples contain code snippets that either fail or pass this check.
Anchor to Preset settingsPreset settings
Anchor to ✗ Fail✗ Fail
sections/section.liquid
{% schema %}
{
"settings": {
"type": "text",
"id": "custom-setting",
"label": "Custom Setting",
},
"presets": [{
"name": "Preset",
"settings": {
"fake-setting": "not valid setting"
}
}]
}
{% endschema %}
Anchor to ✓ Pass✓ Pass
sections/section.liquid
{% schema %}
{
"settings": {
"type": "text",
"id": "custom-setting",
"label": "Custom Setting",
},
"presets": [{
"name": "Preset",
"settings": {
"custom-setting": "valid setting"
}
}]
}
{% endschema %}
Anchor to Default settingsDefault settings
Anchor to ✗ Fail✗ Fail
sections/section.liquid
{% schema %}
{
"settings": {
"type": "text",
"id": "custom-setting",
"label": "Custom Setting",
},
"default": {
"settings": {
"fake-setting": "not valid setting"
}
}
}
{% endschema %}
Anchor to ✓ Pass✓ Pass
sections/section.liquid
{% schema %}
{
"settings": {
"type": "text",
"id": "custom-setting",
"label": "Custom Setting",
},
"default": {
"settings": {
"custom-setting": "valid setting"
}
}
}
{% endschema %}
Anchor to Preset block settingsPreset block settings
The sample block code below is used in the following pass/fail examples.
blocks/example-block.liquid
{% schema %}
{
"settings": {
"type": "text",
"id": "block-setting",
"label": "Block Setting",
}
}
{% endschema %}
Anchor to ✗ Fail✗ Fail
sections/section.liquid
{% schema %}
{
"blocks": [{ "type": "example-block" }],
"presets": [{
"name": "Preset",
"blocks": [{
"type": "example-block",
"settings": {
"fake-setting": "not valid setting in example-block"
}
}]
}]
}
{% endschema %}
Anchor to ✓ Pass✓ Pass
sections/section.liquid
{% schema %}
{
"blocks": [{ "type": "example-block" }],
"presets": [{
"name": "Preset",
"blocks": [{
"type": "example-block",
"settings": {
"block-setting": "valid setting in example-block"
}
}]
}]
}
{% endschema %}
Anchor to Default block settingsDefault block settings
The sample block code below is used in the following pass/fail examples.
blocks/example-block.liquid
{% schema %}
{
"settings": {
"type": "text",
"id": "block-setting",
"label": "Block Setting",
}
}
{% endschema %}
Anchor to ✗ Fail✗ Fail
sections/section.liquid
{% schema %}
{
"blocks": [{ "type": "example-block" }],
"default": {
"name": "Preset",
"blocks": [{
"type": "example-block",
"settings": {
"fake-setting": "not valid setting in example-block"
}
}]
}
}
{% endschema %}
Anchor to ✓ Pass✓ Pass
sections/section.liquid
{% schema %}
{
"blocks": [{ "type": "example-block" }],
"default": {
"name": "Preset",
"blocks": [{
"type": "example-block",
"settings": {
"block-setting": "valid setting in example-block"
}
}]
}
}
{% endschema %}
Anchor to OptionsOptions
ValidSettingsKey
enabledtrue
severity error
Parameter | Description |
---|---|
enabled | Whether this check is enabled. |
severity | The severity of the check. |
Anchor to Disabling this checkDisabling this check
Disabling this check isn't recommended.
Was this page helpful?