eslint-plugin-node
eslint-plugin-node copied to clipboard
`callback-return`: ignore if callback is the last expression
Currently callback-return rule requires returning of callback in any case even if it's the last expression in a function:
function (cb) {
console.log('');
if (cb) cb();
}
I suggest to make it a little bit smarter - detect such cases and let them pass