github-pages-deploy-action/node_modules/eslint-plugin-github/lib/rules/array-foreach.js

17 lines
310 B
JavaScript
Raw Normal View History

2020-03-07 11:45:40 +08:00
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')
}
}
}
}
}