Shopify / Shopify/theme-tools

Metafield theme-check

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

Nobody has claimed this yet.

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.

Follows up https://github.com/Shopify/theme-tools/issues/502
We need to verify if metafields being used in the code are valid. If the metafield does not exist, you should see a warning when running shopify theme check

Describe the solution you'd like

For themes:

  • running shopify theme check should verify if the metafield exists on your shop
  • If you don't have the metafield, you should get a warning message

For theme app extensions:

Tasks

  • Update theme-check in theme-tools to error out when metafield definitions dont exist
  • Add lint ignore rules in Dawn + Horizon where we use metafields that don't exist in any shops by default
  • Update CLI so there is a warning when running theme check and metafield isnt defined

NOTE: There are a few differences when you pull metafield definitions from CLI or from Theme Access App via CLI

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 reviewing the linked theme-tools issue #502 and the existing theme-check and CLI paths. Compare the requested metafield validation for themes with the app-specific definitions for theme app extensions, including the noted CLI and Theme Access differences. Done means theme-check and the CLI warn for missing definitions, with required lint ignores in Dawn and Horizon.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
cli, tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.