theme-check
theme-check copied to clipboard
Add a way to disable the fixer without disabling the check
Is there a configuration setting to prevent the extension from passing the --auto-correct
flag when a file is saved?
Yes!
"[liquid]": {
"editor.defaultFormatter": "Shopify.theme-check-vscode",
"editor.formatOnSave": false
},
That doesn't appear to be the correct configuration.
Take this block for instance:
- I'd still like theme-check to warn me that
img_url
is deprecated. - I'd still like it to format on save.
- I don't want
img_url
to automatically be changed toimage_url
on save.
It's my understanding from the docs that --auto-correct
is changing img_url
to image_url
.
How do I configure the extension to:
- Prevent automatic code changes on save (except formatting).
- Retain the
error
,suggestion
, andstyle
severity indicatons.
Oh gotcha. This is different indeed. I interpret it as the following feature request:
As a dev, I want the ability to keep a check turned on but do not want to fix it automatically
It's kind of like the theme-check ignore
setting, but without turning the check off entirely.
We unfortunately do not have a solution for this yet. You can only ignore the check entirely (either by disabling it globally, or wrapping it in the disabling comment).
I'll reopen this as a feature request in the theme-check repo.