--- source: crates/biome_js_analyze/tests/spec_tests.rs expression: invalid.jsonc --- # Input ```cjs ({ a: 1, a: 2 }); ``` # Diagnostics ``` invalid.jsonc:1:4 lint/suspicious/noDuplicateObjectKeys FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This property value named a is later overwritten by an object member with the same name. > 1 │ ({ a: 1, a: 2 }); │ ^^^^ i Overwritten with this value. > 1 │ ({ a: 1, a: 2 }); │ ^^^^ i If an object property with the same name is defined multiple times (except when combining a getter with a setter), only the last definition makes it into the object and previous definitions are ignored. i Unsafe fix: Remove this property value named a 1 │ ({·a:·1,·a:·2·}); │ ------ ``` # Input ```cjs ({ a: 1, a: 2, a: 3 }); ``` # Diagnostics ``` invalid.jsonc:1:4 lint/suspicious/noDuplicateObjectKeys FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This property value named a is later overwritten by an object member with the same name. > 1 │ ({ a: 1, a: 2, a: 3 }); │ ^^^^ i Overwritten with this value. > 1 │ ({ a: 1, a: 2, a: 3 }); │ ^^^^ i If an object property with the same name is defined multiple times (except when combining a getter with a setter), only the last definition makes it into the object and previous definitions are ignored. i Unsafe fix: Remove this property value named a 1 │ ({·a:·1,·a:·2,·a:·3·}); │ ------ ``` ``` invalid.jsonc:1:10 lint/suspicious/noDuplicateObjectKeys FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This property value named a is later overwritten by an object member with the same name. > 1 │ ({ a: 1, a: 2, a: 3 }); │ ^^^^ i Overwritten with this value. > 1 │ ({ a: 1, a: 2, a: 3 }); │ ^^^^ i If an object property with the same name is defined multiple times (except when combining a getter with a setter), only the last definition makes it into the object and previous definitions are ignored. i Unsafe fix: Remove this property value named a 1 │ ({·a:·1,·a:·2,·a:·3·}); │ ------ ``` # Input ```cjs ({ '': 1, '': 2 }); ``` # Diagnostics ``` invalid.jsonc:1:4 lint/suspicious/noDuplicateObjectKeys FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This property value named is later overwritten by an object member with the same name. > 1 │ ({ '': 1, '': 2 }); │ ^^^^^ i Overwritten with this value. > 1 │ ({ '': 1, '': 2 }); │ ^^^^^ i If an object property with the same name is defined multiple times (except when combining a getter with a setter), only the last definition makes it into the object and previous definitions are ignored. i Unsafe fix: Remove this property value named 1 │ ({·'':·1,·'':·2·}); │ ------- ``` # Input ```cjs ({ z: 1, z: 2 }); ``` # Diagnostics ``` invalid.jsonc:1:4 lint/suspicious/noDuplicateObjectKeys FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This property value named z is later overwritten by an object member with the same name. > 1 │ ({ z: 1, z: 2 }); │ ^^^^ i Overwritten with this value. > 1 │ ({ z: 1, z: 2 }); │ ^^^^ i If an object property with the same name is defined multiple times (except when combining a getter with a setter), only the last definition makes it into the object and previous definitions are ignored. i Unsafe fix: Remove this property value named z 1 │ ({·z:·1,·z:·2·}); │ ------ ``` # Input ```cjs ({ get a() {}, get a() {} }); ``` # Diagnostics ``` invalid.jsonc:1:4 lint/suspicious/noDuplicateObjectKeys FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This getter named a is later overwritten by an object member with the same name. > 1 │ ({ get a() {}, get a() {} }); │ ^^^^^^^^^^ i Overwritten with this getter. > 1 │ ({ get a() {}, get a() {} }); │ ^^^^^^^^^^ i If an object property with the same name is defined multiple times (except when combining a getter with a setter), only the last definition makes it into the object and previous definitions are ignored. i Unsafe fix: Remove this getter named a 1 │ ({·get·a()·{},·get·a()·{}·}); │ ------------ ``` # Input ```cjs ({ set a(v) {}, set a(v) {} }); ``` # Diagnostics ``` invalid.jsonc:1:4 lint/suspicious/noDuplicateObjectKeys FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This setter named a is later overwritten by an object member with the same name. > 1 │ ({ set a(v) {}, set a(v) {} }); │ ^^^^^^^^^^^ i Overwritten with this setter. > 1 │ ({ set a(v) {}, set a(v) {} }); │ ^^^^^^^^^^^ i If an object property with the same name is defined multiple times (except when combining a getter with a setter), only the last definition makes it into the object and previous definitions are ignored. i Unsafe fix: Remove this setter named a 1 │ ({·set·a(v)·{},·set·a(v)·{}·}); │ ------------- ``` # Input ```cjs ({ a: 1, get a() {} }); ``` # Diagnostics ``` invalid.jsonc:1:4 lint/suspicious/noDuplicateObjectKeys FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This property value named a is later overwritten by an object member with the same name. > 1 │ ({ a: 1, get a() {} }); │ ^^^^ i Overwritten with this getter. > 1 │ ({ a: 1, get a() {} }); │ ^^^^^^^^^^ i If an object property with the same name is defined multiple times (except when combining a getter with a setter), only the last definition makes it into the object and previous definitions are ignored. i Unsafe fix: Remove this property value named a 1 │ ({·a:·1,·get·a()·{}·}); │ ------ ``` # Input ```cjs ({ a: 1, set a(v) {} }); ``` # Diagnostics ``` invalid.jsonc:1:4 lint/suspicious/noDuplicateObjectKeys FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This property value named a is later overwritten by an object member with the same name. > 1 │ ({ a: 1, set a(v) {} }); │ ^^^^ i Overwritten with this setter. > 1 │ ({ a: 1, set a(v) {} }); │ ^^^^^^^^^^^ i If an object property with the same name is defined multiple times (except when combining a getter with a setter), only the last definition makes it into the object and previous definitions are ignored. i Unsafe fix: Remove this property value named a 1 │ ({·a:·1,·set·a(v)·{}·}); │ ------ ``` # Input ```cjs ({ get a() {}, a: 1 }); ``` # Diagnostics ``` invalid.jsonc:1:4 lint/suspicious/noDuplicateObjectKeys FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This getter named a is later overwritten by an object member with the same name. > 1 │ ({ get a() {}, a: 1 }); │ ^^^^^^^^^^ i Overwritten with this value. > 1 │ ({ get a() {}, a: 1 }); │ ^^^^ i If an object property with the same name is defined multiple times (except when combining a getter with a setter), only the last definition makes it into the object and previous definitions are ignored. i Unsafe fix: Remove this getter named a 1 │ ({·get·a()·{},·a:·1·}); │ ------------ ``` # Input ```cjs ({ set a(v) {}, a: 1 }); ``` # Diagnostics ``` invalid.jsonc:1:4 lint/suspicious/noDuplicateObjectKeys FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This setter named a is later overwritten by an object member with the same name. > 1 │ ({ set a(v) {}, a: 1 }); │ ^^^^^^^^^^^ i Overwritten with this value. > 1 │ ({ set a(v) {}, a: 1 }); │ ^^^^ i If an object property with the same name is defined multiple times (except when combining a getter with a setter), only the last definition makes it into the object and previous definitions are ignored. i Unsafe fix: Remove this setter named a 1 │ ({·set·a(v)·{},·a:·1·}); │ ------------- ``` # Input ```cjs ({ a: 1, get a() {}, set a(v) {} }); ``` # Diagnostics ``` invalid.jsonc:1:4 lint/suspicious/noDuplicateObjectKeys FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This property value named a is later overwritten by an object member with the same name. > 1 │ ({ a: 1, get a() {}, set a(v) {} }); │ ^^^^ i Overwritten with this setter. > 1 │ ({ a: 1, get a() {}, set a(v) {} }); │ ^^^^^^^^^^^ i If an object property with the same name is defined multiple times (except when combining a getter with a setter), only the last definition makes it into the object and previous definitions are ignored. i Unsafe fix: Remove this property value named a 1 │ ({·a:·1,·get·a()·{},·set·a(v)·{}·}); │ ------ ``` # Input ```cjs ({ get a() {}, a: 1, set a(v) {} }); ``` # Diagnostics ``` invalid.jsonc:1:16 lint/suspicious/noDuplicateObjectKeys FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This property value named a is later overwritten by an object member with the same name. > 1 │ ({ get a() {}, a: 1, set a(v) {} }); │ ^^^^ i Overwritten with this setter. > 1 │ ({ get a() {}, a: 1, set a(v) {} }); │ ^^^^^^^^^^^ i If an object property with the same name is defined multiple times (except when combining a getter with a setter), only the last definition makes it into the object and previous definitions are ignored. i Unsafe fix: Remove this property value named a 1 │ ({·get·a()·{},·a:·1,·set·a(v)·{}·}); │ ------ ``` # Input ```cjs ({ get a() {}, set a(v) {}, a: 1 }); ``` # Diagnostics ``` invalid.jsonc:1:4 lint/suspicious/noDuplicateObjectKeys FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This getter named a is later overwritten by an object member with the same name. > 1 │ ({ get a() {}, set a(v) {}, a: 1 }); │ ^^^^^^^^^^ i Overwritten with this value. > 1 │ ({ get a() {}, set a(v) {}, a: 1 }); │ ^^^^ i If an object property with the same name is defined multiple times (except when combining a getter with a setter), only the last definition makes it into the object and previous definitions are ignored. i Unsafe fix: Remove this getter named a 1 │ ({·get·a()·{},·set·a(v)·{},·a:·1·}); │ ------------ ``` ``` invalid.jsonc:1:16 lint/suspicious/noDuplicateObjectKeys FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This setter named a is later overwritten by an object member with the same name. > 1 │ ({ get a() {}, set a(v) {}, a: 1 }); │ ^^^^^^^^^^^ i Overwritten with this value. > 1 │ ({ get a() {}, set a(v) {}, a: 1 }); │ ^^^^ i If an object property with the same name is defined multiple times (except when combining a getter with a setter), only the last definition makes it into the object and previous definitions are ignored. i Unsafe fix: Remove this setter named a 1 │ ({·get·a()·{},·set·a(v)·{},·a:·1·}); │ ------------- ```