False positive no-unused-vars with string enum
micaelmbagira opened this issue · 5 comments
What version of TypeScript are you using?
^3.1.6
What version of typescript-eslint-parser are you using?
^21.0.2
What code were you trying to parse?
export enum State {
START = 'start',
END = 'end',
}
console.log(State.START)What did you expect to happen?
No errors
What happened?
I have the following error
2:3 error 'START' is assigned a value but never used no-unused-vars
3:3 error 'END' is assigned a value but never used no-unused-vars
Hi @micaelmbagira, thanks for the issue.
Looks like we have a potential PR to fix here: #558
But there's also some discussion about the best way to fix (and whether this should be handled in eslint-plugin-typescript).
@platinumazure we are already have code for this in eslint-plugin-typescript
@platinumazure I am using eslint-plugin-typescript^0.14.0
@micaelmbagira there was release of version 1.0.0-rc.0 of eslint-plugin-typescript you should consider upgrading :)
Solved by using eslint-plugin-typescript^1.0.0-rc.0