--- source: crates/biome_js_analyze/tests/spec_tests.rs expression: invalid.js --- # Input ```jsx const test = { debugger: 1 }; test.debugger; if (foo) debugger debugger; function test() { let a = 3; debugger; } ``` # Diagnostics ``` invalid.js:3:10 lint/suspicious/noDebugger FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This is an unexpected use of the debugger statement. 1 │ const test = { debugger: 1 }; test.debugger; 2 │ > 3 │ if (foo) debugger │ ^^^^^^^^ 4 │ 5 │ debugger; i Unsafe fix: Remove debugger statement 1 1 │ const test = { debugger: 1 }; test.debugger; 2 2 │ 3 │ - if·(foo)·debugger 3 │ + if·(foo)·; 4 4 │ 5 5 │ debugger; ``` ``` invalid.js:5:1 lint/suspicious/noDebugger FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This is an unexpected use of the debugger statement. 3 │ if (foo) debugger 4 │ > 5 │ debugger; │ ^^^^^^^^^ 6 │ 7 │ function test() { i Unsafe fix: Remove debugger statement 3 3 │ if (foo) debugger 4 4 │ 5 │ - debugger; 6 │ - 7 5 │ function test() { 8 6 │ let a = 3; ``` ``` invalid.js:9:3 lint/suspicious/noDebugger FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! This is an unexpected use of the debugger statement. 7 │ function test() { 8 │ let a = 3; > 9 │ debugger; │ ^^^^^^^^^ 10 │ } i Unsafe fix: Remove debugger statement 7 7 │ function test() { 8 8 │ let a = 3; 9 │ - ··debugger; 10 9 │ } ```