A Mehmeto
A Mehmeto

Reputation: 2019

How to exclude node_modules from WebStorm code analysis (named 'Problems' on the bottom-left corner)

I am relying on this extensively on my workflow, but for some reasons this feature is now warning me of all the problems coming from node_modules, which obviously I'm not interested in.

enter image description here

How can I make WebStorm analyse my whole project problems without the nodes_modules folder?

Upvotes: 7

Views: 2503

Answers (2)

Jonathan Kacprowicz
Jonathan Kacprowicz

Reputation: 21

This is due to TSC itself reporting errors, and Project Errors within Webstorm just displays them. This is mentioned in the youtrack link below. I was able to remove all of my errors by adding the

{
  "compilerOptions": {
    "skipLibCheck": true
  }
}

option in tsconfig.json; however we decided not to enable that option at this time because if its side effects.

https://youtrack.jetbrains.com/issue/WEB-53460/Errors-from-nodemodules-in-type-script

Upvotes: 2

jmr28
jmr28

Reputation: 29

For me, node modules are excluded by default, but here's a useful tip when you don't want a directory to show up in JetBrains IDE's (WebStorm,PHP Storm,...):

Right click on your node_modules folder and select Mark Directory as > Excluded

Image

Upvotes: -1

Related Questions