Open devkral opened 6 months ago
in script tags it's different
you can try
for next line:
// prettier-ignore
for block:
/* prettier-ignore-start */
some js.....
/* prettier-ignore-end */
also ignore the whole tags
{# prettier-ignore-start #}
<script>
var a=1;
</script>
{# prettier-ignore-end #}
ignoring the whole tags didn't work for me, the code still is affected by #9
Currently because of #9 I have to escape a part of my js code. For this I use the extended ignore syntax in a js script block.
But for the line with {# prettier-ignore-end #} an invalid token warning is generated.
Trying to escape doesn't work either: e.g.
// {# prettier-ignore-end #}
is completely ignoredcauses still an warning
So there is currently no workaround except using a separate script block, or refactoring out the js part in a seperate file