@@ -98,23 +98,23 @@ or start with the recommended rule set:
98
98
✅ Set in the ` recommended ` configuration.\
99
99
🔧 Automatically fixable by the [ ` --fix ` CLI option] ( https://eslint.org/docs/user-guide/command-line-interface#--fix ) .
100
100
101
- | Name | Description | 💼 | ⚠️ | 🚫 | 🔧 |
102
- | :------------------------------------------------------------------- | :------------------------------------------------------------------------------------- | :-- | :-- | :-- | :-- |
103
- | [ always-return] ( docs/rules/always-return.md ) | Require returning inside each ` then() ` to create readable and reusable Promise chains. | ✅ | | | |
104
- | [ avoid-new] ( docs/rules/avoid-new.md ) | Disallow creating ` new ` promises outside of utility libs (use [ pify ] [ ] instead). | | | ✅ | |
105
- | [ catch-or-return] ( docs/rules/catch-or-return.md ) | Enforce the use of ` catch() ` on un-returned promises. | ✅ | | | |
106
- | [ no-callback-in-promise] ( docs/rules/no-callback-in-promise.md ) | Disallow calling ` cb() ` inside of a ` then() ` (use [ nodeify ] [ ] instead). | | ✅ | | |
107
- | [ no-multiple-resolved] ( docs/rules/no-multiple-resolved.md ) | Disallow creating new promises with paths that resolve multiple times. | | | | |
108
- | [ no-native] ( docs/rules/no-native.md ) | Require creating a ` Promise ` constructor before using it in an ES5 environment. | | | ✅ | |
109
- | [ no-nesting] ( docs/rules/no-nesting.md ) | Disallow nested ` then() ` or ` catch() ` statements. | | ✅ | | |
110
- | [ no-new-statics] ( docs/rules/no-new-statics.md ) | Disallow calling ` new ` on a Promise static method. | ✅ | | | 🔧 |
111
- | [ no-promise-in-callback] ( docs/rules/no-promise-in-callback.md ) | Disallow using promises inside of callbacks. | | ✅ | | |
112
- | [ no-return-in-finally] ( docs/rules/no-return-in-finally.md ) | Disallow return statements in ` finally() ` . | | ✅ | | |
113
- | [ no-return-wrap] ( docs/rules/no-return-wrap.md ) | Disallow wrapping values in ` Promise.resolve ` or ` Promise.reject ` when not needed. | ✅ | | | |
114
- | [ param-names] ( docs/rules/param-names.md ) | Enforce consistent param names and ordering when creating new promises. | ✅ | | | |
115
- | [ prefer-await-to-callbacks] ( docs/rules/prefer-await-to-callbacks.md ) | Prefer async/ await to the callback pattern. | | | | |
116
- | [ prefer-await-to-then] ( docs/rules/prefer-await-to-then.md ) | Prefer ` await ` to ` then() ` /` catch() ` /` finally() ` for reading Promise values. | | | | |
117
- | [ valid-params] ( docs/rules/valid-params.md ) | Enforces the proper number of arguments are passed to Promise functions. | | ✅ | | |
101
+ | Name | Description | 💼 | ⚠️ | 🚫 | 🔧 |
102
+ | :------------------------------------------------------------------- | :----------------------------------------------------------------------------------------- | :-- | :-- | :-- | :-- |
103
+ | [ always-return] ( docs/rules/always-return.md ) | Require returning inside each ` then() ` to create readable and reusable Promise chains. | ✅ | | | |
104
+ | [ avoid-new] ( docs/rules/avoid-new.md ) | Disallow creating ` new ` promises outside of utility libs (use [ util.promisify ] [ ] instead). | | | ✅ | |
105
+ | [ catch-or-return] ( docs/rules/catch-or-return.md ) | Enforce the use of ` catch() ` on un-returned promises. | ✅ | | | |
106
+ | [ no-callback-in-promise] ( docs/rules/no-callback-in-promise.md ) | Disallow calling ` cb() ` inside of a ` then() ` (use [ util.callbackify ] [ ] instead). | | ✅ | | |
107
+ | [ no-multiple-resolved] ( docs/rules/no-multiple-resolved.md ) | Disallow creating new promises with paths that resolve multiple times. | | | | |
108
+ | [ no-native] ( docs/rules/no-native.md ) | Require creating a ` Promise ` constructor before using it in an ES5 environment. | | | ✅ | |
109
+ | [ no-nesting] ( docs/rules/no-nesting.md ) | Disallow nested ` then() ` or ` catch() ` statements. | | ✅ | | |
110
+ | [ no-new-statics] ( docs/rules/no-new-statics.md ) | Disallow calling ` new ` on a Promise static method. | ✅ | | | 🔧 |
111
+ | [ no-promise-in-callback] ( docs/rules/no-promise-in-callback.md ) | Disallow using promises inside of callbacks. | | ✅ | | |
112
+ | [ no-return-in-finally] ( docs/rules/no-return-in-finally.md ) | Disallow return statements in ` finally() ` . | | ✅ | | |
113
+ | [ no-return-wrap] ( docs/rules/no-return-wrap.md ) | Disallow wrapping values in ` Promise.resolve ` or ` Promise.reject ` when not needed. | ✅ | | | |
114
+ | [ param-names] ( docs/rules/param-names.md ) | Enforce consistent param names and ordering when creating new promises. | ✅ | | | |
115
+ | [ prefer-await-to-callbacks] ( docs/rules/prefer-await-to-callbacks.md ) | Prefer ` async ` / ` await ` to the callback pattern. | | | | |
116
+ | [ prefer-await-to-then] ( docs/rules/prefer-await-to-then.md ) | Prefer ` await ` to ` then() ` /` catch() ` /` finally() ` for reading Promise values. | | | | |
117
+ | [ valid-params] ( docs/rules/valid-params.md ) | Enforces the proper number of arguments are passed to Promise functions. | | ✅ | | |
118
118
119
119
<!-- end auto-generated rules list -->
120
120
@@ -129,8 +129,10 @@ or start with the recommended rule set:
129
129
- (c) MMXV jden
< mailto:[email protected] > - ISC license.
130
130
- (c) 2016 Jamund Ferguson
< mailto:[email protected] > - ISC license.
131
131
132
- [ nodeify ] : https://www.npmjs.com/package/nodeify
133
- [ pify ] : https://www.npmjs.com/package/pify
132
+ [ util.callbackify] :
133
+ https://nodejs.org/docs/latest/api/util.html#utilcallbackifyoriginal
134
+ [ util.promisify] :
135
+ https://nodejs.org/dist/latest-v8.x/docs/api/util.html#util_util_promisify_original
134
136
[ @aaditmshah ] : https://github.com/aaditmshah
135
137
[ @macklinu ] : https://github.com/macklinu
136
138
[ @xjamundx ] : https://github.com/xjamundx
0 commit comments