clutchski/coffeelint

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

Open

#381 建立於 2015年2月18日

在 GitHub 查看
 (2 留言) (0 反應) (0 負責人)CoffeeScript (169 fork)batch import
Help Wantednew rule

倉庫指標

Star
 (1,203 star)
PR 合併指標
 (30 天內沒有已合併 PR)

描述

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

貢獻者指南