visual-studio-codecheckjs

Exclude files from "checkJS"


Can I somehow exclude dedicated files from VSCodes setting "javascript.implicitProjectConfig.checkJs": true?

I'd like to not have my webpack builds checked which are all placed in a dist folder.

I know that I could add **/dist/* or **/dist to files.exclude but this would (by definition) hide them completely from the files explorer which is not what I want since I'd like to have the possibility to inspect them from time to time.

Here's how an example setup of mine looks like:

enter image description here

My jsconfig.js looks like this:

{
    "compilerOptions": {
        "target": "es5",
        "checkJs": true
    },
    "include": [
        "**/src/**/*"
    ]
}

In my understanding it shouldn't check the files within dist in the first place...


Solution

  • I just realized that this happened since I was enabling the checkJs twice:

    After removing "javascript.implicitProjectConfig.checkJs": true from the settings everything works as expected and only files within src folders are checked...