File tree Expand file tree Collapse file tree 3 files changed +11
-2
lines changed Expand file tree Collapse file tree 3 files changed +11
-2
lines changed Original file line number Diff line number Diff line change 1+ ## 5.2.0
2+
3+ - Updated ` param-names ` rule to allow for unused params
4+
15## 5.1.1
26
37- Updated docs to include ` no-callback-in-promise ` reasons #215
610
711- Included ` catch() ` and ` finally() ` in ` prefer-await-to-then ` #196
812- Added some additional tests and upgraded some dev deps #196
9- - Exempted array methods in prefer-await-to-callbacks ([ #212 ] ( https://github.com/xjamundx/eslint-plugin-promise/issues/212 ) )
13+ - Exempted array methods in prefer-await-to-callbacks
14+ ([ #212 ] ( https://github.com/xjamundx/eslint-plugin-promise/issues/212 ) )
1015
1116## 5.0.0
1217
Original file line number Diff line number Diff line change @@ -7,13 +7,15 @@ Enforce standard parameter names for Promise constructors
77``` js
88new Promise (function (resolve ) { ... })
99new Promise (function (resolve , reject ) { ... })
10+ new Promise (function (_resolve , _reject ) { ... }) // Unused marker for parameters are allowed
1011```
1112
1213#### Invalid
1314
1415``` js
1516new Promise (function (reject , resolve ) { ... }) // incorrect order
1617new Promise (function (ok , fail ) { ... }) // non-standard parameter names
18+ new Promise (function (_ , reject ) { ... }) // a simple underscore is not allowed
1719```
1820
1921Ensures that ` new Promise() ` is instantiated with the parameter names
Original file line number Diff line number Diff line change @@ -21,7 +21,9 @@ module.exports = {
2121
2222 if (
2323 ( params [ 0 ] . name !== 'resolve' && params [ 0 ] . name !== '_resolve' ) ||
24- ( params [ 1 ] && params [ 1 ] . name !== 'reject' && params [ 1 ] . name !== '_reject' )
24+ ( params [ 1 ] &&
25+ params [ 1 ] . name !== 'reject' &&
26+ params [ 1 ] . name !== '_reject' )
2527 ) {
2628 context . report ( {
2729 node,
You can’t perform that action at this time.
0 commit comments