Skip to content

noDebugger

诊断类别:lint/suspicious/noDebugger

¥Diagnostic Category: lint/suspicious/noDebugger

自从:v1.0.0

¥Since: v1.0.0

来源:

¥Sources:

禁止使用 debugger

¥Disallow the use of debugger

¥Examples

¥Invalid

debugger;
code-block.js:1:1 lint/suspicious/noDebugger  FIXABLE  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

This is an unexpected use of the debugger statement.

> 1 │ debugger;
^^^^^^^^^
2 │

Unsafe fix: Remove debugger statement

1 │ debugger;
---------

¥Valid

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

¥Related links