--- source: crates/biome_js_analyze/tests/spec_tests.rs expression: invalid.js --- # Input ```jsx const foo = { [NaN]: 1 }; const foo = { [NaN]() {} }; foo[NaN] = 1; class A { [NaN]() {} } foo = { [NaN]: 1 }; const foo = Infinity; if (Object.is(foo, Infinity)) { } const foo = bar[Infinity]; const foo = { Infinity }; const foo = { Infinity: Infinity }; const foo = { [Infinity]: -Infinity }; const foo = { [-Infinity]: Infinity }; const foo = { Infinity: -Infinity }; const { foo = Infinity } = {}; const { foo = -Infinity } = {}; const foo = Infinity.toString(); const foo = -Infinity.toString(); const foo = (-Infinity).toString(); const foo = +Infinity; const foo = +-Infinity; const foo = -Infinity; const foo = -(-Infinity); const foo = 1 - Infinity; const foo = 1 - -Infinity; const isPositiveZero = (value) => value === 0 && 1 / value === Infinity; const isNegativeZero = (value) => value === 0 && 1 / value === -Infinity; const { a = NaN } = {}; const { [NaN]: a = NaN } = {}; const [a = NaN] = []; function foo({ a = NaN }) {} function foo({ [NaN]: a = NaN }) {} function foo([a = NaN]) {} function foo() { return -Infinity; } globalThis.parseFloat(foo); // Biome doesn't suport `global` for global namespacing // global.parseFloat(foo); window.parseFloat(foo); // Biome doesn't suport `self` for global namespacing // self.parseFloat(foo); globalThis.NaN - globalThis.Infinity; ``` # Diagnostics ``` invalid.js:1:16 lint/style/useNumberNamespace FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Use Number.NaN instead of the equivalent global. > 1 │ const foo = { [NaN]: 1 }; │ ^^^ 2 │ 3 │ const foo = { [NaN]() {} }; i ES2015 moved some globals into the Number namespace for consistency. i Safe fix: Use Number.NaN instead. 1 │ - const·foo·=·{·[NaN]:·1·}; 1 │ + const·foo·=·{·[Number.NaN]:·1·}; 2 2 │ 3 3 │ const foo = { [NaN]() {} }; ``` ``` invalid.js:3:16 lint/style/useNumberNamespace FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Use Number.NaN instead of the equivalent global. 1 │ const foo = { [NaN]: 1 }; 2 │ > 3 │ const foo = { [NaN]() {} }; │ ^^^ 4 │ 5 │ foo[NaN] = 1; i ES2015 moved some globals into the Number namespace for consistency. i Safe fix: Use Number.NaN instead. 1 1 │ const foo = { [NaN]: 1 }; 2 2 │ 3 │ - const·foo·=·{·[NaN]()·{}·}; 3 │ + const·foo·=·{·[Number.NaN]()·{}·}; 4 4 │ 5 5 │ foo[NaN] = 1; ``` ``` invalid.js:5:5 lint/style/useNumberNamespace FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Use Number.NaN instead of the equivalent global. 3 │ const foo = { [NaN]() {} }; 4 │ > 5 │ foo[NaN] = 1; │ ^^^ 6 │ 7 │ class A { i ES2015 moved some globals into the Number namespace for consistency. i Safe fix: Use Number.NaN instead. 3 3 │ const foo = { [NaN]() {} }; 4 4 │ 5 │ - foo[NaN]·=·1; 5 │ + foo[Number.NaN]·=·1; 6 6 │ 7 7 │ class A { ``` ``` invalid.js:8:3 lint/style/useNumberNamespace FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Use Number.NaN instead of the equivalent global. 7 │ class A { > 8 │ [NaN]() {} │ ^^^ 9 │ } 10 │ i ES2015 moved some globals into the Number namespace for consistency. i Safe fix: Use Number.NaN instead. 6 6 │ 7 7 │ class A { 8 │ - → [NaN]()·{} 8 │ + → [Number.NaN]()·{} 9 9 │ } 10 10 │ ``` ``` invalid.js:11:10 lint/style/useNumberNamespace FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Use Number.NaN instead of the equivalent global. 9 │ } 10 │ > 11 │ foo = { [NaN]: 1 }; │ ^^^ 12 │ 13 │ const foo = Infinity; i ES2015 moved some globals into the Number namespace for consistency. i Safe fix: Use Number.NaN instead. 9 9 │ } 10 10 │ 11 │ - foo·=·{·[NaN]:·1·}; 11 │ + foo·=·{·[Number.NaN]:·1·}; 12 12 │ 13 13 │ const foo = Infinity; ``` ``` invalid.js:13:13 lint/style/useNumberNamespace FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Use Number.Infinity instead of the equivalent global. 11 │ foo = { [NaN]: 1 }; 12 │ > 13 │ const foo = Infinity; │ ^^^^^^^^ 14 │ 15 │ if (Object.is(foo, Infinity)) { i ES2015 moved some globals into the Number namespace for consistency. i Safe fix: Use Number.Infinity instead. 11 11 │ foo = { [NaN]: 1 }; 12 12 │ 13 │ - const·foo·=·Infinity; 13 │ + const·foo·=·Number.POSITIVE_INFINITY; 14 14 │ 15 15 │ if (Object.is(foo, Infinity)) { ``` ``` invalid.js:15:20 lint/style/useNumberNamespace FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Use Number.Infinity instead of the equivalent global. 13 │ const foo = Infinity; 14 │ > 15 │ if (Object.is(foo, Infinity)) { │ ^^^^^^^^ 16 │ } 17 │ i ES2015 moved some globals into the Number namespace for consistency. i Safe fix: Use Number.Infinity instead. 13 13 │ const foo = Infinity; 14 14 │ 15 │ - if·(Object.is(foo,·Infinity))·{ 15 │ + if·(Object.is(foo,·Number.POSITIVE_INFINITY))·{ 16 16 │ } 17 17 │ ``` ``` invalid.js:18:17 lint/style/useNumberNamespace FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Use Number.Infinity instead of the equivalent global. 16 │ } 17 │ > 18 │ const foo = bar[Infinity]; │ ^^^^^^^^ 19 │ 20 │ const foo = { Infinity }; i ES2015 moved some globals into the Number namespace for consistency. i Safe fix: Use Number.Infinity instead. 16 16 │ } 17 17 │ 18 │ - const·foo·=·bar[Infinity]; 18 │ + const·foo·=·bar[Number.POSITIVE_INFINITY]; 19 19 │ 20 20 │ const foo = { Infinity }; ``` ``` invalid.js:22:25 lint/style/useNumberNamespace FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Use Number.Infinity instead of the equivalent global. 20 │ const foo = { Infinity }; 21 │ > 22 │ const foo = { Infinity: Infinity }; │ ^^^^^^^^ 23 │ 24 │ const foo = { [Infinity]: -Infinity }; i ES2015 moved some globals into the Number namespace for consistency. i Safe fix: Use Number.Infinity instead. 20 20 │ const foo = { Infinity }; 21 21 │ 22 │ - const·foo·=·{·Infinity:·Infinity·}; 22 │ + const·foo·=·{·Infinity:·Number.POSITIVE_INFINITY·}; 23 23 │ 24 24 │ const foo = { [Infinity]: -Infinity }; ``` ``` invalid.js:24:16 lint/style/useNumberNamespace FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Use Number.Infinity instead of the equivalent global. 22 │ const foo = { Infinity: Infinity }; 23 │ > 24 │ const foo = { [Infinity]: -Infinity }; │ ^^^^^^^^ 25 │ 26 │ const foo = { [-Infinity]: Infinity }; i ES2015 moved some globals into the Number namespace for consistency. i Safe fix: Use Number.Infinity instead. 22 22 │ const foo = { Infinity: Infinity }; 23 23 │ 24 │ - const·foo·=·{·[Infinity]:·-Infinity·}; 24 │ + const·foo·=·{·[Number.POSITIVE_INFINITY]:·-Infinity·}; 25 25 │ 26 26 │ const foo = { [-Infinity]: Infinity }; ``` ``` invalid.js:24:28 lint/style/useNumberNamespace FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Use Number.Infinity instead of the equivalent global. 22 │ const foo = { Infinity: Infinity }; 23 │ > 24 │ const foo = { [Infinity]: -Infinity }; │ ^^^^^^^^ 25 │ 26 │ const foo = { [-Infinity]: Infinity }; i ES2015 moved some globals into the Number namespace for consistency. i Safe fix: Use Number.Infinity instead. 22 22 │ const foo = { Infinity: Infinity }; 23 23 │ 24 │ - const·foo·=·{·[Infinity]:·-Infinity·}; 24 │ + const·foo·=·{·[Infinity]:·Number.NEGATIVE_INFINITY·}; 25 25 │ 26 26 │ const foo = { [-Infinity]: Infinity }; ``` ``` invalid.js:26:17 lint/style/useNumberNamespace FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Use Number.Infinity instead of the equivalent global. 24 │ const foo = { [Infinity]: -Infinity }; 25 │ > 26 │ const foo = { [-Infinity]: Infinity }; │ ^^^^^^^^ 27 │ 28 │ const foo = { Infinity: -Infinity }; i ES2015 moved some globals into the Number namespace for consistency. i Safe fix: Use Number.Infinity instead. 24 24 │ const foo = { [Infinity]: -Infinity }; 25 25 │ 26 │ - const·foo·=·{·[-Infinity]:·Infinity·}; 26 │ + const·foo·=·{·[Number.NEGATIVE_INFINITY]:·Infinity·}; 27 27 │ 28 28 │ const foo = { Infinity: -Infinity }; ``` ``` invalid.js:26:28 lint/style/useNumberNamespace FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Use Number.Infinity instead of the equivalent global. 24 │ const foo = { [Infinity]: -Infinity }; 25 │ > 26 │ const foo = { [-Infinity]: Infinity }; │ ^^^^^^^^ 27 │ 28 │ const foo = { Infinity: -Infinity }; i ES2015 moved some globals into the Number namespace for consistency. i Safe fix: Use Number.Infinity instead. 24 24 │ const foo = { [Infinity]: -Infinity }; 25 25 │ 26 │ - const·foo·=·{·[-Infinity]:·Infinity·}; 26 │ + const·foo·=·{·[-Infinity]:·Number.POSITIVE_INFINITY·}; 27 27 │ 28 28 │ const foo = { Infinity: -Infinity }; ``` ``` invalid.js:28:26 lint/style/useNumberNamespace FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Use Number.Infinity instead of the equivalent global. 26 │ const foo = { [-Infinity]: Infinity }; 27 │ > 28 │ const foo = { Infinity: -Infinity }; │ ^^^^^^^^ 29 │ 30 │ const { foo = Infinity } = {}; i ES2015 moved some globals into the Number namespace for consistency. i Safe fix: Use Number.Infinity instead. 26 26 │ const foo = { [-Infinity]: Infinity }; 27 27 │ 28 │ - const·foo·=·{·Infinity:·-Infinity·}; 28 │ + const·foo·=·{·Infinity:·Number.NEGATIVE_INFINITY·}; 29 29 │ 30 30 │ const { foo = Infinity } = {}; ``` ``` invalid.js:30:15 lint/style/useNumberNamespace FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Use Number.Infinity instead of the equivalent global. 28 │ const foo = { Infinity: -Infinity }; 29 │ > 30 │ const { foo = Infinity } = {}; │ ^^^^^^^^ 31 │ 32 │ const { foo = -Infinity } = {}; i ES2015 moved some globals into the Number namespace for consistency. i Safe fix: Use Number.Infinity instead. 28 28 │ const foo = { Infinity: -Infinity }; 29 29 │ 30 │ - const·{·foo·=·Infinity·}·=·{}; 30 │ + const·{·foo·=·Number.POSITIVE_INFINITY·}·=·{}; 31 31 │ 32 32 │ const { foo = -Infinity } = {}; ``` ``` invalid.js:32:16 lint/style/useNumberNamespace FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Use Number.Infinity instead of the equivalent global. 30 │ const { foo = Infinity } = {}; 31 │ > 32 │ const { foo = -Infinity } = {}; │ ^^^^^^^^ 33 │ 34 │ const foo = Infinity.toString(); i ES2015 moved some globals into the Number namespace for consistency. i Safe fix: Use Number.Infinity instead. 30 30 │ const { foo = Infinity } = {}; 31 31 │ 32 │ - const·{·foo·=·-Infinity·}·=·{}; 32 │ + const·{·foo·=·Number.NEGATIVE_INFINITY·}·=·{}; 33 33 │ 34 34 │ const foo = Infinity.toString(); ``` ``` invalid.js:34:13 lint/style/useNumberNamespace FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Use Number.Infinity instead of the equivalent global. 32 │ const { foo = -Infinity } = {}; 33 │ > 34 │ const foo = Infinity.toString(); │ ^^^^^^^^ 35 │ 36 │ const foo = -Infinity.toString(); i ES2015 moved some globals into the Number namespace for consistency. i Safe fix: Use Number.Infinity instead. 32 32 │ const { foo = -Infinity } = {}; 33 33 │ 34 │ - const·foo·=·Infinity.toString(); 34 │ + const·foo·=·Number.POSITIVE_INFINITY.toString(); 35 35 │ 36 36 │ const foo = -Infinity.toString(); ``` ``` invalid.js:36:14 lint/style/useNumberNamespace FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Use Number.Infinity instead of the equivalent global. 34 │ const foo = Infinity.toString(); 35 │ > 36 │ const foo = -Infinity.toString(); │ ^^^^^^^^ 37 │ 38 │ const foo = (-Infinity).toString(); i ES2015 moved some globals into the Number namespace for consistency. i Safe fix: Use Number.Infinity instead. 34 34 │ const foo = Infinity.toString(); 35 35 │ 36 │ - const·foo·=·-Infinity.toString(); 36 │ + const·foo·=·-Number.POSITIVE_INFINITY.toString(); 37 37 │ 38 38 │ const foo = (-Infinity).toString(); ``` ``` invalid.js:38:15 lint/style/useNumberNamespace FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Use Number.Infinity instead of the equivalent global. 36 │ const foo = -Infinity.toString(); 37 │ > 38 │ const foo = (-Infinity).toString(); │ ^^^^^^^^ 39 │ 40 │ const foo = +Infinity; i ES2015 moved some globals into the Number namespace for consistency. i Safe fix: Use Number.Infinity instead. 36 36 │ const foo = -Infinity.toString(); 37 37 │ 38 │ - const·foo·=·(-Infinity).toString(); 38 │ + const·foo·=·(Number.NEGATIVE_INFINITY).toString(); 39 39 │ 40 40 │ const foo = +Infinity; ``` ``` invalid.js:40:14 lint/style/useNumberNamespace FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Use Number.Infinity instead of the equivalent global. 38 │ const foo = (-Infinity).toString(); 39 │ > 40 │ const foo = +Infinity; │ ^^^^^^^^ 41 │ 42 │ const foo = +-Infinity; i ES2015 moved some globals into the Number namespace for consistency. i Safe fix: Use Number.Infinity instead. 38 38 │ const foo = (-Infinity).toString(); 39 39 │ 40 │ - const·foo·=·+Infinity; 40 │ + const·foo·=·Number.POSITIVE_INFINITY; 41 41 │ 42 42 │ const foo = +-Infinity; ``` ``` invalid.js:42:15 lint/style/useNumberNamespace FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Use Number.Infinity instead of the equivalent global. 40 │ const foo = +Infinity; 41 │ > 42 │ const foo = +-Infinity; │ ^^^^^^^^ 43 │ 44 │ const foo = -Infinity; i ES2015 moved some globals into the Number namespace for consistency. i Safe fix: Use Number.Infinity instead. 40 40 │ const foo = +Infinity; 41 41 │ 42 │ - const·foo·=·+-Infinity; 42 │ + const·foo·=·+Number.NEGATIVE_INFINITY; 43 43 │ 44 44 │ const foo = -Infinity; ``` ``` invalid.js:44:14 lint/style/useNumberNamespace FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Use Number.Infinity instead of the equivalent global. 42 │ const foo = +-Infinity; 43 │ > 44 │ const foo = -Infinity; │ ^^^^^^^^ 45 │ 46 │ const foo = -(-Infinity); i ES2015 moved some globals into the Number namespace for consistency. i Safe fix: Use Number.Infinity instead. 42 42 │ const foo = +-Infinity; 43 43 │ 44 │ - const·foo·=·-Infinity; 44 │ + const·foo·=·Number.NEGATIVE_INFINITY; 45 45 │ 46 46 │ const foo = -(-Infinity); ``` ``` invalid.js:46:16 lint/style/useNumberNamespace FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Use Number.Infinity instead of the equivalent global. 44 │ const foo = -Infinity; 45 │ > 46 │ const foo = -(-Infinity); │ ^^^^^^^^ 47 │ 48 │ const foo = 1 - Infinity; i ES2015 moved some globals into the Number namespace for consistency. i Safe fix: Use Number.Infinity instead. 44 44 │ const foo = -Infinity; 45 45 │ 46 │ - const·foo·=·-(-Infinity); 46 │ + const·foo·=·-(Number.NEGATIVE_INFINITY); 47 47 │ 48 48 │ const foo = 1 - Infinity; ``` ``` invalid.js:48:17 lint/style/useNumberNamespace FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Use Number.Infinity instead of the equivalent global. 46 │ const foo = -(-Infinity); 47 │ > 48 │ const foo = 1 - Infinity; │ ^^^^^^^^ 49 │ 50 │ const foo = 1 - -Infinity; i ES2015 moved some globals into the Number namespace for consistency. i Safe fix: Use Number.Infinity instead. 46 46 │ const foo = -(-Infinity); 47 47 │ 48 │ - const·foo·=·1·-·Infinity; 48 │ + const·foo·=·1·-·Number.POSITIVE_INFINITY; 49 49 │ 50 50 │ const foo = 1 - -Infinity; ``` ``` invalid.js:50:18 lint/style/useNumberNamespace FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Use Number.Infinity instead of the equivalent global. 48 │ const foo = 1 - Infinity; 49 │ > 50 │ const foo = 1 - -Infinity; │ ^^^^^^^^ 51 │ 52 │ const isPositiveZero = (value) => value === 0 && 1 / value === Infinity; i ES2015 moved some globals into the Number namespace for consistency. i Safe fix: Use Number.Infinity instead. 48 48 │ const foo = 1 - Infinity; 49 49 │ 50 │ - const·foo·=·1·-·-Infinity; 50 │ + const·foo·=·1·-·Number.NEGATIVE_INFINITY; 51 51 │ 52 52 │ const isPositiveZero = (value) => value === 0 && 1 / value === Infinity; ``` ``` invalid.js:52:64 lint/style/useNumberNamespace FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Use Number.Infinity instead of the equivalent global. 50 │ const foo = 1 - -Infinity; 51 │ > 52 │ const isPositiveZero = (value) => value === 0 && 1 / value === Infinity; │ ^^^^^^^^ 53 │ 54 │ const isNegativeZero = (value) => value === 0 && 1 / value === -Infinity; i ES2015 moved some globals into the Number namespace for consistency. i Safe fix: Use Number.Infinity instead. 50 50 │ const foo = 1 - -Infinity; 51 51 │ 52 │ - const·isPositiveZero·=·(value)·=>·value·===·0·&&·1·/·value·===·Infinity; 52 │ + const·isPositiveZero·=·(value)·=>·value·===·0·&&·1·/·value·===·Number.POSITIVE_INFINITY; 53 53 │ 54 54 │ const isNegativeZero = (value) => value === 0 && 1 / value === -Infinity; ``` ``` invalid.js:54:65 lint/style/useNumberNamespace FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Use Number.Infinity instead of the equivalent global. 52 │ const isPositiveZero = (value) => value === 0 && 1 / value === Infinity; 53 │ > 54 │ const isNegativeZero = (value) => value === 0 && 1 / value === -Infinity; │ ^^^^^^^^ 55 │ 56 │ const { a = NaN } = {}; i ES2015 moved some globals into the Number namespace for consistency. i Safe fix: Use Number.Infinity instead. 52 52 │ const isPositiveZero = (value) => value === 0 && 1 / value === Infinity; 53 53 │ 54 │ - const·isNegativeZero·=·(value)·=>·value·===·0·&&·1·/·value·===·-Infinity; 54 │ + const·isNegativeZero·=·(value)·=>·value·===·0·&&·1·/·value·===·Number.NEGATIVE_INFINITY; 55 55 │ 56 56 │ const { a = NaN } = {}; ``` ``` invalid.js:56:13 lint/style/useNumberNamespace FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Use Number.NaN instead of the equivalent global. 54 │ const isNegativeZero = (value) => value === 0 && 1 / value === -Infinity; 55 │ > 56 │ const { a = NaN } = {}; │ ^^^ 57 │ 58 │ const { [NaN]: a = NaN } = {}; i ES2015 moved some globals into the Number namespace for consistency. i Safe fix: Use Number.NaN instead. 54 54 │ const isNegativeZero = (value) => value === 0 && 1 / value === -Infinity; 55 55 │ 56 │ - const·{·a·=·NaN·}·=·{}; 56 │ + const·{·a·=·Number.NaN·}·=·{}; 57 57 │ 58 58 │ const { [NaN]: a = NaN } = {}; ``` ``` invalid.js:58:10 lint/style/useNumberNamespace FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Use Number.NaN instead of the equivalent global. 56 │ const { a = NaN } = {}; 57 │ > 58 │ const { [NaN]: a = NaN } = {}; │ ^^^ 59 │ 60 │ const [a = NaN] = []; i ES2015 moved some globals into the Number namespace for consistency. i Safe fix: Use Number.NaN instead. 56 56 │ const { a = NaN } = {}; 57 57 │ 58 │ - const·{·[NaN]:·a·=·NaN·}·=·{}; 58 │ + const·{·[Number.NaN]:·a·=·NaN·}·=·{}; 59 59 │ 60 60 │ const [a = NaN] = []; ``` ``` invalid.js:58:20 lint/style/useNumberNamespace FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Use Number.NaN instead of the equivalent global. 56 │ const { a = NaN } = {}; 57 │ > 58 │ const { [NaN]: a = NaN } = {}; │ ^^^ 59 │ 60 │ const [a = NaN] = []; i ES2015 moved some globals into the Number namespace for consistency. i Safe fix: Use Number.NaN instead. 56 56 │ const { a = NaN } = {}; 57 57 │ 58 │ - const·{·[NaN]:·a·=·NaN·}·=·{}; 58 │ + const·{·[NaN]:·a·=·Number.NaN·}·=·{}; 59 59 │ 60 60 │ const [a = NaN] = []; ``` ``` invalid.js:60:12 lint/style/useNumberNamespace FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Use Number.NaN instead of the equivalent global. 58 │ const { [NaN]: a = NaN } = {}; 59 │ > 60 │ const [a = NaN] = []; │ ^^^ 61 │ 62 │ function foo({ a = NaN }) {} i ES2015 moved some globals into the Number namespace for consistency. i Safe fix: Use Number.NaN instead. 58 58 │ const { [NaN]: a = NaN } = {}; 59 59 │ 60 │ - const·[a·=·NaN]·=·[]; 60 │ + const·[a·=·Number.NaN]·=·[]; 61 61 │ 62 62 │ function foo({ a = NaN }) {} ``` ``` invalid.js:62:20 lint/style/useNumberNamespace FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Use Number.NaN instead of the equivalent global. 60 │ const [a = NaN] = []; 61 │ > 62 │ function foo({ a = NaN }) {} │ ^^^ 63 │ 64 │ function foo({ [NaN]: a = NaN }) {} i ES2015 moved some globals into the Number namespace for consistency. i Safe fix: Use Number.NaN instead. 60 60 │ const [a = NaN] = []; 61 61 │ 62 │ - function·foo({·a·=·NaN·})·{} 62 │ + function·foo({·a·=·Number.NaN·})·{} 63 63 │ 64 64 │ function foo({ [NaN]: a = NaN }) {} ``` ``` invalid.js:64:17 lint/style/useNumberNamespace FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Use Number.NaN instead of the equivalent global. 62 │ function foo({ a = NaN }) {} 63 │ > 64 │ function foo({ [NaN]: a = NaN }) {} │ ^^^ 65 │ 66 │ function foo([a = NaN]) {} i ES2015 moved some globals into the Number namespace for consistency. i Safe fix: Use Number.NaN instead. 62 62 │ function foo({ a = NaN }) {} 63 63 │ 64 │ - function·foo({·[NaN]:·a·=·NaN·})·{} 64 │ + function·foo({·[Number.NaN]:·a·=·NaN·})·{} 65 65 │ 66 66 │ function foo([a = NaN]) {} ``` ``` invalid.js:64:27 lint/style/useNumberNamespace FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Use Number.NaN instead of the equivalent global. 62 │ function foo({ a = NaN }) {} 63 │ > 64 │ function foo({ [NaN]: a = NaN }) {} │ ^^^ 65 │ 66 │ function foo([a = NaN]) {} i ES2015 moved some globals into the Number namespace for consistency. i Safe fix: Use Number.NaN instead. 62 62 │ function foo({ a = NaN }) {} 63 63 │ 64 │ - function·foo({·[NaN]:·a·=·NaN·})·{} 64 │ + function·foo({·[NaN]:·a·=·Number.NaN·})·{} 65 65 │ 66 66 │ function foo([a = NaN]) {} ``` ``` invalid.js:66:19 lint/style/useNumberNamespace FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Use Number.NaN instead of the equivalent global. 64 │ function foo({ [NaN]: a = NaN }) {} 65 │ > 66 │ function foo([a = NaN]) {} │ ^^^ 67 │ 68 │ function foo() { i ES2015 moved some globals into the Number namespace for consistency. i Safe fix: Use Number.NaN instead. 64 64 │ function foo({ [NaN]: a = NaN }) {} 65 65 │ 66 │ - function·foo([a·=·NaN])·{} 66 │ + function·foo([a·=·Number.NaN])·{} 67 67 │ 68 68 │ function foo() { ``` ``` invalid.js:69:10 lint/style/useNumberNamespace FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Use Number.Infinity instead of the equivalent global. 68 │ function foo() { > 69 │ return -Infinity; │ ^^^^^^^^ 70 │ } 71 │ i ES2015 moved some globals into the Number namespace for consistency. i Safe fix: Use Number.Infinity instead. 67 67 │ 68 68 │ function foo() { 69 │ - → return·-Infinity; 69 │ + → return·Number.NEGATIVE_INFINITY; 70 70 │ } 71 71 │ ``` ``` invalid.js:72:1 lint/style/useNumberNamespace FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Use Number.parseFloat instead of the equivalent global. 70 │ } 71 │ > 72 │ globalThis.parseFloat(foo); │ ^^^^^^^^^^^^^^^^^^^^^ 73 │ 74 │ // Biome doesn't suport `global` for global namespacing i ES2015 moved some globals into the Number namespace for consistency. i Safe fix: Use Number.parseFloat instead. 70 70 │ } 71 71 │ 72 │ - globalThis.parseFloat(foo); 72 │ + globalThis.Number.parseFloat(foo); 73 73 │ 74 74 │ // Biome doesn't suport `global` for global namespacing ``` ``` invalid.js:77:1 lint/style/useNumberNamespace FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Use Number.parseFloat instead of the equivalent global. 75 │ // global.parseFloat(foo); 76 │ > 77 │ window.parseFloat(foo); │ ^^^^^^^^^^^^^^^^^ 78 │ 79 │ // Biome doesn't suport `self` for global namespacing i ES2015 moved some globals into the Number namespace for consistency. i Safe fix: Use Number.parseFloat instead. 75 75 │ // global.parseFloat(foo); 76 76 │ 77 │ - window.parseFloat(foo); 77 │ + window.Number.parseFloat(foo); 78 78 │ 79 79 │ // Biome doesn't suport `self` for global namespacing ``` ``` invalid.js:82:1 lint/style/useNumberNamespace FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Use Number.NaN instead of the equivalent global. 80 │ // self.parseFloat(foo); 81 │ > 82 │ globalThis.NaN - globalThis.Infinity; │ ^^^^^^^^^^^^^^ 83 │ i ES2015 moved some globals into the Number namespace for consistency. i Safe fix: Use Number.NaN instead. 80 80 │ // self.parseFloat(foo); 81 81 │ 82 │ - globalThis.NaN·-·globalThis.Infinity; 82 │ + globalThis.Number.NaN·-·globalThis.Infinity; 83 83 │ ``` ``` invalid.js:82:18 lint/style/useNumberNamespace FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Use Number.Infinity instead of the equivalent global. 80 │ // self.parseFloat(foo); 81 │ > 82 │ globalThis.NaN - globalThis.Infinity; │ ^^^^^^^^^^^^^^^^^^^ 83 │ i ES2015 moved some globals into the Number namespace for consistency. i Safe fix: Use Number.Infinity instead. 80 80 │ // self.parseFloat(foo); 81 81 │ 82 │ - globalThis.NaN·-·globalThis.Infinity; 82 │ + globalThis.NaN·-·globalThis.Number.Infinity; 83 83 │ ```