Glavin001/tslint-clean-code

New rule: avoid-if-else

Open

#39 opened on Jan 28, 2018

View on GitHub
 (3 comments) (1 reaction) (0 assignees)TypeScript (15 forks)github user discovery
good first issuerule

Repository metrics

Stars
 (175 stars)
PR merge metrics
 (No merged PRs in 30d)

Description

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.

Contributor guide