no-debugger
eslint
No autofixRecommended
eslint.config.js
export default [
{
rules: {
"no-debugger": "error",
},
},
];function isTruthy(x) {
debugger;
return Boolean(x);
}function isTruthy(x) {
return Boolean(x); // set a breakpoint at this line
}Examples from the ESLint documentation.
no-debugger
eslint
export default [
{
rules: {
"no-debugger": "error",
},
},
];no-debugger
eslint plugin · correctness
{
"rules": {
"no-debugger": "error"
}
}suspicious/noDebugger
suspicious · since 1.0.0
{
"linter": {
"rules": {
"suspicious": {
"noDebugger": "error"
}
}
}
}Disallow unreachable code after return, throw, continue, and break statements
Disallow unnecessary boolean casts
Disallow calling global object properties as functions
Disallow this/super before calling super() in constructors
Disallow reassigning function declarations
Disallow irregular whitespace