clutchski/coffeelint

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

Open

#381 创建于 2015年2月18日

在 GitHub 查看
 (2 评论) (0 反应) (0 负责人)CoffeeScript (1,203 star) (169 fork)batch import
Help Wantednew rule

描述

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

贡献者指南

add rule that if(!foo) should be replaced with unless · clutchski/coffeelint#381 | Good First Issue