Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

no-array-callback-reference: Ignore primitive wrappers in Array#map() #1642

Merged
merged 1 commit into from Dec 17, 2021

Conversation

fisker
Copy link
Collaborator

@fisker fisker commented Dec 17, 2021

All these primitive wrappers only accept one argument, they will never change, it's safe to use in Array#map()

ignore: [
'Boolean',
],
},
Copy link
Collaborator Author

@fisker fisker Dec 17, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I made a mistake in #1570, this is not reasonable to use in Array#flatMap(), it should return an array.

@sindresorhus sindresorhus merged commit 0362c09 into sindresorhus:main Dec 17, 2021
@fisker fisker deleted the map-wrappers branch December 17, 2021 12:43
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.

None yet

2 participants