Glavin001/tslint-clean-code

New rule: avoid-if-else

Open

#39 aperta il 28 gen 2018

Vedi su GitHub
 (3 commenti) (1 reazione) (0 assegnatari)TypeScript (15 fork)github user discovery
good first issuerule

Metriche repository

Star
 (175 star)
Metriche merge PR
 (Nessuna PR mergiata in 30 g)

Descrizione

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.

Guida contributor