`eslint --report-unused-disable-directives` does not work with this plugin
- Dominant language
- JavaScript
- Stars
- 581
- Forks
- 92
- Avg merge
- 1d 4h
- Merged PRs (30d)
- 11
Description
`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`:
```yml
plugins: [markdown]
rules:
no-inline-comments: 2
```
`README.md`:
````md
```js
var aa = true
```
````
`index.js`:
```js
/* eslint-disable no-inline-comments */
var aa = true
```
`package.json`:
```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:
```bash
$ 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).
Contributor guide
Assessment
This issue has not been assessed yet.