Reputation: 1508
Recently I caught a nasty bug caused by assignment in If statement. I consider if-assignment as a bad pattern for me and I want to turn it off completely to get the compiler varnings instead of actual bugs.
How can I do this in Typescript?
Upvotes: 5
Views: 440
Reputation: 1508
I have found this option in TSLinter: https://palantir.github.io/tslint/rules/no-conditional-assignment/
Upvotes: 6