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

Auto-correct ParserBlockingScript check with defer

Open charlespwd opened this issue 3 years ago • 2 comments

Couple of ways we could tackle this but I don't think the automatic fix is a good way. Since this might break things. But we should have a "fixer" for it anyway. Something we could do from the editor with a code action maybe?

charlespwd avatar Mar 29 '21 13:03 charlespwd

You mean using the existing autocorrect feature? => https://github.com/Shopify/theme-check/blob/master/lib/theme_check/checks/space_inside_braces.rb#L51

And this feature could be exposed to vscode as a quick action?

macournoyer avatar Mar 29 '21 13:03 macournoyer

Yeah the thing is though that if you use -a I don't think we should apply it. Its application is not really something you can do blindly because it does affect the output in a way.

And I believe the quick actions are named code actions in the LSP :P So yes!

charlespwd avatar Mar 29 '21 13:03 charlespwd