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

build(lint): add no-array-for-each and migrate existing cases. #6281

Merged
merged 8 commits into from
Dec 23, 2024

Conversation

Hweinstock
Copy link
Contributor

Problem

Many bugs, and confusing behavior stem from developers using an async function within a forEach. This is almost always not desired. Additionally, forEach can lead to bloated implementations when other methods like some, find, reduce, or flatMap are more applicable.

According to https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-array-for-each.md It is also faster with for ... of.

Solution


  • Treat all work as PUBLIC. Private feature/x branches will not be squash-merged at release time.
  • Your code changes must meet the guidelines in CONTRIBUTING.md.
  • License: I confirm that my contribution is made under the terms of the Apache 2.0 license.

@Hweinstock
Copy link
Contributor Author

/runIntegrationTests

@Hweinstock Hweinstock marked this pull request as ready for review December 20, 2024 19:26
@Hweinstock Hweinstock requested review from a team as code owners December 20, 2024 19:26
Copy link
Contributor

@justinmk3 justinmk3 left a comment

Choose a reason for hiding this comment

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

🚀

@justinmk3 justinmk3 merged commit 5ef59ca into aws:master Dec 23, 2024
22 of 23 checks passed
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.

2 participants