clutchski/coffeelint

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

Open

#381 opened on Feb 18, 2015

View on GitHub
 (2 comments) (0 reactions) (0 assignees)CoffeeScript (169 forks)batch import
Help Wantednew rule

Repository metrics

Stars
 (1,203 stars)
PR merge metrics
 (No merged PRs in 30d)

Description

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..

Contributor guide