clutchski/coffeelint

add rule that if(!foo) should be replaced with unless

Open

#381 aperta il 18 feb 2015

Vedi su GitHub
 (2 commenti) (0 reazioni) (0 assegnatari)CoffeeScript (169 fork)batch import
Help Wantednew rule

Metriche repository

Star
 (1203 star)
Metriche merge PR
 (Nessuna PR mergiata in 30 g)

Descrizione

basically - if you have an if block with no else, and you have if not or if !blah, it should be replaced with unless.

if !user
    return res.badRequest ...

should become

unless user
    return res.badRequest..

Guida contributor