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:
plugins: [markdown]
rules:
no-inline-comments: 2
README.md:
<!-- eslint-disable no-inline-comments -->
```js
var aa = true
```
index.js:
/* eslint-disable no-inline-comments */
var aa = true
package.json:
{
"name": "eslint-comments-bug",
"version": "1.0.0",
"license": "ISC",
"dependencies": {
"eslint": "^5.16.0",
"eslint-plugin-markdown": "^1.0.0"
}
}
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).
eslint --report-unused-disable-directivesis 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:{ "name": "eslint-comments-bug", "version": "1.0.0", "license": "ISC", "dependencies": { "eslint": "^5.16.0", "eslint-plugin-markdown": "^1.0.0" } }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-directivesworks for the JavaScript file, but not for the Markdown (where nothing is reported).