I'm using Visual studio code to develop nodeJS apps and already have an eslint configuration to lint undeclared variables.
But in recent VSCode versions, some undeclared variable are not linted anymore. like event
, name
, crypto
, ...
When reaching the variable definition, it is actually declared in the file Microsoft VS Code Insiders\resources\app\extensions\node_modules\typescript\lib\lib.dom.d.ts
I can't see any reason why those variables should be declared globally for nodeJS apps. How can I disable the global definition of thoses variables?
You can exclude dom suggestions by setting "lib": ["es6"]
in a jsconfig.json
:
{
"compilerOptions": {
"target": "ES6",
"lib": ["es6"]
},
"exclude": [
"node_modules",
"**/node_modules/*"
]
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With