Skip to content
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

reportUnusedDisableDirectives should probably be a regular rule #13104

Closed
silverwind opened this issue Mar 27, 2020 · 3 comments
Closed

reportUnusedDisableDirectives should probably be a regular rule #13104

silverwind opened this issue Mar 27, 2020 · 3 comments
Labels
archived due to age This issue has been archived; please open a new issue for any further discussion auto closed The bot closed this issue core Relates to ESLint's core APIs and features evaluating The team will evaluate this issue to decide whether it meets the criteria for inclusion feature This change adds a new feature to ESLint rule Relates to ESLint's core rules

Comments

@silverwind
Copy link
Contributor

silverwind commented Mar 27, 2020

reportUnusedDisableDirectives is currently a config option but I think it would make more sense if it would just be a regular rule which would allow:

Example where it is useful to disable per-line is a imported externally generated file that may or may not be present. import/no-unresolved will warn on it when absent but if I add a per-line disable reportUnusedDisableDirectives will trigger in situations where the file is present. My only option to resolve this is to disable reportUnusedDisableDirectives completely.

(Sorry, for omitting the issue template but none seems to really fit)

@silverwind silverwind added enhancement This change enhances an existing feature of ESLint rule Relates to ESLint's core rules triage An ESLint team member will look at this issue soon labels Mar 27, 2020
@mdjermanovic mdjermanovic added evaluating The team will evaluate this issue to decide whether it meets the criteria for inclusion feature This change adds a new feature to ESLint core Relates to ESLint's core APIs and features and removed enhancement This change enhances an existing feature of ESLint triage An ESLint team member will look at this issue soon labels Apr 13, 2020
@mdjermanovic
Copy link
Member

@silverwind thanks for the issue!

This feature needs output (reported problems) from all rules. Any ideas on how could we make reportUnusedDisableDirectives rule with the current architecture?

If it helps with your use case, reportUnusedDisableDirectives is allowed in overrides sections, so it can be set to false for a specific file.

@silverwind
Copy link
Contributor Author

Thanks for the tip, having reportUnusedDisableDirectives overrideable per-file certainly helps here.

Regarding implementation, I read that it was tried to be implemented as a rule initially but the architecture did not allow it (#9382 (comment)), so it might be impossible currently.

@eslint-deprecated eslint-deprecated bot added the auto closed The bot closed this issue label May 20, 2020
@eslint-deprecated
Copy link

Unfortunately, it looks like there wasn't enough interest from the team
or community to implement this change. While we wish we'd be able to
accommodate everyone's requests, we do need to prioritize. We've found
that issues failing to reach accepted status after 21 days tend to
never be accepted, and as such, we close those issues.
This doesn't mean the idea isn't interesting or useful, just that it's
not something the team can commit to.

Thanks for contributing to ESLint and we appreciate your understanding.

@eslint-deprecated eslint-deprecated bot locked and limited conversation to collaborators Nov 17, 2020
@eslint-deprecated eslint-deprecated bot added the archived due to age This issue has been archived; please open a new issue for any further discussion label Nov 17, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
archived due to age This issue has been archived; please open a new issue for any further discussion auto closed The bot closed this issue core Relates to ESLint's core APIs and features evaluating The team will evaluate this issue to decide whether it meets the criteria for inclusion feature This change adds a new feature to ESLint rule Relates to ESLint's core rules
Projects
None yet
Development

No branches or pull requests

2 participants