BenoitZugmeyer / eslint-plugin-html

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

The --report-unused-disable-directives option in eslint doesn't work with this plugin #111

Closed edg2s closed 5 years ago

edg2s commented 5 years ago

Description

If eslint is run with the --report-unused-disable-directives option, it incorrectly reports all inline directives inside HTML script tags

Setup configuration

Aditional context

e.g.

<script>
  // eslint-disable-next-line no-eval
  eval( foo );
</script>

The no-eval directive is clearly required, but eslint --report-unused-disable-directives reports "Unused eslint-disable directive (no problems were reported from 'no-eval')".

The same code in a JS file report no such errors.

BenoitZugmeyer commented 5 years ago

Thank you for the report! Fixed in 5.0.2