Glavin001/tslint-clean-code

New rule: avoid-if-else

Open

#39 创建于 2018年1月28日

在 GitHub 查看
 (3 评论) (1 反应) (0 负责人)TypeScript (15 fork)github user discovery
good first issuerule

仓库指标

Star
 (175 star)
PR 合并指标
 (30 天内没有已合并 PR)

描述

http://blog.timoxley.com/post/47041269194/avoid-else-return-early

Use of if-else is always unnecessary, and leads to cyclomatic complexity. Other clean code linters (phpmd, golint) enforce this pattern. Would love to have this rule as I have to enforce it manually in my typescript projects right now.

贡献者指南