linter-js-standard icon indicating copy to clipboard operation
linter-js-standard copied to clipboard

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

Open vbgm opened this issue 7 years ago • 1 comments

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.

vbgm avatar Jan 04 '18 09:01 vbgm

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.

sonicdoe avatar Jan 07 '18 15:01 sonicdoe