const obj = {filter: () => {}};
obj.filter([].join()); // error: Do not pass a function reference directly to an iterator method
.filter
is not an iterator here. I think the rule confuses it with Array.prototype.filter
and the false-positive seems specifically triggered by a CallExpression
argument.
The autofix produces broken code for this case.
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too