--- source: crates/biome_formatter_test/src/snapshot_builder.rs info: js/explicit-resource-management/valid-await-using-comments.js --- # Input ```js async function f() { { /*0*/await/*1*/using/*2*/b/*3*/=/*4*/f()/*5*/; } { /*0*/for/*1*/(/*2*/await/*3*/using/*4*/b/*5*/=/*6*/x/*7*/;/*8*/;/*9*/)/*10*/; } { /*0*/for/*1*/(/*2*/await/*3*/using/*4*/b/*5*/of/*6*/x/*7*/)/*8*/; } { /*0*/for/*1*/await/*2*/(/*3*/await/*4*/using/*5*/b/*6*/of/*7*/x/*8*/)/*9*/; } } ``` # Prettier differences ```diff --- Prettier +++ Biome @@ -1,13 +1,12 @@ async function f() { { - /*0*/ await using /*1*/ /*2*/ b /*3*/ = /*4*/ f(); /*5*/ + /*0*/ await using /*1*/ /*2*/ b /*3*/ = /*4*/ f() /*5*/; } { /*0*/ for ( /*1*/ /*2*/ await using /*3*/ /*4*/ b /*5*/ = /*6*/ x /*7*/ /*8*/ /*9*/ /*10*/; ; - ); } { ``` # Output ```js async function f() { { /*0*/ await using /*1*/ /*2*/ b /*3*/ = /*4*/ f() /*5*/; } { /*0*/ for ( /*1*/ /*2*/ await using /*3*/ /*4*/ b /*5*/ = /*6*/ x /*7*/ /*8*/ /*9*/ /*10*/; ; ); } { /*0*/ for (/*1*/ /*2*/ await using /*3*/ /*4*/ b /*5*/ of /*6*/ x /*7*/ /*8*/); } { /*0*/ for await (/*1*/ /*2*/ /*3*/ await using /*4*/ /*5*/ b /*6*/ of /*7*/ x /*8*/ /*9*/); } } ``` # Lines exceeding max width of 80 characters ``` 13: /*0*/ for (/*1*/ /*2*/ await using /*3*/ /*4*/ b /*5*/ of /*6*/ x /*7*/ /*8*/); 16: /*0*/ for await (/*1*/ /*2*/ /*3*/ await using /*4*/ /*5*/ b /*6*/ of /*7*/ x /*8*/ /*9*/); ```