Build(deps-dev): bump eslint-plugin-promise from 4.3.1 to 5.1.0 (#6412)

* Build(deps-dev): bump eslint-plugin-promise from 4.3.1 to 5.1.0

Bumps [eslint-plugin-promise](https://github.com/xjamundx/eslint-plugin-promise) from 4.3.1 to 5.1.0.
- [Release notes](https://github.com/xjamundx/eslint-plugin-promise/releases)
- [Changelog](https://github.com/xjamundx/eslint-plugin-promise/blob/development/CHANGELOG.md)
- [Commits](https://github.com/xjamundx/eslint-plugin-promise/commits)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

* chore: correct false eslint positives

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: Caleb Cartwright <caleb.cartwright@outlook.com>
Co-authored-by: Caleb Cartwright <calebcartwright@users.noreply.github.com>
This commit is contained in:
dependabot-preview[bot]
2021-05-01 21:05:02 -05:00
committed by GitHub
parent a0d6b4203d
commit 1b07126207
5 changed files with 18 additions and 11 deletions

View File

@@ -198,7 +198,9 @@ function handleRequest(cacheHeaderConfig, handlerOptions) {
},
cachingRequest
)
// eslint-disable-next-line promise/prefer-await-to-then
if (result && result.catch) {
// eslint-disable-next-line promise/prefer-await-to-then
result.catch(err => {
throw err
})

View File

@@ -84,7 +84,7 @@ class ServiceTester {
.before(() => {
this.beforeEach()
})
// eslint-disable-next-line mocha/prefer-arrow-callback
// eslint-disable-next-line mocha/prefer-arrow-callback, promise/prefer-await-to-then
.finally(function () {
// `this` is the IcedFrisby instance.
let responseBody

22
package-lock.json generated
View File

@@ -95,7 +95,7 @@
"eslint-plugin-mocha": "^8.1.0",
"eslint-plugin-no-extension-in-require": "^0.2.0",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-promise": "^4.3.1",
"eslint-plugin-promise": "^5.1.0",
"eslint-plugin-react": "^7.23.2",
"eslint-plugin-react-hooks": "^4.2.0",
"eslint-plugin-sort-class-members": "^1.11.0",
@@ -11480,12 +11480,15 @@
}
},
"node_modules/eslint-plugin-promise": {
"version": "4.3.1",
"resolved": "https://registry.npmjs.org/eslint-plugin-promise/-/eslint-plugin-promise-4.3.1.tgz",
"integrity": "sha512-bY2sGqyptzFBDLh/GMbAxfdJC+b0f23ME63FOE4+Jao0oZ3E1LEwFtWJX/1pGMJLiTtrSSern2CRM/g+dfc0eQ==",
"version": "5.1.0",
"resolved": "https://registry.npmjs.org/eslint-plugin-promise/-/eslint-plugin-promise-5.1.0.tgz",
"integrity": "sha512-NGmI6BH5L12pl7ScQHbg7tvtk4wPxxj8yPHH47NvSmMtFneC077PSeY3huFj06ZWZvtbfxSPt3RuOQD5XcR4ng==",
"dev": true,
"engines": {
"node": ">=6"
"node": "^10.12.0 || >=12.0.0"
},
"peerDependencies": {
"eslint": "^7.0.0"
}
},
"node_modules/eslint-plugin-react": {
@@ -45497,10 +45500,11 @@
}
},
"eslint-plugin-promise": {
"version": "4.3.1",
"resolved": "https://registry.npmjs.org/eslint-plugin-promise/-/eslint-plugin-promise-4.3.1.tgz",
"integrity": "sha512-bY2sGqyptzFBDLh/GMbAxfdJC+b0f23ME63FOE4+Jao0oZ3E1LEwFtWJX/1pGMJLiTtrSSern2CRM/g+dfc0eQ==",
"dev": true
"version": "5.1.0",
"resolved": "https://registry.npmjs.org/eslint-plugin-promise/-/eslint-plugin-promise-5.1.0.tgz",
"integrity": "sha512-NGmI6BH5L12pl7ScQHbg7tvtk4wPxxj8yPHH47NvSmMtFneC077PSeY3huFj06ZWZvtbfxSPt3RuOQD5XcR4ng==",
"dev": true,
"requires": {}
},
"eslint-plugin-react": {
"version": "7.23.2",

View File

@@ -183,7 +183,7 @@
"eslint-plugin-mocha": "^8.1.0",
"eslint-plugin-no-extension-in-require": "^0.2.0",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-promise": "^4.3.1",
"eslint-plugin-promise": "^5.1.0",
"eslint-plugin-react": "^7.23.2",
"eslint-plugin-react-hooks": "^4.2.0",
"eslint-plugin-sort-class-members": "^1.11.0",

View File

@@ -193,6 +193,7 @@ function setRoutes(allowedOrigin, githubApiProvider, server) {
.then(suggestions => {
end({ suggestions })
})
// eslint-disable-next-line promise/prefer-await-to-then
.catch(err => {
end({ suggestions: [], err })
})