Glavin001/tslint-clean-code

max-conditional-depth

Open

#19 ouverte le 13 sept. 2017

Voir sur GitHub
 (1 commentaire) (0 réactions) (1 assigné)TypeScript (15 forks)github user discovery
good first issuerule

Métriques du dépôt

Stars
 (175 stars)
Métriques de merge PR
 (Aucune PR mergée en 30 j)

Description

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!

Guide contributeur