ricardofbarros / linter-js-standard

Atom linter plugin for JavaScript, using JavaScript Standard Style
https://atom.io/packages/linter-js-standard
MIT License
99 stars 50 forks source link

ignore:line option has no effect on scripts with type of text/template #188

Closed binarykitchen closed 7 years ago

binarykitchen commented 7 years ago

this is probably a rare case. developing a wordpress plugin here using a html file as a template to inject an inline script which works fine. the only problem is that js-standard in my atom editor is complaining with this warning

"Expected an assignment or function call and instead saw an expression. (no-unused-expressions)"

understand, it's because of the {{{ part which makes sense. but the problem is that the // jshint ignore:line part at end of this line does not seem to have any effect.

<script id='tmpl-nf-field-videomail' type='text/template'>
  <div id='nf-field-{{{ data.id }}}' name='nf-field-{{{ data.id }}}' class='{{{ data.classes }}} nf-element videomail'> // jshint ignore:line
   ...
</script>

maybe this exotic use case isn't covered in standardjs yet?

sonicdoe commented 7 years ago

Since this ultimately revolves around us mistakenly linting non-JavaScript inline scripts, I’ll close this in favor of #182.