---
source: crates/oxc_linter/src/tester.rs
expression: no_compare_neg_zero
---
  ⚠ eslint(no-compare-neg-zero): Do not use the === operator to compare against -0.
   ╭─[no_compare_neg_zero.tsx:1:1]
 1 │ x === -0
   · ────────
   ╰────
  help: Use Object.is(x, -0) to test equality with -0 and use 0 for other cases

  ⚠ eslint(no-compare-neg-zero): Do not use the === operator to compare against -0.
   ╭─[no_compare_neg_zero.tsx:1:1]
 1 │ -0 === x
   · ────────
   ╰────
  help: Use Object.is(x, -0) to test equality with -0 and use 0 for other cases

  ⚠ eslint(no-compare-neg-zero): Do not use the == operator to compare against -0.
   ╭─[no_compare_neg_zero.tsx:1:1]
 1 │ x == -0
   · ───────
   ╰────
  help: Use Object.is(x, -0) to test equality with -0 and use 0 for other cases

  ⚠ eslint(no-compare-neg-zero): Do not use the == operator to compare against -0.
   ╭─[no_compare_neg_zero.tsx:1:1]
 1 │ -0 == x
   · ───────
   ╰────
  help: Use Object.is(x, -0) to test equality with -0 and use 0 for other cases

  ⚠ eslint(no-compare-neg-zero): Do not use the > operator to compare against -0.
   ╭─[no_compare_neg_zero.tsx:1:1]
 1 │ x > -0
   · ──────
   ╰────
  help: Use Object.is(x, -0) to test equality with -0 and use 0 for other cases

  ⚠ eslint(no-compare-neg-zero): Do not use the > operator to compare against -0.
   ╭─[no_compare_neg_zero.tsx:1:1]
 1 │ -0 > x
   · ──────
   ╰────
  help: Use Object.is(x, -0) to test equality with -0 and use 0 for other cases

  ⚠ eslint(no-compare-neg-zero): Do not use the >= operator to compare against -0.
   ╭─[no_compare_neg_zero.tsx:1:1]
 1 │ x >= -0
   · ───────
   ╰────
  help: Use Object.is(x, -0) to test equality with -0 and use 0 for other cases

  ⚠ eslint(no-compare-neg-zero): Do not use the >= operator to compare against -0.
   ╭─[no_compare_neg_zero.tsx:1:1]
 1 │ -0 >= x
   · ───────
   ╰────
  help: Use Object.is(x, -0) to test equality with -0 and use 0 for other cases

  ⚠ eslint(no-compare-neg-zero): Do not use the < operator to compare against -0.
   ╭─[no_compare_neg_zero.tsx:1:1]
 1 │ x < -0
   · ──────
   ╰────
  help: Use Object.is(x, -0) to test equality with -0 and use 0 for other cases

  ⚠ eslint(no-compare-neg-zero): Do not use the < operator to compare against -0.
   ╭─[no_compare_neg_zero.tsx:1:1]
 1 │ -0 < x
   · ──────
   ╰────
  help: Use Object.is(x, -0) to test equality with -0 and use 0 for other cases

  ⚠ eslint(no-compare-neg-zero): Do not use the <= operator to compare against -0.
   ╭─[no_compare_neg_zero.tsx:1:1]
 1 │ x <= -0
   · ───────
   ╰────
  help: Use Object.is(x, -0) to test equality with -0 and use 0 for other cases

  ⚠ eslint(no-compare-neg-zero): Do not use the <= operator to compare against -0.
   ╭─[no_compare_neg_zero.tsx:1:1]
 1 │ -0 <= x
   · ───────
   ╰────
  help: Use Object.is(x, -0) to test equality with -0 and use 0 for other cases

  ⚠ eslint(no-compare-neg-zero): Do not use the <= operator to compare against -0.
   ╭─[no_compare_neg_zero.tsx:1:1]
 1 │ -0n <= x
   · ────────
   ╰────
  help: Use Object.is(x, -0) to test equality with -0 and use 0 for other cases


