--- source: crates/biome_formatter_test/src/snapshot_builder.rs info: js/class-extends/tuple-and-record.js --- # Input ```js class A extends {} {} class B extends #{} {} class C extends [] {} class D extends #[] {} ``` # Prettier differences ```diff --- Prettier +++ Biome @@ -1,5 +1,7 @@ class A extends ({}) {} -class B extends #{} {} +class B extends #{} +{ +} class C extends [] {} class D extends #[] {} ``` # Output ```js class A extends ({}) {} class B extends #{} { } class C extends [] {} class D extends #[] {} ``` # Errors ``` tuple-and-record.js:2:16 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ × 'extends' list cannot be empty. 1 │ class A extends {} {} > 2 │ class B extends #{} {} │ 3 │ 4 │ class C extends [] {} tuple-and-record.js:2:17 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ × expected `{` but instead found `#` 1 │ class A extends {} {} > 2 │ class B extends #{} {} │ ^ 3 │ 4 │ class C extends [] {} i Remove # tuple-and-record.js:2:18 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ × Expected an identifier but instead found '{'. 1 │ class A extends {} {} > 2 │ class B extends #{} {} │ ^ 3 │ 4 │ class C extends [] {} i Expected an identifier here. 1 │ class A extends {} {} > 2 │ class B extends #{} {} │ ^ 3 │ 4 │ class C extends [] {} tuple-and-record.js:2:17 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ × expected a semicolon to end the class property, but found none 1 │ class A extends {} {} > 2 │ class B extends #{} {} │ ^ 3 │ 4 │ class C extends [] {} tuple-and-record.js:2:18 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ × Expected an identifier, a string literal, a number literal, a private field name, or a computed name but instead found '{'. 1 │ class A extends {} {} > 2 │ class B extends #{} {} │ ^ 3 │ 4 │ class C extends [] {} i Expected an identifier, a string literal, a number literal, a private field name, or a computed name here. 1 │ class A extends {} {} > 2 │ class B extends #{} {} │ ^ 3 │ 4 │ class C extends [] {} tuple-and-record.js:5:16 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ × 'extends' list cannot be empty. 4 │ class C extends [] {} > 5 │ class D extends #[] {} │ 6 │ tuple-and-record.js:5:17 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ × expected `{` but instead found `#` 4 │ class C extends [] {} > 5 │ class D extends #[] {} │ ^ 6 │ i Remove # tuple-and-record.js:5:18 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ × Expected an identifier but instead found '['. 4 │ class C extends [] {} > 5 │ class D extends #[] {} │ ^ 6 │ i Expected an identifier here. 4 │ class C extends [] {} > 5 │ class D extends #[] {} │ ^ 6 │ tuple-and-record.js:5:17 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ × expected a semicolon to end the class property, but found none 4 │ class C extends [] {} > 5 │ class D extends #[] {} │ ^ 6 │ tuple-and-record.js:5:19 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ × Expected an expression but instead found ']'. 4 │ class C extends [] {} > 5 │ class D extends #[] {} │ ^ 6 │ i Expected an expression here. 4 │ class C extends [] {} > 5 │ class D extends #[] {} │ ^ 6 │ tuple-and-record.js:5:18 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ × expected a semicolon to end the class property, but found none 4 │ class C extends [] {} > 5 │ class D extends #[] {} │ ^^ 6 │ tuple-and-record.js:5:21 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ × Expected an identifier, a string literal, a number literal, a private field name, or a computed name but instead found '{'. 4 │ class C extends [] {} > 5 │ class D extends #[] {} │ ^ 6 │ i Expected an identifier, a string literal, a number literal, a private field name, or a computed name here. 4 │ class C extends [] {} > 5 │ class D extends #[] {} │ ^ 6 │ ```