Skip to content
This repository has been archived by the owner on Jan 19, 2019. It is now read-only.

[no-unused-vars] false positive about exported type definitions #189

Closed
iwata opened this issue Nov 28, 2018 · 2 comments
Closed

[no-unused-vars] false positive about exported type definitions #189

iwata opened this issue Nov 28, 2018 · 2 comments
Labels
bug/incomplete rule requires investigation bug that require more investigation

Comments

@iwata
Copy link

iwata commented Nov 28, 2018

Repro

{
  "rules": {
    "no-unused-vars": "error",
    "typescript/no-unused-vars": "error"
  }
}
import firebase, {User} from 'firebase/app'

// initialize firebase project
firebase.initializeApp({
  ...
})
export function authenticated(cb: (user: User | null) => void): void {
  firebase.auth().onAuthStateChanged(user => cb(user))
}

Expected Result
It should lint without errors.

Actual Result

utils/authentication.ts:1:19
✖    1:19  User is defined but never used.                                                                 no-unused-vars

Versions

package version
eslint-plugin-typescript 0.12.0
typescript-eslint-parser 21.0.1
typescript 3.1.6
@bradzacher
Copy link
Owner

I haven't dug into it, but I believe it's related to #152
If it is, then it'll be fixed by the parser upgrade.

@iwata
Copy link
Author

iwata commented Nov 28, 2018

If it is, then it'll be fixed by the parser upgrade.

Okay, I'll wait for new version of parser.

@bradzacher bradzacher added the requires investigation bug that require more investigation label Nov 28, 2018
armano2 added a commit to armano2/eslint-plugin-typescript that referenced this issue Nov 28, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug/incomplete rule requires investigation bug that require more investigation
Projects
None yet
Development

No branches or pull requests

2 participants