src/content/docs/linter/rules/no-shadow-restricted-names.mdx
import { Tabs, TabItem } from '@astrojs/starlight/components';
<Tabs> <TabItem label="JavaScript (and super languages)" icon="seti:javascript"> ## Summary - Rule available since: `v1.0.0` - Diagnostic Category: [`lint/suspicious/noShadowRestrictedNames`](/reference/diagnostics#diagnostic-category) - This rule is **recommended**, meaning it is enabled by default. - This rule doesn't have a fix. - The default severity of this rule is [**error**](/reference/diagnostics#error). - Sources: - Same as [`no-shadow-restricted-names`](https://eslint.org/docs/latest/rules/no-shadow-restricted-names){
"linter": {
"rules": {
"suspicious": {
"noShadowRestrictedNames": "error"
}
}
}
}
Disallow identifiers from shadowing restricted names.
See also: noShadow
function NaN() {}
let Set;
try { } catch(Object) {}
function Array() {}
function test(JSON) {console.log(JSON)}