-
-
Notifications
You must be signed in to change notification settings - Fork 44
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
Cannot disable eslint-comments/no-unused-disable with comment #50
Comments
ota-meshi
pushed a commit
to ota-meshi/eslint-plugin-eslint-comments
that referenced
this issue
Sep 19, 2023
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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
The text was updated successfully, but these errors were encountered: