Open nwalters512 opened 3 years ago
Hi @nwalters512!
Since this repo is unmaintained, you might want to re-open this issue in the @eslint-community fork https://github.com/eslint-community/eslint-plugin-eslint-comments
For more info about why we created this organization, you can read https://eslint.org/blog/2023/03/announcing-eslint-community-org
Thanks for the awesome plugin! We're running into a bit of a tricky issue in our repo. We have some files with certain lint rules that are expected to sometimes fail and sometimes not. Specifically, we have files in the root of our repo that re-export transpiled files from
dist
:Depending on if the build process has been run or not,
./dist/transpiled-file
may or may not exist, and we don't want the non-existence of it at that particular moment to be an error in theimport/no-unresolved
rule. Before adopting this plugin, we had the following to ensureimport/no-unresolved
wouldn't error:However, with this plugin, that
eslint-disable-next-line
directive is itself reported as failing if the build process was run already (and thus./dist/transpiled-file
exists). I tried to disabled theeslint-comments/no-unused-disable
rule itself as follows:However, disabling that rule doesn't disable it for either the line itself, or for the following line that it should actually apply to:
The first error is incorrect, because the rule is reported on the next line, and the second error is also incorrect, because the first line should be disabling that rule for the file.
I understand this is a bit of a weird case, but for this specific file I want to be able to opt out of both rules entirely in this file because I know what I'm doing, and I don't even have the ability to do that at the moment.