--- source: crates/biome_js_analyze/tests/spec_tests.rs expression: JsBreakStatement.js --- # Input ```jsx function JsBreakStatement1() { while (true) { break; break; // afterBreak } } function JsBreakStatement2() { while (true) { break; continue; // afterBreak } } ``` # Diagnostics ``` JsBreakStatement.js:4:9 lint/correctness/noUnreachable ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This code will never be reached ... 2 │ while (true) { 3 │ break; > 4 │ break; // afterBreak │ ^^^^^^ 5 │ } 6 │ } i ... because this statement will break the flow of the code beforehand 1 │ function JsBreakStatement1() { 2 │ while (true) { > 3 │ break; │ ^^^^^^ 4 │ break; // afterBreak 5 │ } ``` ``` JsBreakStatement.js:11:9 lint/correctness/noUnreachable ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This code will never be reached ... 9 │ while (true) { 10 │ break; > 11 │ continue; // afterBreak │ ^^^^^^^^^ 12 │ } 13 │ } i ... because this statement will break the flow of the code beforehand 8 │ function JsBreakStatement2() { 9 │ while (true) { > 10 │ break; │ ^^^^^^ 11 │ continue; // afterBreak 12 │ } ```