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

Introduce global suggestions for supporting `{% # theme-check-disable <type> %}`

Open karreiro opened this issue 2 years ago • 4 comments

Is your feature request related to a problem? Please describe.

Currently, our language server doesn't offer suggestions to ignore theme-check offenses. I believe it would be a great to have a single implementation to ignore across all checks (something like: {% # theme-check-disable <check_name> %}).

I don't foresee this feature promoting excessive use of the ignore function. Given that comments in the code already create a certain level of noise, so this feature seems to be more beneficial than not providing those suggestions.

karreiro avatar Sep 27 '23 17:09 karreiro

I believe we already do support theme-check-disable 🤔 ?

charlespwd avatar Sep 27 '23 17:09 charlespwd

https://github.com/Shopify/theme-tools/blob/main/packages/theme-check-common/src/disabled-checks/index.ts#L15

charlespwd avatar Sep 27 '23 17:09 charlespwd

We do support theme-check-disable, but I'm proposing we add the theme-check-disable suggestion for all offenses. Wdyt?

karreiro avatar Oct 06 '23 15:10 karreiro

Ahhhhh my bad I totally misunderstood the nuance. à la ESLint, I love this. Great suggestion! :D

charlespwd avatar Oct 06 '23 16:10 charlespwd