Glavin001/tslint-clean-code

max-conditional-depth

Open

#19 创建于 2017年9月13日

在 GitHub 查看
 (1 评论) (0 反应) (1 负责人)TypeScript (15 fork)github user discovery
good first issuerule

仓库指标

Star
 (175 star)
PR 合并指标
 (30 天内没有已合并 PR)

描述

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!

贡献者指南