noDebugger
Summary
Section titled Summary- Rule available since:
v1.0.0
- Diagnostic Category:
lint/suspicious/noDebugger
- This rule is recommended, which means is enabled by default.
- This rule has an unsafe fix.
- The default severity of this rule is error.
- Sources:
- Same as
no-debugger
- Same as
Description
Section titled DescriptionDisallow the use of debugger
Examples
Section titled ExamplesInvalid
Section titled Invaliddebugger;
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
Section titled Validconst test = { debugger: 1 };test.debugger;
How to configure
Section titled How to configure{ "linter": { "rules": { "suspicious": { "noDebugger": "error" } } }}