clutchski/coffeelint

catch "if" statement with single "="

Open

#355 aberto em 27 de nov. de 2014

Ver no GitHub
 (3 comments) (1 reaction) (0 assignees)CoffeeScript (169 forks)batch import
Help Wantednew rule

Métricas do repositório

Stars
 (1.203 stars)
Métricas de merge de PR
 (Nenhuma PRs mesclada em 30d)

Description

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()

Guia do colaborador