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

New rule no-uneccessary-globals #20

Closed
hornta opened this issue Feb 7, 2019 · 1 comment
Closed

New rule no-uneccessary-globals #20

hornta opened this issue Feb 7, 2019 · 1 comment

Comments

@hornta
Copy link

hornta commented Feb 7, 2019

We do have a lot of /* globals window / or / globals require */ in ourcode despite those being recognized as globals from eslints env and globals config. I suggest having a rule that reports on already existing globals in comments.

@mysticatea
Copy link
Owner

mysticatea commented Feb 9, 2019

Thank you for this proposal!

However, we cannot implement this without some change of ESLint core. And I think that no-redeclare rule should do this because:

  • this is a kind of redeclaration.
  • no-unused-vars rule reports unused variables that /*globals*/ comments defined.

I opened an issue: eslint/eslint#11370

Please track that issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants