Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

VSCode shows TSLint errors only for opened file

I have a project with this structure:

-src
-dist
-node_modules
-gulpfile.js
-tslint.json

My typescript files reside in src and are transpiled in a gulp task into dist folder. I've installed tslint locally and started with a plain tslint config:

{
    "rules": {
        "max-line-length": {
            "options": [120]
        }
    }
}

Now, when I run tslint from a command line, I get warnings about all files in 'src' folder as expected. But VSCode highlights only the errors in currently opened file. The 'Problems' tab is getting filled only when I open a file with a tslint error.

Do I need to add some configuration to VSCode launch.json?

like image 921
Chernogorskiy Fedor Avatar asked Sep 27 '18 13:09

Chernogorskiy Fedor


1 Answers

At the moment it seems like it's not possible to show all warnings for all files in a project. You might be able to achieve something similar with a VS Code task that starts a watcher.

There's a feature request for this though.

like image 173
Fabian Lauer Avatar answered Oct 06 '22 00:10

Fabian Lauer