handle-callback-err
eslint
No autofix
eslint.config.js
export default [
{
rules: {
"handle-callback-err": "error",
},
},
];This rule is deprecated. Check its documentation for a replacement before enabling it.
function loadData (err, data) {
doSomething();
}function loadData (err, data) {
if (err) {
console.log(err.stack);
}
doSomething();
}
function generateError (err) {
if (err) {}
}function loadData (error, data) {
if (error) {
console.log(error.stack);
}
doSomething();
}Examples from the ESLint documentation.
handle-callback-err
eslint
export default [
{
rules: {
"handle-callback-err": "error",
},
},
];Oxlint does not have this rule.
Biome does not have this rule.
Enforce consistent naming when capturing the current execution context
Disallow use of this in contexts where the value of this is undefined
Enforce a maximum depth that blocks can be nested
Enforce a maximum number of lines per file
Enforce a maximum number of parameters in function definitions