--- source: crates/biome_formatter_test/src/snapshot_builder.rs info: 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 Indent width: 2 Line ending: LF Line width: 80 Quote style: Double Quotes JSX quote style: Double Quotes Quote properties: As needed Trailing comma: All Semicolons: Always Arrow parentheses: Always Bracket spacing: true Bracket same line: false Attribute Position: Auto ----- ```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 ) { } ```