@@ -61,6 +61,7 @@ Then configure the rules you want to use under the rules section.
61
61
"promise/no-promise-in-callback" : " warn" ,
62
62
"promise/no-callback-in-promise" : " warn" ,
63
63
"promise/avoid-new" : " warn" ,
64
+ "promise/no-new-statics" : " warn" ,
64
65
"promise/no-return-in-finally" : " warn"
65
66
}
66
67
}
@@ -87,6 +88,7 @@ or start with the recommended rule set
87
88
| [ ` no-promise-in-callback ` ] [ no-promise-in-callback ] | Avoid using promises inside of callbacks | :warning : | |
88
89
| [ ` no-callback-in-promise ` ] [ no-callback-in-promise ] | Avoid calling ` cb() ` inside of a ` then() ` (use [ nodeify] [ ] instead) | :warning : | |
89
90
| [ ` avoid-new ` ] [ avoid-new ] | Avoid creating ` new ` promises outside of utility libs (use [ pify] [ ] instead) | :warning : | |
91
+ | [ ` no-new-statics ` ] [ no-new-statics ] | Avoid calling ` new ` on a Promise static method (e.g. ` new Promise.resolve() ` ) | :bangbang : | |
90
92
| [ ` no-return-in-finally ` ] [ no-return-in-finally ] | Disallow return statements in ` finally() ` | :warning : | |
91
93
| [ ` prefer-await-to-then ` ] [ prefer-await-to-then ] | Prefer ` await ` to ` then() ` for reading Promise values | :seven : | |
92
94
| [ ` prefer-await-to-callbacks ` ] [ prefer-await-to-callbacks ] | Prefer async/await to the callback pattern | :seven : | |
@@ -119,6 +121,7 @@ or start with the recommended rule set
119
121
[ no-promise-in-callback ] : docs/rules/no-promise-in-callback.md
120
122
[ no-callback-in-promise ] : docs/rules/no-callback-in-promise.md
121
123
[ avoid-new ] : docs/rules/avoid-new.md
124
+ [ no-new-statics ] : docs/rules/no-new-statics.md
122
125
[ no-return-in-finally ] : docs/rules/no-return-in-finally.md
123
126
[ prefer-await-to-then ] : docs/rules/prefer-await-to-then.md
124
127
[ prefer-await-to-callbacks ] : docs/rules/prefer-await-to-callbacks.md
0 commit comments