--- source: crates/biome_js_analyze/tests/spec_tests.rs expression: invalid.jsonc --- # Input ```cjs function NaN() {} ``` # Diagnostics ``` invalid.jsonc:1:10 lint/suspicious/noShadowRestrictedNames ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Do not shadow the global "NaN" property. > 1 │ function NaN() {} │ ^^^ i Consider renaming this variable. It's easy to confuse the origin of variables when they're named after a known global. ``` # Input ```cjs function undefined() {} ``` # Diagnostics ``` invalid.jsonc:1:10 lint/suspicious/noShadowRestrictedNames ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Do not shadow the global "undefined" property. > 1 │ function undefined() {} │ ^^^^^^^^^ i Consider renaming this variable. It's easy to confuse the origin of variables when they're named after a known global. ``` # Input ```cjs function Infinity() {} ``` # Diagnostics ``` invalid.jsonc:1:10 lint/suspicious/noShadowRestrictedNames ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Do not shadow the global "Infinity" property. > 1 │ function Infinity() {} │ ^^^^^^^^ i Consider renaming this variable. It's easy to confuse the origin of variables when they're named after a known global. ``` # Input ```cjs function Array() {} ``` # Diagnostics ``` invalid.jsonc:1:10 lint/suspicious/noShadowRestrictedNames ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Do not shadow the global "Array" property. > 1 │ function Array() {} │ ^^^^^ i Consider renaming this variable. It's easy to confuse the origin of variables when they're named after a known global. ``` # Input ```cjs function test(JSON) { console.log(JSON); } ``` # Diagnostics ``` invalid.jsonc:1:15 lint/suspicious/noShadowRestrictedNames ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Do not shadow the global "JSON" property. > 1 │ function test(JSON) { console.log(JSON); } │ ^^^^ i Consider renaming this variable. It's easy to confuse the origin of variables when they're named after a known global. ``` # Input ```cjs let Set; ``` # Diagnostics ``` invalid.jsonc:1:5 lint/suspicious/noShadowRestrictedNames ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Do not shadow the global "Set" property. > 1 │ let Set; │ ^^^ i Consider renaming this variable. It's easy to confuse the origin of variables when they're named after a known global. ``` # Input ```cjs try {} catch (Object) {} ``` # Diagnostics ``` invalid.jsonc:1:15 lint/suspicious/noShadowRestrictedNames ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Do not shadow the global "Object" property. > 1 │ try {} catch (Object) {} │ ^^^^^^ i Consider renaming this variable. It's easy to confuse the origin of variables when they're named after a known global. ```