Skip to content

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

@eamodio

Description

@eamodio

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

Metadata

Metadata

Assignees

Labels

bugSomething isn't workinghas prthere is a PR raised to close thispackage: eslint-pluginIssues related to @typescript-eslint/eslint-plugin

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    pFad - Phonifier reborn

    Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

    Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


    Alternative Proxies:

    Alternative Proxy

    pFad Proxy

    pFad v3 Proxy

    pFad v4 Proxy