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] (v4-alpha.1) False positive when in an interface #2331

Closed
eamodio opened this issue Jul 28, 2020 · 0 comments · Fixed by #2336
Closed

[no-unused-vars] (v4-alpha.1) False positive when in an interface #2331

eamodio opened this issue Jul 28, 2020 · 0 comments · Fixed by #2336
Assignees
Labels
bug Something isn't working has pr there is a PR raised to close this package: eslint-plugin Issues related to @typescript-eslint/eslint-plugin
Milestone

Comments

@eamodio
Copy link

eamodio commented Jul 28, 2020

Repro

{
  "rules": {
    "@typescript-eslint/no-unused-vars": [
		"warn",
		{
			"args": "after-used",
			"argsIgnorePattern": "^_",
			"ignoreRestSiblings": true,
			"varsIgnorePattern": "^_$"
		}
	]
  }
}
export interface Event<T> {
	(listener: (e: T) => any, thisArgs?: any, disposables?: Disposable[]): Disposable;
}

Expected Result

No errors

Actual Result

  11:3   warning  'listener' is defined but never used. Allowed unused args must match /^_/u     @typescript-eslint/no-unused-vars
  11:28  warning  'thisArgs' is defined but never used. Allowed unused args must match /^_/u     @typescript-eslint/no-unused-vars
  11:44  warning  'disposables' is defined but never used. Allowed unused args must match /^_/u  @typescript-eslint/no-unused-vars

Additional Info

Versions

package version
@typescript-eslint/eslint-plugin 4.0.0-alpha.1
@typescript-eslint/parser 4.0.0-alpha.1
TypeScript 3.9.7
ESLint 7.5.0
node 12.16.2
npm 6.14.4
@eamodio eamodio added package: eslint-plugin Issues related to @typescript-eslint/eslint-plugin triage Waiting for maintainers to take a look labels Jul 28, 2020
@bradzacher bradzacher self-assigned this Jul 28, 2020
@bradzacher bradzacher added bug Something isn't working and removed triage Waiting for maintainers to take a look labels Jul 28, 2020
@bradzacher bradzacher added this to the 4.0.0 milestone Jul 28, 2020
@bradzacher bradzacher added the has pr there is a PR raised to close this label Jul 28, 2020
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 28, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working has pr there is a PR raised to close this package: eslint-plugin Issues related to @typescript-eslint/eslint-plugin
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants