--- source: crates/biome_js_analyze/tests/spec_tests.rs expression: invalid.jsonc --- # Input ```cjs x === -0; ``` # Diagnostics ``` invalid.jsonc:1:1 lint/suspicious/noCompareNegZero FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Do not use the === operator to compare against -0. > 1 │ x === -0; │ ^^^^^^^^ i Safe fix: Replace -0 with 0 1 │ x·===·-0; │ - ``` # Input ```cjs x == -0; ``` # Diagnostics ``` invalid.jsonc:1:1 lint/suspicious/noCompareNegZero FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Do not use the == operator to compare against -0. > 1 │ x == -0; │ ^^^^^^^ i Safe fix: Replace -0 with 0 1 │ x·==·-0; │ - ``` # Input ```cjs -0 == x; ``` # Diagnostics ``` invalid.jsonc:1:1 lint/suspicious/noCompareNegZero FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Do not use the == operator to compare against -0. > 1 │ -0 == x; │ ^^^^^^^ i Safe fix: Replace -0 with 0 1 │ -0·==·x; │ - ``` # Input ```cjs x < -0; ``` # Diagnostics ``` invalid.jsonc:1:1 lint/suspicious/noCompareNegZero FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Do not use the < operator to compare against -0. > 1 │ x < -0; │ ^^^^^^ i Safe fix: Replace -0 with 0 1 │ x·<·-0; │ - ``` # Input ```cjs -0 < x; ``` # Diagnostics ``` invalid.jsonc:1:1 lint/suspicious/noCompareNegZero FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Do not use the < operator to compare against -0. > 1 │ -0 < x; │ ^^^^^^ i Safe fix: Replace -0 with 0 1 │ -0·<·x; │ - ``` # Input ```cjs x <= -0; ``` # Diagnostics ``` invalid.jsonc:1:1 lint/suspicious/noCompareNegZero FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Do not use the <= operator to compare against -0. > 1 │ x <= -0; │ ^^^^^^^ i Safe fix: Replace -0 with 0 1 │ x·<=·-0; │ - ``` # Input ```cjs -0 <= x; ``` # Diagnostics ``` invalid.jsonc:1:1 lint/suspicious/noCompareNegZero FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Do not use the <= operator to compare against -0. > 1 │ -0 <= x; │ ^^^^^^^ i Safe fix: Replace -0 with 0 1 │ -0·<=·x; │ - ``` # Input ```cjs x > -0; ``` # Diagnostics ``` invalid.jsonc:1:1 lint/suspicious/noCompareNegZero FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Do not use the > operator to compare against -0. > 1 │ x > -0; │ ^^^^^^ i Safe fix: Replace -0 with 0 1 │ x·>·-0; │ - ``` # Input ```cjs -0 > x; ``` # Diagnostics ``` invalid.jsonc:1:1 lint/suspicious/noCompareNegZero FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Do not use the > operator to compare against -0. > 1 │ -0 > x; │ ^^^^^^ i Safe fix: Replace -0 with 0 1 │ -0·>·x; │ - ``` # Input ```cjs x >= -0; ``` # Diagnostics ``` invalid.jsonc:1:1 lint/suspicious/noCompareNegZero FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Do not use the >= operator to compare against -0. > 1 │ x >= -0; │ ^^^^^^^ i Safe fix: Replace -0 with 0 1 │ x·>=·-0; │ - ``` # Input ```cjs -0 >= x; ``` # Diagnostics ``` invalid.jsonc:1:1 lint/suspicious/noCompareNegZero FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Do not use the >= operator to compare against -0. > 1 │ -0 >= x; │ ^^^^^^^ i Safe fix: Replace -0 with 0 1 │ -0·>=·x; │ - ``` # Input ```cjs x != -0; ``` # Diagnostics ``` invalid.jsonc:1:1 lint/suspicious/noCompareNegZero FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Do not use the != operator to compare against -0. > 1 │ x != -0; │ ^^^^^^^ i Safe fix: Replace -0 with 0 1 │ x·!=·-0; │ - ``` # Input ```cjs -0 != x; ``` # Diagnostics ``` invalid.jsonc:1:1 lint/suspicious/noCompareNegZero FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Do not use the != operator to compare against -0. > 1 │ -0 != x; │ ^^^^^^^ i Safe fix: Replace -0 with 0 1 │ -0·!=·x; │ - ``` # Input ```cjs -0 !== x; ``` # Diagnostics ``` invalid.jsonc:1:1 lint/suspicious/noCompareNegZero FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Do not use the !== operator to compare against -0. > 1 │ -0 !== x; │ ^^^^^^^^ i Safe fix: Replace -0 with 0 1 │ -0·!==·x; │ - ``` # Input ```cjs -0 === -0; ``` # Diagnostics ``` invalid.jsonc:1:1 lint/suspicious/noCompareNegZero FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Do not use the === operator to compare against -0. > 1 │ -0 === -0; │ ^^^^^^^^^ i Safe fix: Replace -0 with 0 1 │ -0·===·-0; │ - - ```