TypeScript
TypeScript copied to clipboard
TsLint: assignment operation inside an 'if' condition should be marked with a warning
If we want to spot some more bugs at compile time, I believe that something like:
if (data.id = id) { ...
while being perfectly legal, it can be a coding bug most of the times. it would be nice if TsLint could spot this type of code and give us a warning instead of using a custom regex that scan all our files.
TSLint issues should be reported here: https://github.com/palantir/tslint/ as that isn't a Microsoft thing :) Definitely nice to have! :)
ops sorry, will open the ticket there, thanks!