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
Allow "reportUnusedDisableDirectives" option to "error" #12703
Comments
I understand why this would be useful. The current design is intentional, however. If we allowed for errors to be reported with |
Right, thanks for the context. I wonder if we can make this a consumer choice (we would obviously have to be very explicit about this in the docs); in our case, it would be perfectly fine to fix all unused directives whenever we upgrade eslint or a plugin, especially if the unused directives would be fixable (see #11815). |
Hi @obweger. Just as a note, if you haven't configured any rules to warn, you could use |
There is precedence for a feature that comes with an explicit “use at your own risk because this feature can’t follow semver and may break your build” warning label in the |
@platinumazure 👍thanks for that! I think we can work around it with the |
I would also like the option to have
|
Unfortunately, it looks like there wasn't enough interest from the team Thanks for contributing to ESLint and we appreciate your understanding. |
The version of ESLint you are using.
6.8.0
The problem you want to solve.
I'd like to prevent (i.e., error on) unused directives via my configuration (rather than the CLI).
Your take on the correct solution to problem.
I can error on unused directives via
--report-unused-disable-directives
. However, for errors to be shown in the IDE, it would be easier to allow thereportUnusedDisableDirectives
configuration option to be set toerror
. Currently, it can only be set totrue
, which translates towarn
.Are you willing to submit a pull request to implement this change?
Yes.
The text was updated successfully, but these errors were encountered: