-
Notifications
You must be signed in to change notification settings - Fork 63
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
eslint --report-unused-disable-directives
does not work with this plugin
#115
Comments
eslint --report-unused-disable-directives
eslint --report-unused-disable-directives
does not work with this plugin
I suspect the cause here is the same as in #75. Before linting, the processor looks for HTML comments preceding a code block and inserts them as A fix would replace the bail-out check for HTML comments and instead map error locations back to their original location above the code block. That would require tracking original location information for comments, which it doesn't do right now. A fix for either this or #75 should fix both. I'd welcome a contribution if you're interested in taking a stab at it, @ehmicky! |
Thanks for your explanation! I would gladly help but I am not familiar with writing ESLint plugins. It's on my to-do list but not yet unfortunately :( |
I can confirm this is still a problem with the new |
eslint --report-unused-disable-directives
is not reported when a<-- eslint-disable -->
is defined in Markdown but is unused (i.e. could be removed)..eslintrc.yml
:README.md
:index.js
:package.json
:In the terminal:
$ eslint --report-unused-disable-directives README.md $ eslint --report-unused-disable-directives index.js /home/ehmicky/eslint-comments-bug/index.js 1:1 error Unused eslint-disable directive (no problems were reported from 'no-inline-comments') ✖ 1 problem (1 error, 0 warnings)
--report-unused-disable-directives
works for the JavaScript file, but not for the Markdown (where nothing is reported).The text was updated successfully, but these errors were encountered: