Skip to content

Conversation

@SamVerschueren
Copy link
Contributor

Trying to fix #121. Currently only implemented a blacklist for Async, async, _, React.children and Promise. It wasn't entirely clear what was meant by

We should always ignore methods with more than 1 argument.

Does this mean that if we pass in more than 1 argument to map, it shouldn't do anything? Because this might be an issue for reduce and reduceRight.

@sindresorhus
Copy link
Owner

Does this mean that if we pass in more than 1 argument to map, it shouldn't do anything? Because this might be an issue for reduce and reduceRight.

Yes, but for reduce and reduceRight we can make an exception and allow up to two arguments.

@sindresorhus
Copy link
Owner

Can you also turn the rule on again in

'unicorn/no-fn-reference-in-iterator': 'off',
and the readme?

@sindresorhus sindresorhus changed the title Add blacklist to no-fn-reference-in-iterator rule to prevent false-positives - fixes #121 Add blacklist to no-fn-reference-in-iterator rule to prevent false-positives Mar 20, 2019
@sindresorhus sindresorhus merged commit 73e8d5d into sindresorhus:master Mar 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

False-positives in no-fn-reference-in-iterator rule

2 participants