You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jun 20, 2024. It is now read-only.
The theme check plugin is unable to handle themes not existing at a top level directory. A common example of this is in a monorepo setup (e.g when using turborepo).
I've made an example repository to demonstrate this - https://github.com/AdiRishi/shopify-theme-check-bug
When you open the repository at it's root, and navigate to let's say shopify/themes/bohemian-vibe-theme/snippets/article-card.liquid then you see a lot of errors like Undefined object media_aspect_ratio (just one example)
However, if you were to open just the bohemian-vibe-theme in vscode (aka this folder as root) then the errors don't show up.
From what I can tell, this is because the shopify theme check command is not being run at the template root, and the CLI command itself does not handle being run at a location that is not the template root.
Potential solution
I am fairly new to the shopify ecosystem, but here are some options
Only run the theme check command in folders which have a .theme-check.yml file
Allow users to configure which folders theme check is run on
Let me know if any more information is needed.
The text was updated successfully, but these errors were encountered:
Okay, update on this. You can get around this problem by adding a .theme-check.yml file to the root of the monorepo and setting the root property to the directory location of your shopify theme. E.g.
root: shopify/themes/custom-theme
However, this wouldn't work if you had multiple themes in a single monorepo. So the issue is still valid.
The problem
The theme check plugin is unable to handle themes not existing at a top level directory. A common example of this is in a monorepo setup (e.g when using turborepo).
I've made an example repository to demonstrate this - https://github.com/AdiRishi/shopify-theme-check-bug
When you open the repository at it's root, and navigate to let's say
shopify/themes/bohemian-vibe-theme/snippets/article-card.liquid
then you see a lot of errors likeUndefined object media_aspect_ratio
(just one example)However, if you were to open just the
bohemian-vibe-theme
in vscode (aka this folder as root) then the errors don't show up.From what I can tell, this is because the
shopify theme check
command is not being run at the template root, and the CLI command itself does not handle being run at a location that is not the template root.Potential solution
I am fairly new to the shopify ecosystem, but here are some options
theme check
command in folders which have a.theme-check.yml
fileLet me know if any more information is needed.
The text was updated successfully, but these errors were encountered: