Skip to content

eslint/no-shadow-restricted-names Correctness ​

✅ This rule is turned on by default.

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) {}

References ​

Released under the MIT License.