Skip to content

no-ignored-replay-buffer doesn't check bufferSize if object config passed to shareReplay #100

@sashaqred

Description

@sashaqred

In my project I'm using plugin:rxjs/recommended which comes with two rules: rxjs/no-sharereplay and rxjs/no-ignored-replay-buffer.

The following code is good with rxjs/no-ignored-replay-buffer rule and throws error with rxjs/no-sharereplay rule:

interval(1000).pipe(shareReplay(1));

And this won't throw any linter error:

interval(1000).pipe(shareReplay({refCount: true}));

But bufferSize here is missing. And it looks like here should be error from rxjs/no-ignored-replay-buffer rule. I've checked sources and it looks like the rule check only arguments length but doesn't check the arguments content.

Also, I can help with pull request, if you don't mind.

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