We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2d5ad35 commit d7bdcecCopy full SHA for d7bdcec
src/modules/promise.mjs
@@ -1,7 +1,9 @@
1
import plugin from 'eslint-plugin-promise';
2
3
+import { strict } from '../utils/conditions.mjs';
4
+
5
/** @return { import('eslint').Linter.Config } */
-function promise() {
6
+function promise(options = {}) {
7
return {
8
plugins: { promise: plugin },
9
rules: {
@@ -18,8 +20,10 @@ function promise() {
18
20
'promise/param-names': 'warn',
19
21
'promise/prefer-await-to-callbacks': 'off',
22
'promise/prefer-await-to-then': 'off',
23
+ 'promise/prefer-catch': strict(options, 'warn'),
24
'promise/valid-params': 'warn',
25
'promise/no-multiple-resolved': 'warn',
26
+ 'promise/spec-only': 'warn',
27
},
28
};
29
}
0 commit comments