What is Library in WebStorm?
For every library, you can configure the scope where it works in the project. And that’s exactly what we need!
Configuring HTML and Node.js Core Libraries
Uncheck HTML and Node.js Core libraries to disable them completely for now.
Now click on the Manage Scopes… button to start the configuration. Click + and select the folders with the client-side code – now select HTML library from the drop-down list next to them.
Click + again, select the folders or files with the server-side code and enable Node.js Core library for them.
So now items from the HTML and Node.js Core libraries are resolved and shown in the code completion only in files in these specific project folders.
In the same way, we can configure the scope of the library that is automatically created for the node_modules folder.
By the way, the IDE inspections can be configured in a similar way using scopes in Preferences | Editor | Inspections.
Subscribe to Blog updates
Thanks, we've got you!