An ESLint plugin+rule to suggest arrow functions over function expressions as array elements.
Made for a project that's still using async.waterfall. (Don't do this. Use async/await instead.)
Quick hacky fork of prefer-arrow-callback from the ESLint core rules.
Original author: Toru Nagashima. Original LICENSE (MIT) preserved.
.eslintrc additions:
---
plugins:
- prefer-arrow-in-array
rules:
- prefer-arrow-in-array/prefer-arrow-in-array: error
async.waterfall([
function (next) {
const foo = 'bar';
return next(null, foo);
},
// ...
],
// ...
);
async.waterfall([
next => {
const foo = 'bar';
return next(null, foo);
},
// ...
],
// ...
);