--- source: crates/biome_js_analyze/tests/spec_tests.rs expression: invalid.jsonc --- # Input ```cjs const isZero = a == 0; ``` # Diagnostics ``` invalid.jsonc:1:18 lint/suspicious/noDoubleEquals FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Use === instead of == > 1 │ const isZero = a == 0; │ ^^ i == is only allowed when comparing against null > 1 │ const isZero = a == 0; │ ^^ i Using == may be unsafe if you are relying on type coercion i Unsafe fix: Use === 1 │ const·isZero·=·a·===·0; │ + ``` # Input ```cjs const isNonZero = a != 0; ``` # Diagnostics ``` invalid.jsonc:1:21 lint/suspicious/noDoubleEquals FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Use !== instead of != > 1 │ const isNonZero = a != 0; │ ^^ i != is only allowed when comparing against null > 1 │ const isNonZero = a != 0; │ ^^ i Using != may be unsafe if you are relying on type coercion i Unsafe fix: Use !== 1 │ const·isNonZero·=·a·!==·0; │ + ```