Skip to main content

js/noDebugger

disallow the use of debugger

ESLint Equivalent: no-debugger

Examples

Invalid

debugger;

 file.ts:1 lint/js/noDebugger  FIXABLE  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

  This is an unexpected use of the debugger statement.

    debugger;
    ^^^^^^^^^

  Safe fix

  - debugger;

Valid

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