webhook-action/node_modules/eslint-plugin-github/lib/rules/array-foreach.js
2020-08-26 09:57:08 +10:00

17 lines
310 B
JavaScript

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')
}
}
}
}
}