mirror of
https://github.com/github/codeql-action.git
synced 2025-12-22 23:30:05 +08:00
Bump packages to fix linter
This commit is contained in:
21
node_modules/eslint-plugin-github/lib/rules/no-inner-html.js
generated
vendored
Normal file
21
node_modules/eslint-plugin-github/lib/rules/no-inner-html.js
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
module.exports = {
|
||||
meta: {
|
||||
type: 'problem',
|
||||
docs: {
|
||||
description: 'disallow `Element.prototype.innerHTML` in favor of `Element.prototype.textContent`',
|
||||
url: require('../url')(module)
|
||||
},
|
||||
schema: []
|
||||
},
|
||||
|
||||
create(context) {
|
||||
return {
|
||||
'MemberExpression[property.name=innerHTML]': function (node) {
|
||||
context.report({
|
||||
node: node.property,
|
||||
message: 'Using innerHTML poses a potential security risk and should not be used. Prefer using textContent.'
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user