Shopify / Shopify/theme-tools

Theme check needs to verify settings values

Open
#749 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

area:theme-check enhancement
Dominant language
TypeScript
Stars
234
Forks
92
Avg merge
1d 3h
Merged PRs (30d)
6

Description

Is your feature request related to a problem? Please describe.
Theme check for preset/default setting values and preset/default block setting values do not verify if the setting type is matched

Describe the solution you'd like
When we declare settings in the schema and provide a default value in the setting that doesn't match it's type it will throw an error (as expected). But when you try to do the same with settings within presets.[].settings, default.settings, presets.[].blocks.[].settings, or default.blocks.[].settings, it ignores the type.

Image

Describe alternatives you've considered

  • This might get more complicated if liquid variables are embedded or complex types are used (e.g. color), but seems like it's something that will make typing settings easier

Checklist

  • I have checked and made sure that the proposal adheres to this plugin's principles

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the theme-check validation entry point for schema settings and the preset/default settings paths named in the issue. Trace how preset settings, default settings, and nested block settings are checked, then verify that mismatched values are rejected in each context, including any relevant tests you find nearby.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
tooling
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.