chore(eslint): update Unicorn and enable iteration fallback style - #9673
Conversation
## Summary Update `eslint-plugin-unicorn` to 73.0.0 and enable `unicorn/iteration-fallback-style` across the repository. ## Why The rule makes iterable fallback contracts explicit. Repository-owned collections are iterated directly, while nullable and third-party values keep guarded iteration. ## Test plan `npm run lint` and focused Bedrock, remote-config, Jest, WebdriverIO, Vitest, and telemetry tests.
Overall package sizeSelf size: 7.81 MB Dependency sizes| name | version | self size | total size | |------|---------|-----------|------------| | import-in-the-middle | 3.3.3 | 125.43 kB | 441.68 kB | | opentracing | 0.14.7 | 194.81 kB | 194.81 kB | | dc-polyfill | 0.1.11 | 25.74 kB | 25.74 kB |🤖 This report was automatically generated by heaviest-objects-in-the-universe |
🎉 All green!🧪 All tests passed 🎯 Code Coverage (details) 🔗 Commit SHA: 39fce0f | Docs | Datadog PR Page | Give us feedback! |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #9673 +/- ##
========================================
Coverage 98.51% 98.51%
========================================
Files 957 957
Lines 134553 134614 +61
Branches 11689 12064 +375
========================================
+ Hits 132551 132612 +61
Misses 2002 2002
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
BenchmarksBenchmark execution time: 2026-08-04 13:56:21 Comparing candidate commit 39fce0f in PR branch Found 0 performance improvements and 0 performance regressions! Performance is the same for 2317 metrics, 41 unstable metrics.
|
There was a problem hiding this comment.
More details
The iteration-fallback changes preserve behavior across the exercised runtime paths, including absent, empty, malformed, and populated Bedrock, LLMObs, CI manifest, routing, and test-runner inputs. No additional tests recommended: the production-shaped cases were already covered by the changed Bedrock tests or existing neighboring suites, and no surprising input class or regression was found.
📊 Validated against 12 scenarios · Open Bits AI session
🤖 Datadog Autotest · Commit 39fce0f · What is Autotest? · @DataDog review to ask questions · Any feedback? Reach out in #autotest
Summary
Update
eslint-plugin-unicornto 73.0.0 and enableunicorn/iteration-fallback-style. Replace implicit iterable fallbacks with guards where values can be absent and direct iteration where collections are required.Why
The rule makes iterable fallback contracts visible. Required repository-owned collections now fail on broken invariants, while genuinely nullable and third-party values keep guards.
unicorn/single-line-block-comment-stylestays disabled because Unicorn 73 recommends it and enabling it here would add an unrelated JSDoc formatting migration.