-
-
Notifications
You must be signed in to change notification settings - Fork 75
Imported interfaces are considered not used by no-unused-vars rule #223
Comments
This is a known issue and has been covered in here: The reason it fails is because the scope analysis tool does not traverse type annotations or decorators and will not mark these as references. I have put a proposal for a possible fix but more though needs to go into a long term solution. The work around is to use the typescript compiler options:
or use the typescript plugin rule
I should update the README with a list of known issues as this is a frequently observed problem. |
Excellent response. Thank you very much. I'll probably look into the ts plugin rule. |
@mattdell The version on npm is really outdated. You need to install from the master branch.
|
Ah. That makes sense. Unfortunately my work blocks us from having github dependencies as only npmjs.org goes through the proxy. Alas, that is my problem not yours. Thanks for the suggestion. 😄 |
@soda0289 Do we need to publish a new release of eslint-plugin-typescript? Or does it need to be changed to align with changes made here and in eslint-scope and other areas before a release can occur? |
@platinumazure The eslint typescript plugin has only had one release and many rules have been added or updated since. There is nothing in the parser or eslint-scope that is blocking a release. I noticed on the npmjs page that eslint tsc members are 'Collaborators'. Does this mean they can publish a new release? |
@soda0289 Yes, the ESLint TSC should be able to do a release of that project, hopefully. Feel free to ask in the team Gitter chat. |
What version of TypeScript are you using?
2.2.2
What version of
typescript-eslint-parser
are you using?2.1.0
What code were you trying to parse?
What did you expect to happen?
All to be right with the world
What happened?
[eslint] 'ISearchResultProps' is defined but never used. (no-unused-vars)
The text was updated successfully, but these errors were encountered: