Shopify / theme-tools

Everything developer experience for Shopify themes
https://shopify.dev/docs/themes
MIT License
48 stars 14 forks source link

Config files `$schema` validation errors #367

Open tmmgrafikr opened 1 month ago

tmmgrafikr commented 1 month ago

Describe the bug When editing typical config files like .json or .rc files, it throws errors when theres exists $schema property in the file.

Source

Message: Request textDocument/completion failed with message: Cannot read properties of undefined (reading '$schema')
Code: -32603

Expected behaviour $schema property should be ignored, and only check on schema name

Actual behaviour Throws unnecessary error

Debugging information

mgmanzella commented 1 month ago

thanks for reporting this issue, to clarify where are you seeing this error and what's happens after receiving it? that looks like an issue with language server and completions erroring out.

sharing exact example files and where they are in your theme directory would be helpful as well for debugging. thanks in advance 🙏

tmmgrafikr commented 4 weeks ago

@mgmanzella Were just editing a package.json file, nothing crucial of any format, just noticed the error, because there wre defined a $schema property, for JSON Schema helpers.

mgmanzella commented 4 weeks ago

got it, thanks for the context!