Skip to content

Latest commit

 

History

History
55 lines (39 loc) · 1.19 KB

File metadata and controls

55 lines (39 loc) · 1.19 KB

eslint/no-debugger

This rule is turned on by default. 🛠️ An auto-fix is available for this rule.

What it does

Checks for usage of the debugger statement

Why is this bad?

debugger statements do not affect functionality when a debugger isn't attached. They're most commonly an accidental debugging leftover.

Example

async function main() {
  const data = await getData();
  const result = complexCalculation(data);
  debugger;
}

How to use

To enable this rule in the CLI or using the config file, you can use:

::: code-group

oxlint --deny no-debugger
{
  "rules": {
    "no-debugger": "error"
  }
}

:::

References