Shopify / theme-check

The Ultimate Shopify Theme Linter
Other
333 stars 96 forks source link

line_items_for filter missing #744

Closed bakura10 closed 9 months ago

bakura10 commented 9 months ago

Hi,

The line_items_for filter is currently raising an error in the linter: https://shopify.dev/docs/api/liquid/filters/line_items_for Is it possible to add it ? :)

Thanks.

bakura10 commented 9 months ago

Any news on this? Unfortunately it seems that each time new filters are released, it takes months for them to be integrated into the platform.

charlespwd commented 9 months ago

So we switched to an automatic workflow for this. It seems like the data is there: https://github.com/Shopify/theme-liquid-docs/blob/main/data/filters.json#L74

And IIRC, there's a job somewhere that pulls the latest docs on check run. In which context do you see the issue? CLI, extension? What version?

charlespwd commented 9 months ago

Ah derp the flag is off by default: https://github.com/Shopify/theme-check/blob/e7bbb91eb35feafc392712cdc7e00d42ef8d558c/lib/theme_check/cli.rb#L210

Try running the CLI with the --update-docs flag. That should fix it for you!

charlespwd commented 9 months ago

FYI we're in the process of migrating to the TypeScript based implemetation in Shopify/theme-tools. It's fixed over there.

We're already in dev preview in the VS Code extension (shopifyLiquid.themeCheckNextDevPreview: true) and we're coming to the CLI very soon.

bakura10 commented 9 months ago

I was using the CLI, and adding --update-docs flag fixed it! Thanks a lot :)