theme-tools icon indicating copy to clipboard operation
theme-tools copied to clipboard

Add ability to disable theme check for next line

Open graygilmore opened this issue 10 months ago • 2 comments

What are you adding in this PR?

  • Closes https://github.com/Shopify/theme-tools/issues/788

Adds the ability to disable a theme check rule only on the next line with theme-check-disable-next-line:

{% # theme-check-disable-next-line UnknownFilter %}
{{ product | foo }}

Just like theme-check-disable you can pass no specific rule to disable all rules:

{% # theme-check-disable-next-line %}
{% assign x = product | foo %}

Before you deploy

  • [x] I included a minor bump changeset
  • [ ] (will do this once we have approval of this approach) I've made a PR to update the shopify.dev theme check docs if applicable (link PR here).
  • [x] My feature is backward compatible

graygilmore avatar Feb 15 '25 22:02 graygilmore

Force Push Patch Notes

  • Rebased with main

graygilmore avatar Feb 24 '25 18:02 graygilmore

Needed this today @graygilmore!

mxstbr avatar Mar 21 '25 17:03 mxstbr

Talked to Gray and made a PR based on CP's comments

https://github.com/Shopify/theme-tools/pull/927

aswamy avatar May 02 '25 21:05 aswamy