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

Simplify prefer-array-flat-map rule #1298

Closed
fisker opened this issue May 19, 2021 · 0 comments · Fixed by #1299
Closed

Simplify prefer-array-flat-map rule #1298

fisker opened this issue May 19, 2021 · 0 comments · Fixed by #1299
Assignees

Comments

@fisker
Copy link
Collaborator

fisker commented May 19, 2021

This.rule also check [].concat(...arr.map()), and don't have a fix for it.

This also checked in prefer-array-flat, and doing a better job, it checkes [].concat(array) , [].concat(...array), [].concat.apply([], array) , and Array.prototype.concat.apply([], array).

We should remove that case, let prefer-array-flat handle that, when it fixed to .map().flat(), will be caught by prefer-flat-map. I don't think anyone enables prefer-array-flat-map but don't enable prefer-array-flat.

I'll do this after #1297, going to use code from that.

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 a pull request may close this issue.

1 participant