--- source: crates/rome_formatter_test/src/snapshot_builder.rs info: test_file: js/exports/test.js --- # Input ```js export { value1, value2 as value2_renamed, value3, value4 as value4_renamed, value5 } from "exports"; export a,{b} from "./baz"; export * as ns from "mod"; export * as foo,{bar} from "./baz"; export { undefinedExport }; ``` # Prettier differences ```diff --- Prettier +++ Rome @@ -6,10 +6,19 @@ value5, } from "exports"; -export a, { b } from "./baz"; +export +a, { b }; +from; +("./baz"); export * as ns from "mod"; -export * as foo, { bar } from "./baz"; +export * as foo +, +{ + bar; +} +from; +("./baz"); export { undefinedExport }; ``` # Output ```js export { value1, value2 as value2_renamed, value3, value4 as value4_renamed, value5, } from "exports"; export a, { b }; from; ("./baz"); export * as ns from "mod"; export * as foo , { bar; } from; ("./baz"); export { undefinedExport }; ``` # Errors ``` test.js:3:8 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ × expected a class, a function, or a variable declaration but instead found 'a' 1 │ export { value1, value2 as value2_renamed, value3, value4 as value4_renamed, value5 } from "exports"; 2 │ > 3 │ export a,{b} from "./baz"; │ ^ 4 │ 5 │ export * as ns from "mod"; i Expected a class, a function, or a variable declaration here 1 │ export { value1, value2 as value2_renamed, value3, value4 as value4_renamed, value5 } from "exports"; 2 │ > 3 │ export a,{b} from "./baz"; │ ^ 4 │ 5 │ export * as ns from "mod"; test.js:3:14 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ × Expected a semicolon or an implicit semicolon after a statement, but found none 1 │ export { value1, value2 as value2_renamed, value3, value4 as value4_renamed, value5 } from "exports"; 2 │ > 3 │ export a,{b} from "./baz"; │ ^^^^ 4 │ 5 │ export * as ns from "mod"; i An explicit or implicit semicolon is expected here... 1 │ export { value1, value2 as value2_renamed, value3, value4 as value4_renamed, value5 } from "exports"; 2 │ > 3 │ export a,{b} from "./baz"; │ ^^^^ 4 │ 5 │ export * as ns from "mod"; i ...Which is required to end this statement 1 │ export { value1, value2 as value2_renamed, value3, value4 as value4_renamed, value5 } from "exports"; 2 │ > 3 │ export a,{b} from "./baz"; │ ^^^^^^^^^^ 4 │ 5 │ export * as ns from "mod"; test.js:3:19 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ × Expected a semicolon or an implicit semicolon after a statement, but found none 1 │ export { value1, value2 as value2_renamed, value3, value4 as value4_renamed, value5 } from "exports"; 2 │ > 3 │ export a,{b} from "./baz"; │ ^^^^^^^ 4 │ 5 │ export * as ns from "mod"; i An explicit or implicit semicolon is expected here... 1 │ export { value1, value2 as value2_renamed, value3, value4 as value4_renamed, value5 } from "exports"; 2 │ > 3 │ export a,{b} from "./baz"; │ ^^^^^^^ 4 │ 5 │ export * as ns from "mod"; i ...Which is required to end this statement 1 │ export { value1, value2 as value2_renamed, value3, value4 as value4_renamed, value5 } from "exports"; 2 │ > 3 │ export a,{b} from "./baz"; │ ^^^^^^^^^^^^ 4 │ 5 │ export * as ns from "mod"; test.js:7:16 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ × expected `from` but instead found `,` 5 │ export * as ns from "mod"; 6 │ > 7 │ export * as foo,{bar} from "./baz"; │ ^ 8 │ 9 │ export { undefinedExport }; i Remove , test.js:7:28 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ × Expected a semicolon or an implicit semicolon after a statement, but found none 5 │ export * as ns from "mod"; 6 │ > 7 │ export * as foo,{bar} from "./baz"; │ ^^^^^^^ 8 │ 9 │ export { undefinedExport }; i An explicit or implicit semicolon is expected here... 5 │ export * as ns from "mod"; 6 │ > 7 │ export * as foo,{bar} from "./baz"; │ ^^^^^^^ 8 │ 9 │ export { undefinedExport }; i ...Which is required to end this statement 5 │ export * as ns from "mod"; 6 │ > 7 │ export * as foo,{bar} from "./baz"; │ ^^^^^^^^^^^^ 8 │ 9 │ export { undefinedExport }; ```