mirror of
https://github.com/oxc-project/oxc.git
synced 2026-11-04 10:29:58 +00:00
feat(linter): mark promise rules as recommended (#27693)
Copying recommended state from upstream. --- <sub>Stack created with <a href="https://github.com/github/gh-stack">GitHub Stacks CLI</a> • <a href="https://gh.io/stacks-feedback">Give Feedback 💬</a></sub>
This commit is contained in:
1 parent
566b11b2db
commit
d85a3bab3e
10 files changed
+10
No files matched your search
@@ -183,6 +183,7 @@ declare_oxc_lint!(
|
||||
AlwaysReturn,
|
||||
promise,
|
||||
suspicious,
|
||||
recommended,
|
||||
config = AlwaysReturnConfig,
|
||||
version = "1.13.0",
|
||||
short_description = "Require returning inside each `then()` to create readable and reusable Promise chains.",
|
||||
|
||||
@@ -165,6 +165,7 @@ declare_oxc_lint!(
|
||||
CatchOrReturn,
|
||||
promise,
|
||||
restriction,
|
||||
recommended,
|
||||
config = CatchOrReturnConfig,
|
||||
version = "0.9.2",
|
||||
short_description = "Ensure that each `then()` applied to a promise also has a `catch()`.",
|
||||
|
||||
@@ -86,6 +86,7 @@ declare_oxc_lint!(
|
||||
NoCallbackInPromise,
|
||||
promise,
|
||||
correctness,
|
||||
recommended,
|
||||
config = NoCallbackInPromiseConfig,
|
||||
version = "0.10.0",
|
||||
short_description = "Disallows calling a callback function (`cb()`) inside a `Promise.prototype.then()` or `Promise.prototype.catch()`.",
|
||||
|
||||
@@ -66,6 +66,7 @@ declare_oxc_lint!(
|
||||
NoNesting,
|
||||
promise,
|
||||
style,
|
||||
recommended,
|
||||
pending,
|
||||
version = "0.15.13",
|
||||
short_description = "Disallow nested `then()` or `catch()` statements.",
|
||||
|
||||
@@ -41,6 +41,7 @@ declare_oxc_lint!(
|
||||
NoNewStatics,
|
||||
promise,
|
||||
correctness,
|
||||
recommended,
|
||||
fix,
|
||||
version = "0.6.1",
|
||||
short_description = "Disallows calling new on static `Promise` methods.",
|
||||
|
||||
@@ -60,6 +60,7 @@ declare_oxc_lint!(
|
||||
NoPromiseInCallback,
|
||||
promise,
|
||||
suspicious,
|
||||
recommended,
|
||||
config = NoPromiseInCallback,
|
||||
version = "0.13.1",
|
||||
short_description = "Disallows the use of Promises within error-first callback functions.",
|
||||
|
||||
@@ -43,6 +43,7 @@ declare_oxc_lint!(
|
||||
NoReturnInFinally,
|
||||
promise,
|
||||
nursery,
|
||||
recommended,
|
||||
version = "0.7.1",
|
||||
short_description = "Disallow return statements in a `finally()` callback of a promise.",
|
||||
);
|
||||
|
||||
@@ -134,6 +134,7 @@ declare_oxc_lint!(
|
||||
NoReturnWrap,
|
||||
promise,
|
||||
style,
|
||||
recommended,
|
||||
pending,
|
||||
config = NoReturnWrap,
|
||||
version = "0.15.14",
|
||||
|
||||
@@ -80,6 +80,7 @@ declare_oxc_lint!(
|
||||
ParamNames,
|
||||
promise,
|
||||
style,
|
||||
recommended,
|
||||
config = ParamNamesConfig,
|
||||
version = "0.6.1",
|
||||
short_description = "Enforce standard parameter names for Promise constructors.",
|
||||
|
||||
@@ -63,6 +63,7 @@ declare_oxc_lint!(
|
||||
ValidParams,
|
||||
promise,
|
||||
correctness,
|
||||
recommended,
|
||||
version = "0.7.1",
|
||||
short_description = "Enforce that Promise functions are called with the correct number of arguments.",
|
||||
);
|
||||
|
||||
Reference in new issue
Block a user