You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
skrtheboss
added a commit
to skrtheboss/eslint-plugin-rxjs
that referenced
this issue
May 12, 2023
Fixescartant#100
There's also a proposed fix PR in the upstream repo
cartant#114 but I avoided
looking at that solution to avoid any license issue, so this solution
might be different.
- Fix: if the `shareReplay` operator was passed an object config, then
require `bufferSize` to be in that object.
- Fix: the rule wasn't handling if `shareReplay` is imported under a
namespace.
- (Might need to review the entire project. Since rxjs now recommends
importing from "rxjs" instead of "rxjs/operators", there's a risk that
many rules also fail to account for that new paradigm. Note that this
rule is the only rule that tests namespace imports for all cases, so we
at least should expand that coverage/type of test.)
In my project I'm using
plugin:rxjs/recommended
which comes with two rules:rxjs/no-sharereplay
andrxjs/no-ignored-replay-buffer
.The following code is good with
rxjs/no-ignored-replay-buffer
rule and throws error withrxjs/no-sharereplay
rule:And this won't throw any linter error:
But
bufferSize
here is missing. And it looks like here should be error fromrxjs/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.
The text was updated successfully, but these errors were encountered: