The upstream rule allows an option which we do not support at the moment:
https://github.com/eslint-community/eslint-plugin-promise/blob/main/docs/rules/catch-or-return.md#allowthenstrict
Our implementation:
|
pub struct CatchOrReturnConfig { |
|
/// Whether to allow `finally()` as a termination method. |
|
allow_finally: bool, |
|
/// Whether to allow `then()` with two arguments as a termination method. |
|
allow_then: bool, |
|
/// List of allowed termination methods (e.g., `catch`, `done`). |
|
termination_method: Vec<CompactStr>, |
|
} |
The upstream rule allows an option which we do not support at the moment:
https://github.com/eslint-community/eslint-plugin-promise/blob/main/docs/rules/catch-or-return.md#allowthenstrict
Our implementation:
oxc/crates/oxc_linter/src/rules/promise/catch_or_return.rs
Lines 26 to 33 in 123d4f4