在旧有的项目上运行TS Lint

时间:2018-09-03 19:21:23

标签: visual-studio-code tslint

当我尝试通过VS Code TsLint扩展(运行时更新)对我的有角度的应用程序进行整理时,很不幸,扩展失败。

在启动时,我们设置了以下版本:

"@angular/cli": "~1.2.0",
"@angular/compiler-cli": "^4.0.1",
"@types/jasmine": "^2.2.30",
"autoprefixer": "^6.5.1",
"codelyzer": "~0.0.26",
"jasmine-core": "2.4.1",
"jasmine-spec-reporter": "2.5.0",
"karma": "1.2.0",
"karma-chrome-launcher": "^2.0.0",
"karma-cli": "^1.0.1",
"karma-jasmine": "^1.0.2",
"karma-remap-istanbul": "^0.2.1",
"protractor": "4.0.5",
"ts-node": "1.2.1",
"tslint": "3.13.0",
"typescript": "2.2.2"

此设置能够运行ng lint,但是VS Code Tslinter扩展失败,并显示以下内容:

vscode-tslint: Cannot read tslint configuration - 'Cannot read property 'findConfigurationPath' of undefined'

我一直在进行有关github的讨论,但这与扩展的旧版本有关。我当前正在使用1.0.38。

还有其他人有类似的问题吗?我几乎100%确信此问题与将项目工具的旧版本与新的VS Code扩展混合在一起有关...

需要任何帮助

1 个答案:

答案 0 :(得分:1)

我今天遇到了同样的问题,似乎vscode-tslint的依赖关系已经更新。

我必须升级到:

"tslint": "^5.7.0",
"typescript": "^2.9.1"

要使其正常工作。

我认为可以看到here的当前要求。

相关问题