sindresorhus/eslint-plugin-unicorn

Configurable callee blacklist for `no-fn-reference-in-iterator`

Closed

#787 opened on Jun 29, 2020

 (2 comments) (1 reaction) (0 assignees)JavaScript (468 forks)user submission
enhancementhelp wanted

Repository metrics

Stars
 (5,022 stars)
PR merge metrics
 (Avg merge 1d 16h) (399 merged PRs in 30d)

Description

I noticed that the rule currently has a hard-coded blacklist of callees to ignore.

I ran into a bit of an issue with this as we're currently moving our code base off of bluebird (callee: Promise) to async / await + blend-promise-utils (callee: P). That switch from Promise.map to P.map started throwing false-positives all over our codebase.

What are people's thoughts on making this a configurable option? I'd be willing to take a stab at a PR for it if so.

Contributor guide