--- source: crates/biome_formatter_test/src/snapshot_builder.rs info: js/babel-plugins/async-do-expressions.js --- # Input ```js async do { await requestAPI().json() }; ``` # Prettier differences ```diff --- Prettier +++ Biome @@ -1,3 +1,2 @@ -(async do { - await requestAPI().json(); -}); +async; +do { await requestAPI().json() }; ``` # Output ```js async; do { await requestAPI().json() }; ``` # Errors ``` async-do-expressions.js:1:7 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ × Expected a semicolon or an implicit semicolon after a statement, but found none > 1 │ async do { await requestAPI().json() }; │ ^^ 2 │ i An explicit or implicit semicolon is expected here... > 1 │ async do { await requestAPI().json() }; │ ^^ 2 │ i ...Which is required to end this statement > 1 │ async do { await requestAPI().json() }; │ ^^^^^^^^ 2 │ async-do-expressions.js:1:39 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ × expected `while` but instead found `;` > 1 │ async do { await requestAPI().json() }; │ ^ 2 │ i Remove ; ```