Regenerating node_modules
This commit is contained in:
parent
09b4a82c83
commit
c96f84308a
5488 changed files with 487362 additions and 60779 deletions
25
node_modules/eslint-plugin-github/lib/rules/unescaped-html-literal.js
generated
vendored
Normal file
25
node_modules/eslint-plugin-github/lib/rules/unescaped-html-literal.js
generated
vendored
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
module.exports = function(context) {
|
||||
const htmlOpenTag = /^<[a-zA-Z]/
|
||||
const message = 'Unescaped HTML literal. Use html`` tag template literal for secure escaping.'
|
||||
|
||||
return {
|
||||
Literal(node) {
|
||||
if (!htmlOpenTag.test(node.value)) return
|
||||
|
||||
context.report({
|
||||
node,
|
||||
message
|
||||
})
|
||||
},
|
||||
TemplateLiteral(node) {
|
||||
if (!htmlOpenTag.test(node.quasis[0].value.raw)) return
|
||||
|
||||
if (!node.parent.tag || node.parent.tag.name !== 'html') {
|
||||
context.report({
|
||||
node,
|
||||
message
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue