【发布时间】:2019-04-18 18:44:45
【问题描述】:
我发现原生 TypeScript Linter 不提供 max-statements 规则检查,而不是 ESLint 版本 - https://eslint.org/docs/rules/max-statements。
也许有人知道任何 polyfill 或其他东西来检查 TS 中的 max 语句?
感谢您的建议。
【问题讨论】:
标签: javascript typescript eslint tslint
我发现原生 TypeScript Linter 不提供 max-statements 规则检查,而不是 ESLint 版本 - https://eslint.org/docs/rules/max-statements。
也许有人知道任何 polyfill 或其他东西来检查 TS 中的 max 语句?
感谢您的建议。
【问题讨论】:
标签: javascript typescript eslint tslint
您可以使用cyclomatic-complexity TSLint rule,它还可以计算函数中的语句数。
【讨论】: