This PR is meant to ensure that checks do not blow up existent themes. To do so, we are adding preliminary checks to make sure that we are only using theme blocks, and if so, proceed with the checks.
What's next? Any followup issues?
There are a couple directions in which we can follow up with this issue.
1) Right now, we are only checking preset blocks at the first level (not nested levels). The reason being is that nested preset checks will require cross file validation which would we should follow up on.
2) Once content with these changes, worthwhile to change the check recommendations to true.
What did you learn?
I learned about the difference between how older and newer (with theme block) themes are written, as well as more information about nested preset blocks and how their validation needs to occur.
Before you deploy
[x] This PR includes a new checks or changes the configuration of a check
[x] I included a minor bump changeset
[x] It's in the allChecks array in src/checks/index.ts
[x] I ran yarn build and committed the updated configuration files
[ ] If applicable, I've updated the theme-app-extension.yml config
What are you adding in this PR?
Resolves https://github.com/Shopify/theme-tools/issues/605 and https://github.com/Shopify/theme-tools/issues/608
This PR is meant to ensure that checks do not blow up existent themes. To do so, we are adding preliminary checks to make sure that we are only using theme blocks, and if so, proceed with the checks.
What's next? Any followup issues?
There are a couple directions in which we can follow up with this issue. 1) Right now, we are only checking preset blocks at the first level (not nested levels). The reason being is that nested preset checks will require cross file validation which would we should follow up on. 2) Once content with these changes, worthwhile to change the check recommendations to true.
What did you learn?
I learned about the difference between how older and newer (with theme block) themes are written, as well as more information about nested preset blocks and how their validation needs to occur.
Before you deploy
changeset
allChecks
array insrc/checks/index.ts
yarn build
and committed the updated configuration filestheme-app-extension.yml
configchangeset
changeset