eslint-plugin-node icon indicating copy to clipboard operation
eslint-plugin-node copied to clipboard

`callback-return`: ignore if callback is the last expression

Open Antonius-S opened this issue 5 years ago • 0 comments

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

Antonius-S avatar Apr 16 '20 10:04 Antonius-S