-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
[no-unused-vars] Don’t mark declare class
expressions as unused
#106
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
Comments
we have a lot of issues with declarations, i solved some of them in #88 |
declare
expressions as unuseddeclare class
expressions as unused
Trying to fix this. The code in #88 is marking |
i think we should move this to parser as @mysticatea proposed in some old PR in eslint/typescript-eslint-parser#558 with that we could control it better, we can store information that we in "augmentation" like we do with types and override otherwise we should stop overriding eslint rule and write a little more complex logic by ourself (they have something similar for exports) we have also false positives from #54 |
i just realized that #88 is leading to some false positives var baz = 2
declare namespace Foo {
var foo: bar.baz
}
|
Not sure how moving the check to the parser would help as the rule is still ignoring |
i was thinking a little to far ahead, and didn't explain it (i tend to do so)
|
Repro
Expected Result
No error
Actual Result
Versions
@typescript-eslint/eslint-plugin
1.0.0
@typescript-eslint/parser
1.0.0
ESLint
5.8.0
node
8.12.0
npm
The text was updated successfully, but these errors were encountered: