BenoitZugmeyer / eslint-plugin-html

An ESLint plugin to extract and lint scripts from HTML files.
ISC License
430 stars 51 forks source link

Support fixing eol-last rule #45

Closed BenoitZugmeyer closed 7 years ago

BenoitZugmeyer commented 7 years ago

Follow up: https://github.com/BenoitZugmeyer/eslint-plugin-html/issues/23#issuecomment-272711002

The next version of this plugin supports eslint --fix, but it looks like eol-last is causing an issue because the extracted JS does not have a newline at the end, and eol-last is trying to fix it by adding a new line, which will be ignored during the next pass of fixes (because it will not be present in the extracted JS).

Let's keep the end-of-file newlines in the extracted JS so the rule can work as expected.

BenoitZugmeyer commented 7 years ago

This last commit should fix your issue @DanHodges