Sublime-JSHint icon indicating copy to clipboard operation
Sublime-JSHint copied to clipboard

JSHint freezing Sublime when saving HTML files containing inline Script templates

Open markedup opened this issue 11 years ago • 3 comments

If I edit an HTML file that includes inline Script templates (e.g. Mustache or Handlebars), Sublime Text 2 is freezing/locking on save.

The only way to get out of this is to force-quit Sublime and reopen it; the JSHint process still runs in the background, however, and at a high CPU usage.

I've tried adding an ignore option to .jshintrc as suggested in #59, but this doesn't seem to be supported by JSHint.

For now, I've found that adding /* jshint ignore:start */ and /* jshint ignore:end */ comments immediately inside any inline <script type="text/template"> blocks stops Sublime locking up:

<script type="text/template" id="search-result-template">
    /* jshint ignore:start */
    <li class="search-result">
        <a href="<@= url @>"><@= text @></a>
    </li>
    /* jshint ignore:end */
</script>

markedup avatar Dec 22 '14 17:12 markedup

try the PR here https://github.com/victorporof/Sublime-JSHint/issues/101

stormslowly avatar Jan 28 '15 02:01 stormslowly

Is there a prevision to merge it on? This issue is really annoying.

raphaklaus avatar May 27 '15 20:05 raphaklaus

I can confirm this happening for me too. It's particularly frustrating because finding this open issue requires some guesswork as to what is causing it (all you get is a frozen Sublime Text).

TheBunyip avatar Jun 16 '15 10:06 TheBunyip