noCompareNegZero
Ta treść nie jest jeszcze dostępna w Twoim języku.
Summary
Section titled “Summary”- Rule available since: 
v1.0.0 - Diagnostic Category: 
lint/suspicious/noCompareNegZero - This rule is recommended, which means is enabled by default.
 - This rule has a safe fix.
 - The default severity of this rule is error.
 - Sources:
- Same as 
no-compare-neg-zero 
 - Same as 
 
How to configure
Section titled “How to configure”{  "linter": {    "rules": {      "suspicious": {        "noCompareNegZero": "error"      }    }  }}Description
Section titled “Description”Disallow comparing against -0
Examples
Section titled “Examples”Invalid
Section titled “Invalid”(1 >= -0)code-block.js:1:2 lint/suspicious/noCompareNegZero  FIXABLE  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
  ✖ Do not use the >= operator to compare against -0.
  
  > 1 │ (1 >= -0)
      │  ^^^^^^^
    2 │ 
  
  ℹ Safe fix: Replace -0 with 0
  
    1 │ (1·>=·-0)
      │       -  
(1 >= 0)Related links
Section titled “Related links”Copyright (c) 2023-present Biome Developers and Contributors.