@@ -13,7 +13,21 @@ Enforce best practices for JavaScript promises.
13
13
14
14
* [ Installation] ( #installation )
15
15
* [ Usage] ( #usage )
16
- * [ Rules] ( #rules )
16
+ * [ Rules] ( #rules ) <<<<<<< HEAD =======
17
+ * [ ` catch-or-return ` ] ( #catch-or-return )
18
+ * [ ` no-return-wrap ` ] ( #no-return-wrap )
19
+ * [ ` param-names ` ] ( #param-names )
20
+ * [ ` always-return ` ] ( #always-return )
21
+ * [ ` no-native ` ] ( #no-native )
22
+ * [ ` no-nesting ` ] ( #no-nesting )
23
+ * [ ` no-promise-in-callback ` ] ( #no-promise-in-callback )
24
+ * [ ` no-callback-in-promise ` ] ( #no-callback-in-promise )
25
+ * [ ` avoid-new ` ] ( #avoid-new )
26
+ * [ ` no-new-statics ` ] ( #no-new-statics )
27
+ * [ ` no-return-in-finally ` ] ( #no-return-in-finally )
28
+ * [ ` prefer-await-to-then ` ] ( #prefer-await-to-then )
29
+ * [ ` prefer-await-to-callbacks ` ] ( #prefer-await-to-callbacks )
30
+ > > > > > > > feat(rule): add no-new-statics rule
17
31
* [ Maintainers] ( #maintainers )
18
32
* [ License] ( #license )
19
33
@@ -61,6 +75,7 @@ Then configure the rules you want to use under the rules section.
61
75
"promise/no-promise-in-callback" : " warn" ,
62
76
"promise/no-callback-in-promise" : " warn" ,
63
77
"promise/avoid-new" : " warn" ,
78
+ "promise/no-new-statics" : " warn" ,
64
79
"promise/no-return-in-finally" : " warn"
65
80
}
66
81
}
@@ -87,6 +102,7 @@ or start with the recommended rule set
87
102
| [ ` no-promise-in-callback ` ] [ no-promise-in-callback ] | Avoid using promises inside of callbacks | :warning : | |
88
103
| [ ` no-callback-in-promise ` ] [ no-callback-in-promise ] | Avoid calling ` cb() ` inside of a ` then() ` (use [ nodeify] [ ] instead) | :warning : | |
89
104
| [ ` avoid-new ` ] [ avoid-new ] | Avoid creating ` new ` promises outside of utility libs (use [ pify] [ ] instead) | :warning : | |
105
+ | [ ` no-new-statics ` ] [ no-new-statics ] | Avoid calling ` new ` on a Promise static method (e.g. ` new Promise.resolve() ` ) | :bangbang : | |
90
106
| [ ` no-return-in-finally ` ] [ no-return-in-finally ] | Disallow return statements in ` finally() ` | :warning : | |
91
107
| [ ` prefer-await-to-then ` ] [ prefer-await-to-then ] | Prefer ` await ` to ` then() ` for reading Promise values | :seven : | |
92
108
| [ ` prefer-await-to-callbacks ` ] [ prefer-await-to-callbacks ] | Prefer async/await to the callback pattern | :seven : | |
@@ -119,6 +135,7 @@ or start with the recommended rule set
119
135
[ no-promise-in-callback ] : docs/rules/no-promise-in-callback.md
120
136
[ no-callback-in-promise ] : docs/rules/no-callback-in-promise.md
121
137
[ avoid-new ] : docs/rules/avoid-new.md
138
+ [ no-new-statics ] : docs/rules/no-new-statics.md
122
139
[ no-return-in-finally ] : docs/rules/no-return-in-finally.md
123
140
[ prefer-await-to-then ] : docs/rules/prefer-await-to-then.md
124
141
[ prefer-await-to-callbacks ] : docs/rules/prefer-await-to-callbacks.md
0 commit comments