webhook/node_modules/eslint-plugin-github/lib/rules/array-foreach.js

17 lines
310 B
JavaScript
Raw Normal View History

module.exports = {
meta: {
docs: {},
schema: []
},
create(context) {
return {
CallExpression(node) {
if (node.callee.property && node.callee.property.name === 'forEach') {
context.report(node, 'Prefer for...of instead of Array.forEach')
}
}
}
}
}