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

Not working in html (vue), when </script> tag has another tag in line #216

Open vbgm opened 6 years ago

vbgm commented 6 years ago

When writing in *.vue format (https://vuejs.org/v2/guide/single-file-components.html), to have a cleaner view, I unite end of previous tag with the <script> tag in one line, for example:

<template>

  ..some HTML

</template><script>

  ..some JS (linting does not work)

</script><style>

  ..some CSS

</style>

The linter-js-standard does not work when there is another tag on the same line as the closing </script> tag. It works only if the <style> tag starts with the new line, so that </script> has no tags after it in line). Would be good if fixed.

sonicdoe commented 6 years ago

Thank you, I was able to reproduce this.

Long-term, I’m thinking of integrating eslint-plugin-html. I’ve actually already started working on it, however, it turned out to be more difficult than I initially thought.

Either way, I’m also open to a pull request if anyone has a quick fix for the html-splitter.js.