-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
[no-unused-vars] false positives for code inside declare
blocks
#2844
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
Already fixed (I think?), pending release: #2833 |
@vidaritos I saw that PR but don’t think it has anything to do with |
I've met this issue in my proj: /src/store/types.ts /src/hooks/use-root-selector.ts |
Thanks for that @whitetrefoil I've figured it out. Why? Because typescript-eslint/packages/eslint-plugin/src/util/collectUnusedVariables.ts Lines 39 to 43 in aadb39f
However - typescript-eslint/packages/eslint-plugin/src/rules/no-unused-vars.ts Lines 250 to 288 in a8227a6
So if This is an easy fix. |
…g-convention and no-unused-vars Fixes #2844
Hooray, thank you for figuring this out and fixing it so fast! 🙌 |
Repro
Expected Result
No warnings should be emitted.
Actual Result
Invalid warnings are emitted inside
declare
blocks, unlike in v4.8.Versions
@typescript-eslint/eslint-plugin
4.9.0
@typescript-eslint/parser
4.9.0
TypeScript
4.1.2
ESLint
7.14.0
node
14.15.0
The text was updated successfully, but these errors were encountered: