5

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?

gleb.kudr
  • 1,518
  • 12
  • 16

1 Answers1

6

I have found this option in TSLinter: https://palantir.github.io/tslint/rules/no-conditional-assignment/

gleb.kudr
  • 1,518
  • 12
  • 16