Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/typescript/8.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Typescript VSCode-TSLint错误ENOTDIR无效cwd_Typescript_Visual Studio Code_Tslint - Fatal编程技术网

Typescript VSCode-TSLint错误ENOTDIR无效cwd

Typescript VSCode-TSLint错误ENOTDIR无效cwd,typescript,visual-studio-code,tslint,Typescript,Visual Studio Code,Tslint,我将VSCode与TSLint(v5.11.0)一起使用 我将VSCode设置为: “tslint.autoFixOnSave”:true 但是,每当我打开任何ts文件时,输出上都会出现以下ts错误: [Info - 14:52:31] vscode-tslint: Status is OK [Info - 14:52:31] vscode-tslint: Cannot read tslint configuration - 'ENOTDIR invalid cwd /Users/batma

我将VSCode与TSLint(v5.11.0)一起使用

我将VSCode设置为:
“tslint.autoFixOnSave”:true
但是,每当我打开任何ts文件时,输出上都会出现以下ts错误:

[Info  - 14:52:31] vscode-tslint: Status is OK
[Info  - 14:52:31] vscode-tslint: Cannot read tslint configuration - 'ENOTDIR invalid cwd /Users/batman/project/Command.ts'
由于此错误,vscode不会自动修复我的tslint.json文件中的TS问题

这不仅仅是一个文件,而是我打开的任何类型脚本文件。请让我知道如何解决这个问题


谢谢。

看起来您没有
tsconfig.json
文件

如果您确实有一个,它就不在项目的根文件夹(也称为cwd)中


请参阅文档:

我确实在我的目录根目录下有一个有效的
tsconfig.json
tslint.json
文件,但我仍然得到错误。。。在我看来,
vscode tslint
假设cwd不正确
vscode tslint:cannotreadtslint配置-'enotdirinvalid cwd/Users/mbirsan/workspace/WSNAME/src/ProjectName/src/pages/home/home.tsx'