Regenerating node_modules
This commit is contained in:
parent
09b4a82c83
commit
c96f84308a
5488 changed files with 487362 additions and 60779 deletions
24
node_modules/eslint-plugin-github/lib/rules/async-preventdefault.js
generated
vendored
Normal file
24
node_modules/eslint-plugin-github/lib/rules/async-preventdefault.js
generated
vendored
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
module.exports = {
|
||||
meta: {
|
||||
docs: {},
|
||||
schema: []
|
||||
},
|
||||
|
||||
create(context) {
|
||||
const scopeDidWait = new WeakSet()
|
||||
|
||||
return {
|
||||
AwaitExpression() {
|
||||
scopeDidWait.add(context.getScope(), true)
|
||||
},
|
||||
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, 'event.preventDefault() inside an async function is error prone')
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue