Restrict global variables to prevent accidental global access. Based on this TypeScript issue.
npm install --save-dev eslint-config-restricted-globals
Place this config inside the extends
section of your eslint
config file.
{
"extends": [
...
# alternatively you can omit eslint-config- and just place "restricted-globals"
"eslint-config-restricted-globals",
...
]
}
Based on this comment from @jahooma.