diff --git a/crates/biome_js_analyze/tests/specs/nursery/useConsistentObjectDefinition/invalidExplicit.js.snap b/crates/biome_js_analyze/tests/specs/nursery/useConsistentObjectDefinition/invalidExplicit.js.snap index 89729a97884a..eb35befe7810 100644 --- a/crates/biome_js_analyze/tests/specs/nursery/useConsistentObjectDefinition/invalidExplicit.js.snap +++ b/crates/biome_js_analyze/tests/specs/nursery/useConsistentObjectDefinition/invalidExplicit.js.snap @@ -1,6 +1,7 @@ --- source: crates/biome_js_analyze/tests/spec_tests.rs expression: invalidExplicit.js +snapshot_kind: text --- # Input ```js @@ -31,7 +32,7 @@ const invalidExplicit = { ``` invalidExplicit.js:3:5 lint/nursery/useConsistentObjectDefinition ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ - ! Do not use explicit object property syntax when shorthand syntax is possible. + × Do not use explicit object property syntax when shorthand syntax is possible. 1 │ const invalidExplicit = { 2 │ // Basic property shorthand violations @@ -48,7 +49,7 @@ invalidExplicit.js:3:5 lint/nursery/useConsistentObjectDefinition ━━━━ ``` invalidExplicit.js:4:5 lint/nursery/useConsistentObjectDefinition ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ - ! Do not use explicit object property syntax when shorthand syntax is possible. + × Do not use explicit object property syntax when shorthand syntax is possible. 2 │ // Basic property shorthand violations 3 │ foo: foo, @@ -65,7 +66,7 @@ invalidExplicit.js:4:5 lint/nursery/useConsistentObjectDefinition ━━━━ ``` invalidExplicit.js:5:5 lint/nursery/useConsistentObjectDefinition ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ - ! Do not use explicit object property syntax when shorthand syntax is possible. + × Do not use explicit object property syntax when shorthand syntax is possible. 3 │ foo: foo, 4 │ bar: bar, @@ -82,7 +83,7 @@ invalidExplicit.js:5:5 lint/nursery/useConsistentObjectDefinition ━━━━ ``` invalidExplicit.js:8:5 lint/nursery/useConsistentObjectDefinition ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ - ! Do not use explicit object property syntax when shorthand syntax is possible. + × Do not use explicit object property syntax when shorthand syntax is possible. 7 │ // Method shorthand violations > 8 │ method: function () { return "method"; }, @@ -98,7 +99,7 @@ invalidExplicit.js:8:5 lint/nursery/useConsistentObjectDefinition ━━━━ ``` invalidExplicit.js:9:5 lint/nursery/useConsistentObjectDefinition ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ - ! Do not use explicit object property syntax when shorthand syntax is possible. + × Do not use explicit object property syntax when shorthand syntax is possible. 7 │ // Method shorthand violations 8 │ method: function () { return "method"; }, @@ -115,7 +116,7 @@ invalidExplicit.js:9:5 lint/nursery/useConsistentObjectDefinition ━━━━ ``` invalidExplicit.js:10:5 lint/nursery/useConsistentObjectDefinition ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ - ! Do not use explicit object property syntax when shorthand syntax is possible. + × Do not use explicit object property syntax when shorthand syntax is possible. 8 │ method: function () { return "method"; }, 9 │ async: async function () { return "async"; }, @@ -132,7 +133,7 @@ invalidExplicit.js:10:5 lint/nursery/useConsistentObjectDefinition ━━━━ ``` invalidExplicit.js:11:5 lint/nursery/useConsistentObjectDefinition ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ - ! Do not use explicit object property syntax when shorthand syntax is possible. + × Do not use explicit object property syntax when shorthand syntax is possible. 9 │ async: async function () { return "async"; }, 10 │ generator: function* () { yield "gen"; }, @@ -149,7 +150,7 @@ invalidExplicit.js:11:5 lint/nursery/useConsistentObjectDefinition ━━━━ ``` invalidExplicit.js:14:5 lint/nursery/useConsistentObjectDefinition ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ - ! Do not use explicit object property syntax when shorthand syntax is possible. + × Do not use explicit object property syntax when shorthand syntax is possible. 13 │ // Computed methods shorthand violations > 14 │ [computed]: function () { return "computed"; }, @@ -165,7 +166,7 @@ invalidExplicit.js:14:5 lint/nursery/useConsistentObjectDefinition ━━━━ ``` invalidExplicit.js:15:5 lint/nursery/useConsistentObjectDefinition ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ - ! Do not use explicit object property syntax when shorthand syntax is possible. + × Do not use explicit object property syntax when shorthand syntax is possible. 13 │ // Computed methods shorthand violations 14 │ [computed]: function () { return "computed"; }, @@ -182,7 +183,7 @@ invalidExplicit.js:15:5 lint/nursery/useConsistentObjectDefinition ━━━━ ``` invalidExplicit.js:16:5 lint/nursery/useConsistentObjectDefinition ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ - ! Do not use explicit object property syntax when shorthand syntax is possible. + × Do not use explicit object property syntax when shorthand syntax is possible. 14 │ [computed]: function () { return "computed"; }, 15 │ [computed]: async function () { return "async computed"; }, @@ -199,7 +200,7 @@ invalidExplicit.js:16:5 lint/nursery/useConsistentObjectDefinition ━━━━ ``` invalidExplicit.js:17:5 lint/nursery/useConsistentObjectDefinition ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ - ! Do not use explicit object property syntax when shorthand syntax is possible. + × Do not use explicit object property syntax when shorthand syntax is possible. 15 │ [computed]: async function () { return "async computed"; }, 16 │ [computed]: function* () { yield "computed gen"; }, @@ -216,7 +217,7 @@ invalidExplicit.js:17:5 lint/nursery/useConsistentObjectDefinition ━━━━ ``` invalidExplicit.js:18:5 lint/nursery/useConsistentObjectDefinition ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ - ! Do not use explicit object property syntax when shorthand syntax is possible. + × Do not use explicit object property syntax when shorthand syntax is possible. 16 │ [computed]: function* () { yield "computed gen"; }, 17 │ ["computed-string"]: function () { return "computed string"; }, @@ -233,7 +234,7 @@ invalidExplicit.js:18:5 lint/nursery/useConsistentObjectDefinition ━━━━ ``` invalidExplicit.js:19:5 lint/nursery/useConsistentObjectDefinition ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ - ! Do not use explicit object property syntax when shorthand syntax is possible. + × Do not use explicit object property syntax when shorthand syntax is possible. 17 │ ["computed-string"]: function () { return "computed string"; }, 18 │ ["comp" + "uted" + "-con" + "cat"]: function () { return "computed concat"; }, diff --git a/crates/biome_js_analyze/tests/specs/nursery/useConsistentObjectDefinition/invalidShorthand.js.snap b/crates/biome_js_analyze/tests/specs/nursery/useConsistentObjectDefinition/invalidShorthand.js.snap index 357a1da6fc25..4085b0bdf4db 100644 --- a/crates/biome_js_analyze/tests/specs/nursery/useConsistentObjectDefinition/invalidShorthand.js.snap +++ b/crates/biome_js_analyze/tests/specs/nursery/useConsistentObjectDefinition/invalidShorthand.js.snap @@ -1,6 +1,7 @@ --- source: crates/biome_js_analyze/tests/spec_tests.rs expression: invalidShorthand.js +snapshot_kind: text --- # Input ```js @@ -35,7 +36,7 @@ const invalidShorthand = { ``` invalidShorthand.js:3:5 lint/nursery/useConsistentObjectDefinition ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ - ! Do not use shorthand object property syntax. + × Do not use shorthand object property syntax. 1 │ const invalidShorthand = { 2 │ // Basic property explicit violations @@ -52,7 +53,7 @@ invalidShorthand.js:3:5 lint/nursery/useConsistentObjectDefinition ━━━━ ``` invalidShorthand.js:4:5 lint/nursery/useConsistentObjectDefinition ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ - ! Do not use shorthand object property syntax. + × Do not use shorthand object property syntax. 2 │ // Basic property explicit violations 3 │ prop, @@ -69,7 +70,7 @@ invalidShorthand.js:4:5 lint/nursery/useConsistentObjectDefinition ━━━━ ``` invalidShorthand.js:7:5 lint/nursery/useConsistentObjectDefinition ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ - ! Do not use shorthand object property syntax. + × Do not use shorthand object property syntax. 6 │ // Method explicit violations > 7 │ method() { return "method"; }, @@ -85,7 +86,7 @@ invalidShorthand.js:7:5 lint/nursery/useConsistentObjectDefinition ━━━━ ``` invalidShorthand.js:8:5 lint/nursery/useConsistentObjectDefinition ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ - ! Do not use shorthand object property syntax. + × Do not use shorthand object property syntax. 6 │ // Method explicit violations 7 │ method() { return "method"; }, @@ -102,7 +103,7 @@ invalidShorthand.js:8:5 lint/nursery/useConsistentObjectDefinition ━━━━ ``` invalidShorthand.js:9:5 lint/nursery/useConsistentObjectDefinition ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ - ! Do not use shorthand object property syntax. + × Do not use shorthand object property syntax. 7 │ method() { return "method"; }, 8 │ async async() { return "async"; }, @@ -119,7 +120,7 @@ invalidShorthand.js:9:5 lint/nursery/useConsistentObjectDefinition ━━━━ ``` invalidShorthand.js:10:5 lint/nursery/useConsistentObjectDefinition ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ - ! Do not use shorthand object property syntax. + × Do not use shorthand object property syntax. 8 │ async async() { return "async"; }, 9 │ *generator() { yield "gen"; }, @@ -136,7 +137,7 @@ invalidShorthand.js:10:5 lint/nursery/useConsistentObjectDefinition ━━━━ ``` invalidShorthand.js:13:5 lint/nursery/useConsistentObjectDefinition ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ - ! Do not use shorthand object property syntax. + × Do not use shorthand object property syntax. 12 │ // Computed methods > 13 │ [computed]() { return "computed"; }, @@ -152,7 +153,7 @@ invalidShorthand.js:13:5 lint/nursery/useConsistentObjectDefinition ━━━━ ``` invalidShorthand.js:14:5 lint/nursery/useConsistentObjectDefinition ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ - ! Do not use shorthand object property syntax. + × Do not use shorthand object property syntax. 12 │ // Computed methods 13 │ [computed]() { return "computed"; }, @@ -169,7 +170,7 @@ invalidShorthand.js:14:5 lint/nursery/useConsistentObjectDefinition ━━━━ ``` invalidShorthand.js:15:5 lint/nursery/useConsistentObjectDefinition ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ - ! Do not use shorthand object property syntax. + × Do not use shorthand object property syntax. 13 │ [computed]() { return "computed"; }, 14 │ async [computed]() { return "async computed"; }, @@ -186,7 +187,7 @@ invalidShorthand.js:15:5 lint/nursery/useConsistentObjectDefinition ━━━━ ``` invalidShorthand.js:16:5 lint/nursery/useConsistentObjectDefinition ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ - ! Do not use shorthand object property syntax. + × Do not use shorthand object property syntax. 14 │ async [computed]() { return "async computed"; }, 15 │ *[computed]() { yield "computed gen"; }, @@ -203,7 +204,7 @@ invalidShorthand.js:16:5 lint/nursery/useConsistentObjectDefinition ━━━━ ``` invalidShorthand.js:17:5 lint/nursery/useConsistentObjectDefinition ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ - ! Do not use shorthand object property syntax. + × Do not use shorthand object property syntax. 15 │ *[computed]() { yield "computed gen"; }, 16 │ ["computed-string"]() { return "computed string"; }, @@ -220,7 +221,7 @@ invalidShorthand.js:17:5 lint/nursery/useConsistentObjectDefinition ━━━━ ``` invalidShorthand.js:18:5 lint/nursery/useConsistentObjectDefinition ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ - ! Do not use shorthand object property syntax. + × Do not use shorthand object property syntax. 16 │ ["computed-string"]() { return "computed string"; }, 17 │ ["comp" + "uted" + "-con" + "cat"]() { return "computed concat"; }, @@ -237,7 +238,7 @@ invalidShorthand.js:18:5 lint/nursery/useConsistentObjectDefinition ━━━━ ``` invalidShorthand.js:21:5 lint/nursery/useConsistentObjectDefinition ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ - ! Do not use shorthand object property syntax. + × Do not use shorthand object property syntax. 20 │ // String literal methods > 21 │ 'quotedMethod'() { return "quoted"; }, @@ -253,7 +254,7 @@ invalidShorthand.js:21:5 lint/nursery/useConsistentObjectDefinition ━━━━ ``` invalidShorthand.js:22:5 lint/nursery/useConsistentObjectDefinition ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ - ! Do not use shorthand object property syntax. + × Do not use shorthand object property syntax. 20 │ // String literal methods 21 │ 'quotedMethod'() { return "quoted"; }, @@ -270,7 +271,7 @@ invalidShorthand.js:22:5 lint/nursery/useConsistentObjectDefinition ━━━━ ``` invalidShorthand.js:23:5 lint/nursery/useConsistentObjectDefinition ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ - ! Do not use shorthand object property syntax. + × Do not use shorthand object property syntax. 21 │ 'quotedMethod'() { return "quoted"; }, 22 │ "doubleQuoted"() { return "double quoted"; },