initial commit of actions
This commit is contained in:
commit
949ece5785
44660 changed files with 12034344 additions and 0 deletions
30
github/codeql-action-v1/node_modules/eslint-plugin-github/lib/rules/no-innerText.js
generated
vendored
Normal file
30
github/codeql-action-v1/node_modules/eslint-plugin-github/lib/rules/no-innerText.js
generated
vendored
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
module.exports = {
|
||||
meta: {
|
||||
type: 'problem',
|
||||
docs: {
|
||||
description: 'disallow `Element.prototype.innerText` in favor of `Element.prototype.textContent`',
|
||||
url: require('../url')(module)
|
||||
},
|
||||
fixable: 'code',
|
||||
schema: []
|
||||
},
|
||||
|
||||
create(context) {
|
||||
return {
|
||||
MemberExpression(node) {
|
||||
if (node.property && node.property.name === 'innerText') {
|
||||
context.report({
|
||||
meta: {
|
||||
fixable: 'code'
|
||||
},
|
||||
node: node.property,
|
||||
message: 'Prefer textContent to innerText',
|
||||
fix(fixer) {
|
||||
return fixer.replaceText(node.property, 'textContent')
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue