--- source: crates/biome_formatter_test/src/snapshot_builder.rs info: js/module/statement/switch.js --- # Input ```js switch (key) { case // comment value: case value: // fallthrough same-line case value: // fallthrough case fallthrough: case value: break; default: break; } switch ("test") { case "test": {} } switch (key) { case blockBody: { const a = 1; break; } // The block is not the only statement in the case body, // so it doesn't hug the same line as the case here. case separateBlockBody: { const a = 1; } break; } switch (key) { default: { const a = 1; break; } } switch (key) { // The block is not the only statement in the case body, // so it doesn't hug the same line as the case here. default: { const a = 1; } break; } ``` ============================= # 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 switch (key) { case // comment value: case value: // fallthrough same-line case value: // fallthrough case fallthrough: case value: break; default: break; } switch ("test") { case "test": { } } switch (key) { case blockBody: { const a = 1; break; } // The block is not the only statement in the case body, // so it doesn't hug the same line as the case here. case separateBlockBody: { const a = 1; } break; } switch (key) { default: { const a = 1; break; } } switch (key) { // The block is not the only statement in the case body, // so it doesn't hug the same line as the case here. default: { const a = 1; } break; } ```