Skip to content

[no-unused-vars] False positive when declaring modules #2523

Closed
@troch

Description

@troch
  • 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.

I also tried canary versions.

Repro

{
  "rules": {
    "@typescript-eslint/no-unused-vars": "error"
  }
}
declare global {
  interface Window {
     /* ... */
  }
}

declare module 'external-module' {
  export default (arg: any) => any
}

Expected Result

I didn't expect any error.

Actual Result

  • Error 'global' is defined but never used.
  • Error 'arg' is defined but never used.

Versions

package version
@typescript-eslint/eslint-plugin 4.1.0
@typescript-eslint/parser 4.1.0
TypeScript 4.0.2
ESLint 7.8.1
node 12.18.1

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

Relationships

None yet

Development

No branches or pull requests

Issue actions