【发布时间】:2019-09-09 23:56:16
【问题描述】:
在我的 Angular 8 项目中使用
"codelyzer": "^5.1.0",
"ts-node": "~8.3.0",
"tslint": "~5.19.0",
运行后:
ng lint myapp --fix=true
我明白了:
ERROR: ...html:428:106 - The cyclomatic complexity exceeded the defined limit (cost '5'). Your template should be refactored.
即使在我的tslint.js 我设置了:
{
"rulesDirectory": ["node_modules/codelyzer"],
"rules": {
"template-i18n": false,
"cyclomatic-complexity": [true, 20],
为什么我在设置 ""cyclomatic-complexity": [true, 20]" 中设置的内容与我为许多文件 "(cost '5')" 收到的错误消息之间存在这种差异?
还有为什么会发生这种情况?
【问题讨论】: