github-pages-deploy-action/node_modules/eslint-plugin-github/lib/rules/array-foreach.js
2020-03-31 08:42:07 -04: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')
}
}
}
}
}