在我的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],为什么我在设置中设置的“”there complexity“:true,20”和我收到的许多文件的错误信息"(cost '5')“之间会有差异?
还有,为什么会发生这种情况呢?
发布于 2019-09-09 23:56:16
模板复杂度在不同的规则中,即:
"template-cyclomatic-complexity": [true, 6]源https://github.com/fulls1z3/angular-tslint-rules/issues/34
"cyclomatic-complexity": [true, 20],用于*.ts文件
https://stackoverflow.com/questions/57857203
复制相似问题