Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork2.8k
Closed
Description
Someone requested it back in the TSLint days atpalantir/tslint#3652 , i'm interested in it now
not following the template since it seems to be geared for issues with existing rules.
It would be nice to have a check for enums where two keys have the same value, at least for literal enums (this wouldn't work with enums that have dynamic values, but i don't use any of those, so it's fine with me). I don't have any use for that kind of enum in my codebase and it opens the potential for confusing behavior if it is present.
I haven't made a rule fresh before but I'll try giving it a go if maintainers are cool with this idea.
// badenum Foo { A = "A", B = "A"}// goodenum Foo { A = "A", B = "B"}