Update checked-in dependencies
This commit is contained in:
parent
7269bf610b
commit
e5a7c904c1
215 changed files with 41592 additions and 3253 deletions
18
node_modules/eslint-plugin-github/lib/rules/async-currenttarget.js
generated
vendored
18
node_modules/eslint-plugin-github/lib/rules/async-currenttarget.js
generated
vendored
|
|
@ -10,16 +10,24 @@ module.exports = {
|
|||
|
||||
create(context) {
|
||||
const scopeDidWait = new WeakSet()
|
||||
const sourceCode = context.sourceCode ?? context.getSourceCode()
|
||||
|
||||
return {
|
||||
AwaitExpression() {
|
||||
scopeDidWait.add(context.getScope(), true)
|
||||
AwaitExpression(node) {
|
||||
scopeDidWait.add(sourceCode.getScope ? sourceCode.getScope(node) : context.getScope())
|
||||
},
|
||||
MemberExpression(node) {
|
||||
if (node.property && node.property.name === 'currentTarget') {
|
||||
const scope = context.getScope()
|
||||
if (scope.block.async && scopeDidWait.has(scope)) {
|
||||
context.report({node, message: 'event.currentTarget inside an async function is error prone'})
|
||||
let scope = sourceCode.getScope ? sourceCode.getScope(node) : context.getScope()
|
||||
while (scope) {
|
||||
if (scopeDidWait.has(scope)) {
|
||||
context.report({
|
||||
node,
|
||||
message: 'event.currentTarget inside an async function is error prone',
|
||||
})
|
||||
break
|
||||
}
|
||||
scope = scope.upper
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
|
|||
18
node_modules/eslint-plugin-github/lib/rules/async-preventdefault.js
generated
vendored
18
node_modules/eslint-plugin-github/lib/rules/async-preventdefault.js
generated
vendored
|
|
@ -10,16 +10,24 @@ module.exports = {
|
|||
|
||||
create(context) {
|
||||
const scopeDidWait = new WeakSet()
|
||||
const sourceCode = context.sourceCode ?? context.getSourceCode()
|
||||
|
||||
return {
|
||||
AwaitExpression() {
|
||||
scopeDidWait.add(context.getScope(), true)
|
||||
AwaitExpression(node) {
|
||||
scopeDidWait.add(sourceCode.getScope ? sourceCode.getScope(node) : context.getScope())
|
||||
},
|
||||
CallExpression(node) {
|
||||
if (node.callee.property && node.callee.property.name === 'preventDefault') {
|
||||
const scope = context.getScope()
|
||||
if (scope.block.async && scopeDidWait.has(scope)) {
|
||||
context.report({node, message: 'event.preventDefault() inside an async function is error prone'})
|
||||
let scope = sourceCode.getScope ? sourceCode.getScope(node) : context.getScope()
|
||||
while (scope) {
|
||||
if (scopeDidWait.has(scope)) {
|
||||
context.report({
|
||||
node,
|
||||
message: 'event.preventDefault() inside an async function is error prone',
|
||||
})
|
||||
break
|
||||
}
|
||||
scope = scope.upper
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
|
|||
2
node_modules/eslint-plugin-github/lib/rules/filenames-match-regex.js
generated
vendored
2
node_modules/eslint-plugin-github/lib/rules/filenames-match-regex.js
generated
vendored
|
|
@ -32,7 +32,7 @@ module.exports = {
|
|||
|
||||
return {
|
||||
Program(node) {
|
||||
const filename = context.getFilename()
|
||||
const filename = context.filename ?? context.getFilename()
|
||||
const absoluteFilename = path.resolve(filename)
|
||||
const parsed = parseFilename(absoluteFilename)
|
||||
const shouldIgnore = isIgnoredFilename(filename)
|
||||
|
|
|
|||
2
node_modules/eslint-plugin-github/lib/rules/no-useless-passive.js
generated
vendored
2
node_modules/eslint-plugin-github/lib/rules/no-useless-passive.js
generated
vendored
|
|
@ -32,7 +32,7 @@ module.exports = {
|
|||
if (i === -1) return
|
||||
const passiveProp = options.properties[i]
|
||||
const l = options.properties.length
|
||||
const source = context.getSourceCode()
|
||||
const source = context.sourceCode ?? context.getSourceCode()
|
||||
context.report({
|
||||
node: passiveProp,
|
||||
message: `"${name.value}" event listener is not cancellable and so \`passive: true\` does nothing.`,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue