Rule proposal: `no-array-for-each`
See original GitHub issuefor...of
is more readable.
Fail
foo.forEach(x => callback(x));
Pass
for (const x of foo) {
callback(x);
}
Issue Analytics
- State:
- Created 3 years ago
- Reactions:6
- Comments:7 (3 by maintainers)
Top Results From Across the Web
SEC Proposed Rules
SEC Proposed Rules · Regulation NMS: Minimum Pricing Increments, Access Fees, and Transparency of Better Priced Orders · File No: S7-30-22 · Comments...
Read more >eslint-plugin-unicorn/no-array-for-each.md at main - GitHub
This rule is automatically fixable by the --fix CLI option and manually fixable by editor suggestions. Benefits of for…of statement over the forEach ......
Read more >Proposed Rules - GovInfo
This proposed rule, if finalized, would harmonize certain sections of FDA's regulations on human subject protection and institutional review ...
Read more >Reopening of Comment Periods for “Private Fund Advisers
The Securities and Exchange Commission (``Commission'') is reopening the comment period for a release proposing new rules and amendments to ...
Read more >Check-in Differences - System.Data.SQLite.org.
... to add to the global "no" array). # foreach {name value} $test_flags(-no) ... used to ends the loop */ union { /*...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
GitHub disallow this too https://github.com/github/eslint-plugin-github/blob/main/docs/rules/array-foreach.md
For reference, there’s a
prefer-for-of
too, but it’s against regularfor
loops: https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/prefer-for-of.md