When defining an empty function (e.g. for callbacks) it can be more readable to use _.noop
instead
This rule takes no arguments.
The following patterns are considered warnings:
functionWithCallback(function(){});
const emptyFunction = ()=> {};
The following patterns are not considered warnings:
functionWithCallback(function(x){return x + 1});
const sqr = x => x * x;
If you do not want to enforce using _.noop
, you should not use this rule.