---
source: crates/oxc_linter/src/tester.rs
---
  ⚠ eslint-plugin-unicorn(prefer-number-properties): Use `Number.NaN` instead of the global `NaN`
   ╭─[prefer_number_properties.tsx:1:13]
 1 │ const foo = NaN;
   ·             ───
   ╰────
  help: Replace it with `Number.NaN`

  ⚠ eslint-plugin-unicorn(prefer-number-properties): Use `Number.NaN` instead of the global `NaN`
   ╭─[prefer_number_properties.tsx:1:18]
 1 │ if (Number.isNaN(NaN)) {}
   ·                  ───
   ╰────
  help: Replace it with `Number.NaN`

  ⚠ eslint-plugin-unicorn(prefer-number-properties): Use `Number.NaN` instead of the global `NaN`
   ╭─[prefer_number_properties.tsx:1:20]
 1 │ if (Object.is(foo, NaN)) {}
   ·                    ───
   ╰────
  help: Replace it with `Number.NaN`

  ⚠ eslint-plugin-unicorn(prefer-number-properties): Use `Number.NaN` instead of the global `NaN`
   ╭─[prefer_number_properties.tsx:1:17]
 1 │ const foo = bar[NaN];
   ·                 ───
   ╰────
  help: Replace it with `Number.NaN`

  ⚠ eslint-plugin-unicorn(prefer-number-properties): Use `Number.NaN` instead of the global `NaN`
   ╭─[prefer_number_properties.tsx:1:14]
 1 │ const foo = {NaN};
   ·              ───
   ╰────
  help: Replace it with `Number.NaN`

  ⚠ eslint-plugin-unicorn(prefer-number-properties): Use `Number.NaN` instead of the global `NaN`
   ╭─[prefer_number_properties.tsx:1:19]
 1 │ const foo = {NaN: NaN};
   ·                   ───
   ╰────
  help: Replace it with `Number.NaN`

  ⚠ eslint-plugin-unicorn(prefer-number-properties): Use `Number.NaN` instead of the global `NaN`
   ╭─[prefer_number_properties.tsx:1:14]
 1 │ const {foo = NaN} = {};
   ·              ───
   ╰────
  help: Replace it with `Number.NaN`

  ⚠ eslint-plugin-unicorn(prefer-number-properties): Use `Number.NaN` instead of the global `NaN`
   ╭─[prefer_number_properties.tsx:1:13]
 1 │ const foo = NaN.toString();
   ·             ───
   ╰────
  help: Replace it with `Number.NaN`

  ⚠ eslint-plugin-unicorn(prefer-number-properties): Use `Number.NaN` instead of the global `NaN`
   ╭─[prefer_number_properties.tsx:1:14]
 1 │ class Foo3 {[NaN] = 1}
   ·              ───
   ╰────
  help: Replace it with `Number.NaN`

  ⚠ eslint-plugin-unicorn(prefer-number-properties): Use `Number.NaN` instead of the global `NaN`
   ╭─[prefer_number_properties.tsx:1:14]
 1 │ class Foo2 {[NaN] = 1}
   ·              ───
   ╰────
  help: Replace it with `Number.NaN`

  ⚠ eslint-plugin-unicorn(prefer-number-properties): Use `Number.NaN` instead of the global `NaN`
   ╭─[prefer_number_properties.tsx:1:13]
 1 │ class Foo {[NaN] = 1}
   ·             ───
   ╰────
  help: Replace it with `Number.NaN`

  ⚠ eslint-plugin-unicorn(prefer-number-properties): Use `Number.NaN` instead of the global `NaN`
   ╭─[prefer_number_properties.tsx:1:15]
 1 │ const foo = {[NaN]: 1}
   ·               ───
   ╰────
  help: Replace it with `Number.NaN`

  ⚠ eslint-plugin-unicorn(prefer-number-properties): Use `Number.NaN` instead of the global `NaN`
   ╭─[prefer_number_properties.tsx:1:15]
 1 │ const foo = {[NaN]() {}}
   ·               ───
   ╰────
  help: Replace it with `Number.NaN`

  ⚠ eslint-plugin-unicorn(prefer-number-properties): Use `Number.NaN` instead of the global `NaN`
   ╭─[prefer_number_properties.tsx:1:5]
 1 │ foo[NaN] = 1;
   ·     ───
   ╰────
  help: Replace it with `Number.NaN`

  ⚠ eslint-plugin-unicorn(prefer-number-properties): Use `Number.NaN` instead of the global `NaN`
   ╭─[prefer_number_properties.tsx:1:11]
 1 │ class A {[NaN](){}}
   ·           ───
   ╰────
  help: Replace it with `Number.NaN`

  ⚠ eslint-plugin-unicorn(prefer-number-properties): Use `Number.NaN` instead of the global `NaN`
   ╭─[prefer_number_properties.tsx:1:9]
 1 │ foo = {[NaN]: 1}
   ·         ───
   ╰────
  help: Replace it with `Number.NaN`

  ⚠ eslint-plugin-unicorn(prefer-number-properties): Use `Number.Infinity` instead of the global `Infinity`
   ╭─[prefer_number_properties.tsx:1:13]
 1 │ const foo = Infinity;
   ·             ────────
   ╰────
  help: Replace it with `Number.Infinity`

  ⚠ eslint-plugin-unicorn(prefer-number-properties): Use `Number.Infinity` instead of the global `Infinity`
   ╭─[prefer_number_properties.tsx:1:18]
 1 │ if (Number.isNaN(Infinity)) {}
   ·                  ────────
   ╰────
  help: Replace it with `Number.Infinity`

  ⚠ eslint-plugin-unicorn(prefer-number-properties): Use `Number.Infinity` instead of the global `Infinity`
   ╭─[prefer_number_properties.tsx:1:20]
 1 │ if (Object.is(foo, Infinity)) {}
   ·                    ────────
   ╰────
  help: Replace it with `Number.Infinity`

  ⚠ eslint-plugin-unicorn(prefer-number-properties): Use `Number.Infinity` instead of the global `Infinity`
   ╭─[prefer_number_properties.tsx:1:17]
 1 │ const foo = bar[Infinity];
   ·                 ────────
   ╰────
  help: Replace it with `Number.Infinity`

  ⚠ eslint-plugin-unicorn(prefer-number-properties): Use `Number.Infinity` instead of the global `Infinity`
   ╭─[prefer_number_properties.tsx:1:14]
 1 │ const foo = {Infinity};
   ·              ────────
   ╰────
  help: Replace it with `Number.Infinity`

  ⚠ eslint-plugin-unicorn(prefer-number-properties): Use `Number.Infinity` instead of the global `Infinity`
   ╭─[prefer_number_properties.tsx:1:24]
 1 │ const foo = {Infinity: Infinity};
   ·                        ────────
   ╰────
  help: Replace it with `Number.Infinity`

  ⚠ eslint-plugin-unicorn(prefer-number-properties): Use `Number.Infinity` instead of the global `Infinity`
   ╭─[prefer_number_properties.tsx:1:15]
 1 │ const foo = {[Infinity]: -Infinity};
   ·               ────────
   ╰────
  help: Replace it with `Number.Infinity`

  ⚠ eslint-plugin-unicorn(prefer-number-properties): Use `Number.Infinity` instead of the global `Infinity`
   ╭─[prefer_number_properties.tsx:1:27]
 1 │ const foo = {[Infinity]: -Infinity};
   ·                           ────────
   ╰────
  help: Replace it with `Number.Infinity`

  ⚠ eslint-plugin-unicorn(prefer-number-properties): Use `Number.Infinity` instead of the global `Infinity`
   ╭─[prefer_number_properties.tsx:1:16]
 1 │ const foo = {[-Infinity]: Infinity};
   ·                ────────
   ╰────
  help: Replace it with `Number.Infinity`

  ⚠ eslint-plugin-unicorn(prefer-number-properties): Use `Number.Infinity` instead of the global `Infinity`
   ╭─[prefer_number_properties.tsx:1:27]
 1 │ const foo = {[-Infinity]: Infinity};
   ·                           ────────
   ╰────
  help: Replace it with `Number.Infinity`

  ⚠ eslint-plugin-unicorn(prefer-number-properties): Use `Number.Infinity` instead of the global `Infinity`
   ╭─[prefer_number_properties.tsx:1:25]
 1 │ const foo = {Infinity: -Infinity};
   ·                         ────────
   ╰────
  help: Replace it with `Number.Infinity`

  ⚠ eslint-plugin-unicorn(prefer-number-properties): Use `Number.Infinity` instead of the global `Infinity`
   ╭─[prefer_number_properties.tsx:1:14]
 1 │ const {foo = Infinity} = {};
   ·              ────────
   ╰────
  help: Replace it with `Number.Infinity`

  ⚠ eslint-plugin-unicorn(prefer-number-properties): Use `Number.Infinity` instead of the global `Infinity`
   ╭─[prefer_number_properties.tsx:1:15]
 1 │ const {foo = -Infinity} = {};
   ·               ────────
   ╰────
  help: Replace it with `Number.Infinity`

  ⚠ eslint-plugin-unicorn(prefer-number-properties): Use `Number.Infinity` instead of the global `Infinity`
   ╭─[prefer_number_properties.tsx:1:13]
 1 │ const foo = Infinity.toString();
   ·             ────────
   ╰────
  help: Replace it with `Number.Infinity`

  ⚠ eslint-plugin-unicorn(prefer-number-properties): Use `Number.Infinity` instead of the global `Infinity`
   ╭─[prefer_number_properties.tsx:1:14]
 1 │ const foo = -Infinity.toString();
   ·              ────────
   ╰────
  help: Replace it with `Number.Infinity`

  ⚠ eslint-plugin-unicorn(prefer-number-properties): Use `Number.Infinity` instead of the global `Infinity`
   ╭─[prefer_number_properties.tsx:1:15]
 1 │ const foo = (-Infinity).toString();
   ·               ────────
   ╰────
  help: Replace it with `Number.Infinity`

  ⚠ eslint-plugin-unicorn(prefer-number-properties): Use `Number.Infinity` instead of the global `Infinity`
   ╭─[prefer_number_properties.tsx:1:14]
 1 │ const foo = +Infinity;
   ·              ────────
   ╰────
  help: Replace it with `Number.Infinity`

  ⚠ eslint-plugin-unicorn(prefer-number-properties): Use `Number.Infinity` instead of the global `Infinity`
   ╭─[prefer_number_properties.tsx:1:15]
 1 │ const foo = +-Infinity;
   ·               ────────
   ╰────
  help: Replace it with `Number.Infinity`

  ⚠ eslint-plugin-unicorn(prefer-number-properties): Use `Number.Infinity` instead of the global `Infinity`
   ╭─[prefer_number_properties.tsx:1:14]
 1 │ const foo = -Infinity;
   ·              ────────
   ╰────
  help: Replace it with `Number.Infinity`

  ⚠ eslint-plugin-unicorn(prefer-number-properties): Use `Number.Infinity` instead of the global `Infinity`
   ╭─[prefer_number_properties.tsx:1:16]
 1 │ const foo = -(-Infinity);
   ·                ────────
   ╰────
  help: Replace it with `Number.Infinity`

  ⚠ eslint-plugin-unicorn(prefer-number-properties): Use `Number.Infinity` instead of the global `Infinity`
   ╭─[prefer_number_properties.tsx:1:17]
 1 │ const foo = 1 - Infinity;
   ·                 ────────
   ╰────
  help: Replace it with `Number.Infinity`

  ⚠ eslint-plugin-unicorn(prefer-number-properties): Use `Number.Infinity` instead of the global `Infinity`
   ╭─[prefer_number_properties.tsx:1:18]
 1 │ const foo = 1 - -Infinity;
   ·                  ────────
   ╰────
  help: Replace it with `Number.Infinity`

  ⚠ eslint-plugin-unicorn(prefer-number-properties): Use `Number.Infinity` instead of the global `Infinity`
   ╭─[prefer_number_properties.tsx:1:62]
 1 │ const isPositiveZero = value => value === 0 && 1 / value === Infinity;
   ·                                                              ────────
   ╰────
  help: Replace it with `Number.Infinity`

  ⚠ eslint-plugin-unicorn(prefer-number-properties): Use `Number.Infinity` instead of the global `Infinity`
   ╭─[prefer_number_properties.tsx:1:63]
 1 │ const isNegativeZero = value => value === 0 && 1 / value === -Infinity;
   ·                                                               ────────
   ╰────
  help: Replace it with `Number.Infinity`

  ⚠ eslint-plugin-unicorn(prefer-number-properties): Use `Number.NaN` instead of the global `NaN`
   ╭─[prefer_number_properties.tsx:1:12]
 1 │ const {a = NaN} = {};
   ·            ───
   ╰────
  help: Replace it with `Number.NaN`

  ⚠ eslint-plugin-unicorn(prefer-number-properties): Use `Number.NaN` instead of the global `NaN`
   ╭─[prefer_number_properties.tsx:1:9]
 1 │ const {[NaN]: a = NaN} = {};
   ·         ───
   ╰────
  help: Replace it with `Number.NaN`

  ⚠ eslint-plugin-unicorn(prefer-number-properties): Use `Number.NaN` instead of the global `NaN`
   ╭─[prefer_number_properties.tsx:1:19]
 1 │ const {[NaN]: a = NaN} = {};
   ·                   ───
   ╰────
  help: Replace it with `Number.NaN`

  ⚠ eslint-plugin-unicorn(prefer-number-properties): Use `Number.NaN` instead of the global `NaN`
   ╭─[prefer_number_properties.tsx:1:12]
 1 │ const [a = NaN] = [];
   ·            ───
   ╰────
  help: Replace it with `Number.NaN`

  ⚠ eslint-plugin-unicorn(prefer-number-properties): Use `Number.NaN` instead of the global `NaN`
   ╭─[prefer_number_properties.tsx:1:19]
 1 │ function foo({a = NaN}) {}
   ·                   ───
   ╰────
  help: Replace it with `Number.NaN`

  ⚠ eslint-plugin-unicorn(prefer-number-properties): Use `Number.NaN` instead of the global `NaN`
   ╭─[prefer_number_properties.tsx:1:16]
 1 │ function foo({[NaN]: a = NaN}) {}
   ·                ───
   ╰────
  help: Replace it with `Number.NaN`

  ⚠ eslint-plugin-unicorn(prefer-number-properties): Use `Number.NaN` instead of the global `NaN`
   ╭─[prefer_number_properties.tsx:1:26]
 1 │ function foo({[NaN]: a = NaN}) {}
   ·                          ───
   ╰────
  help: Replace it with `Number.NaN`

  ⚠ eslint-plugin-unicorn(prefer-number-properties): Use `Number.NaN` instead of the global `NaN`
   ╭─[prefer_number_properties.tsx:1:19]
 1 │ function foo([a = NaN]) {}
   ·                   ───
   ╰────
  help: Replace it with `Number.NaN`

  ⚠ eslint-plugin-unicorn(prefer-number-properties): Use `Number.Infinity` instead of the global `Infinity`
   ╭─[prefer_number_properties.tsx:1:24]
 1 │ function foo() {return-Infinity}
   ·                        ────────
   ╰────
  help: Replace it with `Number.Infinity`

  ⚠ eslint-plugin-unicorn(prefer-number-properties): Use `Number.isNaN` instead of the global `isNaN`
   ╭─[prefer_number_properties.tsx:1:1]
 1 │ globalThis.isNaN(foo);
   · ────────────────
   ╰────
  help: Replace it with `Number.isNaN`

  ⚠ eslint-plugin-unicorn(prefer-number-properties): Use `Number.isNaN` instead of the global `isNaN`
   ╭─[prefer_number_properties.tsx:1:1]
 1 │ global.isNaN(foo);
   · ────────────
   ╰────
  help: Replace it with `Number.isNaN`

  ⚠ eslint-plugin-unicorn(prefer-number-properties): Use `Number.isNaN` instead of the global `isNaN`
   ╭─[prefer_number_properties.tsx:1:1]
 1 │ window.isNaN(foo);
   · ────────────
   ╰────
  help: Replace it with `Number.isNaN`

  ⚠ eslint-plugin-unicorn(prefer-number-properties): Use `Number.isNaN` instead of the global `isNaN`
   ╭─[prefer_number_properties.tsx:1:1]
 1 │ self.isNaN(foo);
   · ──────────
   ╰────
  help: Replace it with `Number.isNaN`

  ⚠ eslint-plugin-unicorn(prefer-number-properties): Use `Number.parseFloat` instead of the global `parseFloat`
   ╭─[prefer_number_properties.tsx:1:1]
 1 │ globalThis.parseFloat(foo);
   · ─────────────────────
   ╰────
  help: Replace it with `Number.parseFloat`

  ⚠ eslint-plugin-unicorn(prefer-number-properties): Use `Number.parseFloat` instead of the global `parseFloat`
   ╭─[prefer_number_properties.tsx:1:1]
 1 │ global.parseFloat(foo);
   · ─────────────────
   ╰────
  help: Replace it with `Number.parseFloat`

  ⚠ eslint-plugin-unicorn(prefer-number-properties): Use `Number.parseFloat` instead of the global `parseFloat`
   ╭─[prefer_number_properties.tsx:1:1]
 1 │ window.parseFloat(foo);
   · ─────────────────
   ╰────
  help: Replace it with `Number.parseFloat`

  ⚠ eslint-plugin-unicorn(prefer-number-properties): Use `Number.parseFloat` instead of the global `parseFloat`
   ╭─[prefer_number_properties.tsx:1:1]
 1 │ self.parseFloat(foo);
   · ───────────────
   ╰────
  help: Replace it with `Number.parseFloat`

  ⚠ eslint-plugin-unicorn(prefer-number-properties): Use `Number.NaN` instead of the global `NaN`
   ╭─[prefer_number_properties.tsx:1:1]
 1 │ globalThis.NaN
   · ──────────────
   ╰────
  help: Replace it with `Number.NaN`

  ⚠ eslint-plugin-unicorn(prefer-number-properties): Use `Number.Infinity` instead of the global `Infinity`
   ╭─[prefer_number_properties.tsx:1:2]
 1 │ -globalThis.Infinity
   ·  ───────────────────
   ╰────
  help: Replace it with `Number.Infinity`
