--- source: crates/rome_formatter_test/src/snapshot_builder.rs info: test_file: js/module/statement/if_else.js --- # Input ```js if(a); if(a); else ; if (Math.random() > 0.5) { console.log(1) } else if (Math.random() > 0.5) { console.log(2) } else { console.log(3) } if (Math.random() > 0.5) { console.log(1) } else if (Math.random() > 0.5) { console.log(2) } else { console.log(3) } if (Math.random() > 0.5) { console.log(1) } // wow else if (Math.random() > 0.5) { console.log(2) } // so cool else { console.log(3) } if ( true) { let y = 20; } else { let x= 10; } if (aVeryLongVeriableNameSoThatTheConditionBreaksAcrossMultipleLinesAndIDontKnow) { } else { } if (true) { } if (true) { // trailing } else { // trailing } if (true) that(); else; if (true) {} else if ( // rome-ignore format: Test suppression comments true && false ) {} ``` ============================= # Outputs ## Output 1 ----- Indent style: Tab Line width: 80 Quote style: Double Quotes Quote properties: As needed Trailing comma: All Semicolons: Always ----- ```js if (a); if (a); else; if (Math.random() > 0.5) { console.log(1); } else if (Math.random() > 0.5) { console.log(2); } else { console.log(3); } if (Math.random() > 0.5) { console.log(1); } else if (Math.random() > 0.5) { console.log(2); } else { console.log(3); } if (Math.random() > 0.5) { console.log(1); } // wow else if (Math.random() > 0.5) { console.log(2); } // so cool else { console.log(3); } if (true) { let y = 20; } else { let x = 10; } if ( aVeryLongVeriableNameSoThatTheConditionBreaksAcrossMultipleLinesAndIDontKnow ) { } else { } if (true) { } if (true) { // trailing } else { // trailing } if (true) that(); else; if (true) { } else if ( // rome-ignore format: Test suppression comments true && false ) { } ```