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

[no-unused-vars] false positive for Type Import #2946

Closed
3 tasks done
mvnrhd opened this issue Jan 19, 2021 · 1 comment
Closed
3 tasks done

[no-unused-vars] false positive for Type Import #2946

mvnrhd opened this issue Jan 19, 2021 · 1 comment
Labels
bug Something isn't working package: eslint-plugin Issues related to @typescript-eslint/eslint-plugin

Comments

@mvnrhd
Copy link

mvnrhd commented Jan 19, 2021

  • I have tried restarting my IDE and the issue persists.
  • I have updated to the latest version of the packages.
  • I have read the FAQ and my problem is not listed.

Repro

{
  "rules": {
   "@typescript-eslint/no-unused-vars": [
            "error",
            {
                "argsIgnorePattern": "^_"
            }
        ]
  }
}
import { ElementRef } from '@angular/core';
...
@ViewChild('someInput', { static: false })
private readonly _someInput?: ElementRef<HTMLInputElement>;

Expected Result
No error

Actual Result
error 'ElementRef' is defined but never used @typescript-eslint/no-unused-vars

Additional Info

Occurs after latest update to 4.14.0 (probably related to #2751?)

Versions

package version
@typescript-eslint/eslint-plugin 4.14.0
@typescript-eslint/parser 4.14.0
TypeScript 3.9.7
ESLint 7.18.0
node 14.15.4
@mvnrhd mvnrhd added package: eslint-plugin Issues related to @typescript-eslint/eslint-plugin triage Waiting for maintainers to take a look labels Jan 19, 2021
@bradzacher
Copy link
Member

Same as #2941 and #2942, and fixed in

#2943

@bradzacher bradzacher added bug Something isn't working and removed triage Waiting for maintainers to take a look labels Jan 19, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 19, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working package: eslint-plugin Issues related to @typescript-eslint/eslint-plugin
Projects
None yet
Development

No branches or pull requests

2 participants