I have upgraded Eslint from 7.7.0 to 7.10.0 and @types/node from 14.6.0 to 14.11.2. The application tsconfig.json defines types: ["node"] and typescript is version 4.0.3. Eslint is called with eslint --env node,es2020.
Before the upgrade Eslint never flagged any problem in my code. Now Eslint started complaining that NodeJS is not defined in the following code fragment:
private handleServerErrors(error: NodeJS.ErrnoException): void {
if(error.code === "EADDRINUSE") {
. . .
I silence the Eslint error and the compilation succeeded. So seems a problem specific to eslint, not the code.
The same problem happens in another file for namespace JQuery, but I had not yet investigated.
Is there anything I'm missing? Need to add some import? What has changed in eslint/typescript/node?
Thanks for your help! mario
globalssection of eslint.yaml the error goes away. But this seems too gross to be the right solution. Why eslint before has not complained? - SiliconValley