Glavin001/tslint-clean-code

max-conditional-depth

Open

#19 geöffnet am 13. Sept. 2017

Auf GitHub ansehen
 (1 Kommentar) (0 Reaktionen) (1 zugewiesene Person)TypeScript (15 Forks)github user discovery
good first issuerule

Repository-Metriken

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

Beschreibung

For example:

variable = condition1 ? ifTrueDoThis : (condition2 ? ifTrueDoThis : (condition3 ? ifTrueDoThis : ifFalseDoThis));

and

variable = condition1 && condition2 ? ifTrueDoThis : (condition3 || condition4 ? ifTrueDoThis : (condition5 && condition6 ? ifTrueDoThis : ifFalseDoThis));

These are too long and too deep. Let's limit the depth!

Contributor Guide