Glavin001/tslint-clean-code

New rule: avoid-if-else

Open

#39 geöffnet am 28. Jan. 2018

Auf GitHub ansehen
 (3 Kommentare) (1 Reaktion) (0 zugewiesene Personen)TypeScript (15 Forks)github user discovery
good first issuerule

Repository-Metriken

Stars
 (175 Stars)
PR-Merge-Metriken
 (Keine gemergten PRs in 30 T)

Beschreibung

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