initial commit of actions
This commit is contained in:
commit
949ece5785
44660 changed files with 12034344 additions and 0 deletions
20
github/codeql-action-v1/node_modules/eslint-plugin-github/lib/rules/array-foreach.js
generated
vendored
Normal file
20
github/codeql-action-v1/node_modules/eslint-plugin-github/lib/rules/array-foreach.js
generated
vendored
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
module.exports = {
|
||||
meta: {
|
||||
type: 'suggestion',
|
||||
docs: {
|
||||
description: 'enforce `for..of` loops over `Array.forEach`',
|
||||
url: require('../url')(module)
|
||||
},
|
||||
schema: []
|
||||
},
|
||||
|
||||
create(context) {
|
||||
return {
|
||||
CallExpression(node) {
|
||||
if (node.callee.property && node.callee.property.name === 'forEach') {
|
||||
context.report({node, message: 'Prefer for...of instead of Array.forEach'})
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue