eslint/no-shadow-restricted-names Correctness
What it does
Disallow redefine the global variables like 'undefined', 'NaN', 'Infinity', 'eval', 'arguments'.
Why is this bad?
Example
javascript
function NaN() {}
!function (Infinity) {};
var undefined = 5;
try {
} catch (eval) {}
How to use
To enable this rule in the CLI or using the config file, you can use:
bash
oxlint --deny no-shadow-restricted-names
json
{
"rules": {
"no-shadow-restricted-names": "error"
}
}