Skip to content

linter: promise/catch-or-return support allowThenStrict option #23188

Description

@Sysix

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>,
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Fields

    Priority

    None yet

    Start date

    None yet

    Target date

    None yet

    Effort

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions