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-var] false positive with nested namespace and named function expression #1917

Closed
unional opened this issue Apr 18, 2020 · 1 comment
Labels
bug Something isn't working package: eslint-plugin Issues related to @typescript-eslint/eslint-plugin

Comments

@unional
Copy link

unional commented Apr 18, 2020

Repro

export namespace foo.config {
  export type Options = {}
}
export function foo() { }
foo.config = function config(options: foo.config.Options) { return options }

Expected Result
no error

Actual Result
image

Additional Info
The following works fine

export namespace foo.config {
  export type Options = {}
}
export function foo() { }
// anonymous function expression
foo.config = function (options: foo.config.Options) { return options }
export namespace foo.config {
  export type Options = {}
}
export function foo() { }
// function declaration
function config(options: foo.config.Options) { return options }
foo.config = config

Versions

package version
@typescript-eslint/eslint-plugin 2.28.0
@typescript-eslint/parser 2.28.0
TypeScript 3.8.3
ESLint 6.8.0
node 12.14.1
npm 6.13.4
@unional unional added package: eslint-plugin Issues related to @typescript-eslint/eslint-plugin triage Waiting for maintainers to take a look labels Apr 18, 2020
@bradzacher bradzacher added bug Something isn't working and removed triage Waiting for maintainers to take a look labels Apr 18, 2020
@bradzacher
Copy link
Member

See #1856

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 19, 2020
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