clutchski/coffeelint

catch "if" statement with single "="

Open

#355 建立於 2014年11月27日

在 GitHub 查看
 (3 留言) (1 反應) (0 負責人)CoffeeScript (1,203 star) (169 fork)batch import
Help Wantednew rule

描述

How about catching the mistake that I make most often? An "if" statement that uses a single "=" instead of double "==" compiles just fine, but causes confusing behaviour at runtime. I wish my editor would warn me when I do this. Example:

if a = b
    do_something()

貢獻者指南