Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ignore non-javascript script-tags in html #182

Open
TomTasche opened this issue Apr 22, 2017 · 1 comment
Open

ignore non-javascript script-tags in html #182

TomTasche opened this issue Apr 22, 2017 · 1 comment

Comments

@TomTasche
Copy link

i'm commonly (ab)using script-tags to store html, but linter spits out warnings for every line of html inside the script-tag because it tries to validate it as javascript. this is of course intended behavior, but i'd like to restrict linting to lint only javascript. since most script-tags indeed contain javascript, i'd use blacklist of know types to ignore (i think the same technique is used for other templating frameworks like handlebars?)

  <script type="text/html" id="item-template">
    <li class="item-text"></li>
  </script>

i quickly looked at the code and it seems the best way to do this is pass a settings-object to the html-splitter. any thoughts on this from the maintainers before i start implementing it?

@sonicdoe
Copy link
Collaborator

This makes sense, however, I’d prefer simply using the source.js.embedded.html scope instead. See AtomLinter/linter-jshint#132 for how linter-jshint implemented it. PR welcome!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants