Bail to break mode when a LineSuffixToken is emitted
MODIFY
packages/@romejs/js-formatter/Printer.ts
packages/@romejs/js-formatter/Printer.ts
@@ -180,7 +180,11 @@ function print(token: Token, state: State, options: PrinterOptions): void {
}
case 'LineSuffix': {
+ if (state.flat) {
+ throw new BreakError();
+ } else {
state.lineSuffixes.push([token.contents, state]);
+ }
break;
}

Bail to break mode when a LineSuffixToken is emitted