Lint Rules

noDebugger (since v0.7.0)

This rule is recommended by Rome.

Disallow the use of debugger

Examples

Invalid

debugger;
correctness/noDebugger.js:1:1 lint/correctness/noDebugger  FIXABLE  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

   This is an unexpected use of the debugger statement.
  
  > 1 │ debugger;
   ^^^^^^^^^
    2 │ 
  
   Suggested fix: Remove debugger statement
  
    1 │ debugger;
  ---------

Valid

const test = { debugger: 1 };
test.debugger;