Update checked-in dependencies
This commit is contained in:
parent
6b0d45a5c6
commit
cc1adb825a
4247 changed files with 144820 additions and 149530 deletions
11
node_modules/eslint-plugin-github/lib/rules/no-then.js
generated
vendored
11
node_modules/eslint-plugin-github/lib/rules/no-then.js
generated
vendored
|
|
@ -1,15 +1,20 @@
|
|||
module.exports = {
|
||||
meta: {
|
||||
docs: {}
|
||||
type: 'suggestion',
|
||||
docs: {
|
||||
description: 'enforce using `async/await` syntax over Promises',
|
||||
url: require('../url')(module)
|
||||
},
|
||||
schema: []
|
||||
},
|
||||
|
||||
create(context) {
|
||||
return {
|
||||
MemberExpression(node) {
|
||||
if (node.property && node.property.name === 'then') {
|
||||
context.report(node.property, 'Prefer async/await to Promise.then()')
|
||||
context.report({node: node.property, message: 'Prefer async/await to Promise.then()'})
|
||||
} else if (node.property && node.property.name === 'catch') {
|
||||
context.report(node.property, 'Prefer async/await to Promise.catch()')
|
||||
context.report({node: node.property, message: 'Prefer async/await to Promise.catch()'})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue