Skip to content

debuggerStatements

Reports using debugger statements.

✅ This rule is included in the ts logical and logicalStrict presets.

The debugger statement causes the JavaScript runtime to pause execution and start a debugger if one is available, such as when browser developer tools are open. While this can be useful during development, it should not be left in production code as it can cause unexpected pauses in execution.

function
function doubleValues(values: number[]): number[]
doubleValues
(
values: number[]
values
: number[]) {
debugger;
return
values: number[]
values
.
Array<number>.map<number>(callbackfn: (value: number, index: number, array: number[]) => number, thisArg?: any): number[]

Calls a defined callback function on each element of an array, and returns an array that contains the results.

@paramcallbackfn A function that accepts up to three arguments. The map method calls the callbackfn function one time for each element in the array.

@paramthisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.

map
((
value: number
value
) =>
value: number
value
* 2);
}

This rule is not configurable.

If your app isn’t shipped to production users, you might choose to disable this rule. For example, if you’re developing a local-only application where pausing in a debugger when dev tools are open is acceptable behavior, this rule might not be useful to you.

Made with ❤️‍🔥 around the world by the Flint team and contributors.