feat(linter): add checkForEach option to useIterableCallbackReturn#8660
feat(linter): add checkForEach option to useIterableCallbackReturn#8660Faizanq wants to merge 1 commit intobiomejs:mainfrom
Conversation
…iomejs#8024) - Added checkForEach option, defaults to false (matching ESLint) - forEach callbacks with returns are now allowed by default - Set checkForEach: true to enforce no returns in forEach
|
WalkthroughThis change introduces a Pre-merge checks and finishing touches✅ Passed checks (4 passed)
✨ Finishing touches
📜 Recent review detailsConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro ⛔ Files ignored due to path filters (3)
📒 Files selected for processing (6)
💤 Files with no reviewable changes (1)
🧰 Additional context used📓 Path-based instructions (1)**/*.rs📄 CodeRabbit inference engine (CONTRIBUTING.md)
Files:
🧠 Learnings (23)📚 Learning: 2026-01-02T14:58:16.536ZApplied to files:
📚 Learning: 2026-01-02T14:58:16.536ZApplied to files:
📚 Learning: 2026-01-02T14:58:16.536ZApplied to files:
📚 Learning: 2026-01-02T14:58:16.536ZApplied to files:
📚 Learning: 2025-12-22T09:26:56.943ZApplied to files:
📚 Learning: 2026-01-02T14:58:16.536ZApplied to files:
📚 Learning: 2026-01-02T14:58:16.536ZApplied to files:
📚 Learning: 2026-01-02T14:58:16.536ZApplied to files:
📚 Learning: 2026-01-02T14:58:16.536ZApplied to files:
📚 Learning: 2026-01-02T14:58:16.536ZApplied to files:
📚 Learning: 2026-01-02T14:58:16.536ZApplied to files:
📚 Learning: 2026-01-02T14:58:16.536ZApplied to files:
📚 Learning: 2025-11-24T18:05:20.371ZApplied to files:
📚 Learning: 2025-08-05T14:43:29.581ZApplied to files:
📚 Learning: 2026-01-02T14:58:16.536ZApplied to files:
📚 Learning: 2025-11-21T01:10:53.059ZApplied to files:
📚 Learning: 2025-09-25T12:32:59.003ZApplied to files:
📚 Learning: 2026-01-02T14:58:16.536ZApplied to files:
📚 Learning: 2026-01-02T14:58:16.536ZApplied to files:
📚 Learning: 2026-01-02T14:58:16.536ZApplied to files:
📚 Learning: 2026-01-02T14:58:16.536ZApplied to files:
📚 Learning: 2026-01-02T14:58:16.536ZApplied to files:
📚 Learning: 2026-01-02T14:58:16.536ZApplied to files:
🔇 Additional comments (7)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Please, next time, comment on the issue. There's already a PR #8289 |
Summary
Adds the
checkForEachoption touseIterableCallbackReturnrule to match ESLint'sarray-callback-returnbehavior.checkForEachdefaults tofalse(matching ESLint)false: forEach callbacks with return values are allowedtrue: forEach callbacks with return values trigger an errorThis makes migration from ESLint easier for users.
Test plan
validForEachDefault.js- verifies forEach with returns is valid by defaultinvalidCheckForEach.jswith options - verifies forEach with returns errors when enabledCloses #8024