Skip to content

Conversation

@dimaMachina
Copy link
Collaborator

@dimaMachina dimaMachina commented Mar 27, 2023

A "for-of" loop is faster, as it doesn't need to execute the body function for each iteration (it's just a scope). This especially matters if the loop body is complex. sindresorhus/eslint-plugin-unicorn#1522 (comment)

also, GitHub has its own rule that does the same that unicorn plugin https://github.com/github/eslint-plugin-github/blob/main/docs/rules/array-foreach.md

I explicitly added a changeset

@changeset-bot
Copy link

changeset-bot bot commented Mar 27, 2023

🦋 Changeset detected

Latest commit: f0a1f95

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 12 packages
Name Type
codemirror-graphql Patch
graphiql Patch
@graphiql/react Patch
@graphiql/toolkit Patch
graphql-language-service Patch
graphql-language-service-server Patch
monaco-graphql Patch
vscode-graphql-execution Patch
@graphiql/plugin-explorer Patch
cm6-graphql Patch
graphql-language-service-cli Patch
vscode-graphql Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@dimaMachina dimaMachina merged commit 2e477eb into graphql:main Apr 14, 2023
@dimaMachina dimaMachina deleted the no-foreach branch April 14, 2023 18:19
@acao acao mentioned this pull request Apr 14, 2023
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