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

chore: Resolve Array.forEach lint warnings #9688

Merged
merged 3 commits into from
Jul 13, 2024
Merged

Conversation

siarhei-agoric
Copy link
Contributor

@siarhei-agoric siarhei-agoric commented Jul 11, 2024

Ref #9632

Description

Replaced Array.forEach(); calls with for ( x of y ) { }; loops.

Security Considerations

Assume that Array.forEach() calls are equivalent to for ( x of y ) { }; in all cases.

Scaling Considerations

No significant difference expected.

Documentation Considerations

N/A

Testing Considerations

No new tests required. Local tests passed, including lint (specific to this PR).

Upgrade Considerations

The change preserves the behavior, thus there are no upgrade concerns.

Copy link
Member

@gibson042 gibson042 left a comment

Choose a reason for hiding this comment

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

I was skeptical about the value of this lint rule, but many of the changes are in fact more readable (particularly those in which the iterator result value is destructured or when construction of a temporary Array is no longer necessary).

packages/cosmic-swingset/test/export-storage.test.js Outdated Show resolved Hide resolved
packages/cosmic-swingset/test/export-storage.test.js Outdated Show resolved Hide resolved
packages/solo/src/set-fake-chain.js Outdated Show resolved Hide resolved
Copy link

cloudflare-workers-and-pages bot commented Jul 11, 2024

Deploying agoric-sdk with  Cloudflare Pages  Cloudflare Pages

Latest commit: 363f83f
Status: ✅  Deploy successful!
Preview URL: https://19820dbc.agoric-sdk.pages.dev
Branch Preview URL: https://sliakh-9632-fix-lint.agoric-sdk.pages.dev

View logs

packages/notifier/test/publish-kit.test.js Show resolved Hide resolved
packages/zoe/src/cleanProposal.js Show resolved Hide resolved
packages/zoe/src/contractFacet/zcfSeat.js Outdated Show resolved Hide resolved
Copy link
Contributor

@toliaqat toliaqat left a comment

Choose a reason for hiding this comment

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

Looks good. Thanks for taking this.

@siarhei-agoric siarhei-agoric added the automerge:rebase Automatically rebase updates, then merge label Jul 12, 2024
@gibson042 gibson042 force-pushed the sliakh-9632-fix_lint branch from 74ad576 to 363f83f Compare July 13, 2024 15:42
@mergify mergify bot merged commit bd50e5e into master Jul 13, 2024
78 checks passed
@mergify mergify bot deleted the sliakh-9632-fix_lint branch July 13, 2024 16:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automerge:rebase Automatically rebase updates, then merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants