Closed Standard8 closed 4 years ago
Thank you very much for all the bug reports, I fixed the simple ones, but some require more digging.
In my opinion, all ESLint rules should apply on the script code instead of the HTML. Ideally, we would need an "HTML-lint" project to apply some rules to the HTML. I can think of many solutions:
eslint-plugin-html
so it outputs JS lints merged with HTML lintseslint-plugin-html
setting like "check-eol-last" so it checks this particular issue on the whole fileI think 1. and 3. are rather straightforward, 2. needs a bit more work but it's the more appealing solution. What do you think about it? would you mind using a separate command to lint HTML related issues, or do you prefer to stick with ESLint only?
I think 1 is better, since there are already some "HTML-lint" like projects exist. ESLint is not designed for linting HTMLs.
I think either 1 or 3 would be fine. 1 seems to make a bit more sense logically, since it seems to fit more with the split between the two (I also now have to go investigate htmllint :-) )
I think the spirit of eol-last is to ensure there's always a newline at the end of the file. Certainly for Mozilla we tend to ensure it, as it makes diffs simpler.
Therefore, I'd like to request an option so that we can have eol-last apply to the whole html file, rather than individual scripts as I don't think there is much value for the script tag.