You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
module.exports=require('./dist/transpiled-file');
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 the import/no-unresolved rule. Before adopting this plugin, we had the following to ensure import/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 the eslint-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:
file.js
1:19 error 'eslint-comments/no-unused-disable' rule is disabled but never reported eslint-comments/no-unused-disable
2:29 error 'import/no-unresolved' rule is disabled but never reported eslint-comments/no-unused-disable
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:
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: