--- source: crates/rome_formatter_test/src/snapshot_builder.rs info: test_file: js/arrows/newline-before-arrow/newline-before-arrow.js --- # Input ```js async x => x ``` # Prettier differences ```diff --- Prettier +++ Rome @@ -1 +1,3 @@ -async (x) => x; +async; +x; +=> x ``` # Output ```js async; x; => x ``` # Errors ``` newline-before-arrow.js:1:7 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ × Expected a semicolon or an implicit semicolon after a statement, but found none > 1 │ async x │ ^ 2 │ => x 3 │ i An explicit or implicit semicolon is expected here... > 1 │ async x │ ^ 2 │ => x 3 │ i ...Which is required to end this statement > 1 │ async x │ ^^^^^^^ 2 │ => x 3 │ newline-before-arrow.js:2:1 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ × expected a statement but instead found '=> x' 1 │ async x > 2 │ => x │ ^^^^ 3 │ i Expected a statement here 1 │ async x > 2 │ => x │ ^^^^ 3 │ ```