简体   繁体   中英

Is there a TSLint Rule to check for single equals?

In my code I got a bunch of bugs lately due to typing things like if(a = b) .

This may sound silly, but I really do need a rule to get rid of this. especially when I type array.find(val => val.id = 0) .

I know that there is a rule to enforce boolean expressions in simple statements like if and for and so on... But is there also a rule which enforces the same in like funtions?

您可以在tslint.json文件中添加"triple-equals": true以强制执行tslint.json

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM