--- source: crates/biome_js_analyze/tests/spec_tests.rs expression: invalid.jsonc --- # Input ```cjs if (x === x) { } ``` # Diagnostics ``` invalid.jsonc:1:5 lint/suspicious/noSelfCompare ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Comparing to itself is potentially pointless. > 1 │ if (x === x) { } │ ^^^^^^^ ``` # Input ```cjs if (x !== x) { } ``` # Diagnostics ``` invalid.jsonc:1:5 lint/suspicious/noSelfCompare ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Comparing to itself is potentially pointless. > 1 │ if (x !== x) { } │ ^^^^^^^ ``` # Input ```cjs if (x > x) { } ``` # Diagnostics ``` invalid.jsonc:1:5 lint/suspicious/noSelfCompare ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Comparing to itself is potentially pointless. > 1 │ if (x > x) { } │ ^^^^^ ``` # Input ```cjs if ('x' > 'x') { } ``` # Diagnostics ``` invalid.jsonc:1:5 lint/suspicious/noSelfCompare ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Comparing to itself is potentially pointless. > 1 │ if ('x' > 'x') { } │ ^^^^^^^^^ ``` # Input ```cjs if ('x' > 'x') { } ``` # Diagnostics ``` invalid.jsonc:1:5 lint/suspicious/noSelfCompare ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Comparing to itself is potentially pointless. > 1 │ if ('x' > 'x') { } │ ^^^^^^^^^ ``` # Input ```cjs do {} while (x === x) ``` # Diagnostics ``` invalid.jsonc:1:14 lint/suspicious/noSelfCompare ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Comparing to itself is potentially pointless. > 1 │ do {} while (x === x) │ ^^^^^^^ ``` # Input ```cjs x === x ``` # Diagnostics ``` invalid.jsonc:1:1 lint/suspicious/noSelfCompare ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Comparing to itself is potentially pointless. > 1 │ x === x │ ^^^^^^^ ``` # Input ```cjs x !== x ``` # Diagnostics ``` invalid.jsonc:1:1 lint/suspicious/noSelfCompare ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Comparing to itself is potentially pointless. > 1 │ x !== x │ ^^^^^^^ ``` # Input ```cjs x == x ``` # Diagnostics ``` invalid.jsonc:1:1 lint/suspicious/noSelfCompare ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Comparing to itself is potentially pointless. > 1 │ x == x │ ^^^^^^ ``` # Input ```cjs x != x ``` # Diagnostics ``` invalid.jsonc:1:1 lint/suspicious/noSelfCompare ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Comparing to itself is potentially pointless. > 1 │ x != x │ ^^^^^^ ``` # Input ```cjs x > x ``` # Diagnostics ``` invalid.jsonc:1:1 lint/suspicious/noSelfCompare ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Comparing to itself is potentially pointless. > 1 │ x > x │ ^^^^^ ``` # Input ```cjs x < x ``` # Diagnostics ``` invalid.jsonc:1:1 lint/suspicious/noSelfCompare ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Comparing to itself is potentially pointless. > 1 │ x < x │ ^^^^^ ``` # Input ```cjs x >= x ``` # Diagnostics ``` invalid.jsonc:1:1 lint/suspicious/noSelfCompare ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Comparing to itself is potentially pointless. > 1 │ x >= x │ ^^^^^^ ``` # Input ```cjs x <= x ``` # Diagnostics ``` invalid.jsonc:1:1 lint/suspicious/noSelfCompare ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Comparing to itself is potentially pointless. > 1 │ x <= x │ ^^^^^^ ``` # Input ```cjs foo.bar().baz.qux >= foo.bar ().baz .qux ``` # Diagnostics ``` invalid.jsonc:1:1 lint/suspicious/noSelfCompare ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Comparing to itself is potentially pointless. > 1 │ foo.bar().baz.qux >= foo.bar ().baz .qux │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ``` # Input ```cjs class C { #field; foo() { this.#field === this.#field; } } ``` # Diagnostics ``` invalid.jsonc:1:27 lint/suspicious/noSelfCompare ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Comparing to itself is potentially pointless. > 1 │ class C { #field; foo() { this.#field === this.#field; } } │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ```