warning
prefer-arrow-callbackForces use of ES6 arrow function expressions
Examples
❌ Incorrect
foo(function(a) {
return a;
});
foo(function() {
return this.a;
}.bind(this));
✅ Correct
foo((a) => {
return a;
});
foo(() => {
return this.a;
});