Skip to content

Commit

Permalink
Upgrade eslint-plugin-promise to v7.1.0
Browse files Browse the repository at this point in the history
- Enable `promise/spec-only` as an error.
  • Loading branch information
amikheychik committed Nov 10, 2024
1 parent 8a0de0a commit eb92f65
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 8 deletions.
13 changes: 7 additions & 6 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
"eslint-plugin-jsdoc": "^50.4.3",
"eslint-plugin-n": "^17.13.1",
"eslint-plugin-prefer-arrow": "^1.2.3",
"eslint-plugin-promise": "^6.2.0",
"eslint-plugin-promise": "^7.1.0",
"eslint-plugin-rxjs": "^5.0.3",
"eslint-plugin-security": "^3.0.1",
"eslint-plugin-simple-import-sort": "^12.1.0",
Expand Down Expand Up @@ -111,7 +111,7 @@
"eslint-plugin-jsdoc": "50.4.3",
"eslint-plugin-n": "17.13.1",
"eslint-plugin-prefer-arrow": "1.2.3",
"eslint-plugin-promise": "6.2.0",
"eslint-plugin-promise": "7.1.0",
"eslint-plugin-rxjs": "5.0.3",
"eslint-plugin-security": "3.0.1",
"eslint-plugin-simple-import-sort": "12.1.0",
Expand Down
5 changes: 5 additions & 0 deletions src/rules/promise/index.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,11 @@ to enforce best practices for JavaScript promises.
| Error


| `link:{eslint-promise-rules}/spec-only.md[promise/spec-only]`
|
|
| Error

| `link:{eslint-promise-rules}/valid-params.md[promise/valid-params]`
|
|
Expand Down
3 changes: 3 additions & 0 deletions src/rules/promise/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ export = {
'promise/avoid-new': 'off',
'promise/no-new-statics': 'warn',
'promise/no-return-in-finally': 'error',
'promise/spec-only': ['error', {
allowedMethods: [],
}],
'promise/valid-params': 'error',
// Promises should always be used instead of async/await.
'promise/prefer-await-to-then': 'off', // == ES2017 Async/Await
Expand Down

0 comments on commit eb92f65

Please sign in to comment.