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!

貢獻者指南