--- source: crates/biome_formatter_test/src/snapshot_builder.rs info: js/babel-plugins/module-blocks.js --- # Input ```js let m = module { export let m = 2; export let n = 3; }; ``` # Prettier differences ```diff --- Prettier +++ Biome @@ -1,4 +1,5 @@ -let m = module { +let m = module; +{ export let m = 2; export let n = 3; -}; +} ``` # Output ```js let m = module; { export let m = 2; export let n = 3; } ``` # Errors ``` module-blocks.js:1:16 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ × Expected a semicolon or an implicit semicolon after a statement, but found none > 1 │ let m = module { │ ^ 2 │ export let m = 2; 3 │ export let n = 3; i An explicit or implicit semicolon is expected here... > 1 │ let m = module { │ ^ 2 │ export let m = 2; 3 │ export let n = 3; i ...Which is required to end this statement > 1 │ let m = module { │ ^^^^^^^^^^^^^^^ 2 │ export let m = 2; 3 │ export let n = 3; module-blocks.js:2:3 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ × Illegal use of an export declaration not at the top level 1 │ let m = module { > 2 │ export let m = 2; │ ^^^^^^^^^^^^^^^^^ 3 │ export let n = 3; 4 │ }; i move this declaration to the top level module-blocks.js:3:3 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ × Illegal use of an export declaration not at the top level 1 │ let m = module { 2 │ export let m = 2; > 3 │ export let n = 3; │ ^^^^^^^^^^^^^^^^^ 4 │ }; 5 │ i move this declaration to the top level ```