Skip to content

[no-sharereplay-before-takeuntil] Alias option to work with takeUntilDestroyed() or other #293

@oBusk

Description

@oBusk

The rule rxjs-x/no-sharereplay-before-takeuntil is very good, and highlights an issue that's very easy to cause.

The weakness is that there might be other methods which wraps takeUntil() and is prone for the same issue. In Angular you have the operator takeUntilDestroyed(), for example.

I imagine it could be an option "alias" which allows specifying methodnames that are also treated as takeUntil() for this rule.

{
  "rxjs-x/no-sharereplay-before-takeuntil": [
    "error",
    {
      "alias": ["takeUntilDestroyed"]
    }
  ],
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions