Skip to content

chore: activate unicorn/no-array-for-each eslint rule#7403

Merged
BridgeAR merged 3 commits intomasterfrom
BridgeAR/2026-02-01-activate-unicorn-foreach-rule
Feb 3, 2026
Merged

chore: activate unicorn/no-array-for-each eslint rule#7403
BridgeAR merged 3 commits intomasterfrom
BridgeAR/2026-02-01-activate-unicorn-foreach-rule

Conversation

@BridgeAR
Copy link
Copy Markdown
Member

@BridgeAR BridgeAR commented Feb 1, 2026

This uses autofixes with manual improvements afterwards.

@codecov
Copy link
Copy Markdown

codecov bot commented Feb 1, 2026

Codecov Report

❌ Patch coverage is 83.79888% with 29 lines in your changes missing coverage. Please review.
✅ Project coverage is 80.40%. Comparing base (e19ce95) to head (6684250).
⚠️ Report is 3 commits behind head on master.

Files with missing lines Patch % Lines
...ackages/dd-trace/src/profiling/profilers/events.js 66.66% 4 Missing ⚠️
...ckages/datadog-instrumentations/src/mocha/utils.js 0.00% 2 Missing ⚠️
...ckages/datadog-plugin-azure-functions/src/index.js 0.00% 2 Missing ⚠️
packages/datadog-plugin-jest/src/index.js 0.00% 2 Missing ⚠️
packages/datadog-plugin-playwright/src/index.js 0.00% 2 Missing ⚠️
packages/dd-trace/src/opentracing/span.js 71.42% 2 Missing ⚠️
packages/dd-trace/src/plugins/ci_plugin.js 0.00% 2 Missing ⚠️
...ackages/datadog-instrumentations/src/mocha/main.js 0.00% 1 Missing ⚠️
...kages/datadog-plugin-apollo/src/gateway/request.js 50.00% 1 Missing ⚠️
...ges/datadog-plugin-aws-sdk/src/services/kinesis.js 0.00% 1 Missing ⚠️
... and 10 more
Additional details and impacted files
@@           Coverage Diff           @@
##           master    #7403   +/-   ##
=======================================
  Coverage   80.39%   80.40%           
=======================================
  Files         732      732           
  Lines       31028    31050   +22     
=======================================
+ Hits        24945    24965   +20     
- Misses       6083     6085    +2     
Flag Coverage Δ
aiguard-macos 39.07% <30.76%> (-0.10%) ⬇️
aiguard-ubuntu 39.11% <30.76%> (-0.10%) ⬇️
aiguard-windows 38.96% <30.76%> (-0.10%) ⬇️
apm-capabilities-tracing-macos 48.88% <31.08%> (-0.03%) ⬇️
apm-capabilities-tracing-ubuntu 48.89% <31.08%> (-0.02%) ⬇️
apm-capabilities-tracing-windows 48.57% <31.08%> (-0.06%) ⬇️
apm-integrations-child-process 38.56% <38.09%> (-0.10%) ⬇️
apm-integrations-couchbase-18 37.46% <40.90%> (+0.08%) ⬆️
apm-integrations-couchbase-eol 37.80% <41.46%> (-0.07%) ⬇️
apm-integrations-oracledb 37.99% <36.58%> (-0.07%) ⬇️
appsec-express 55.36% <40.00%> (-0.09%) ⬇️
appsec-fastify 51.99% <34.31%> (-0.07%) ⬇️
appsec-graphql 52.31% <38.53%> (-0.08%) ⬇️
appsec-kafka 44.63% <31.68%> (-0.07%) ⬇️
appsec-ldapjs 44.30% <29.89%> (-0.08%) ⬇️
appsec-lodash 43.98% <30.00%> (-0.07%) ⬇️
appsec-macos 58.48% <71.02%> (-0.04%) ⬇️
appsec-mongodb-core 49.07% <42.30%> (-0.21%) ⬇️
appsec-mongoose 49.88% <43.39%> (-0.08%) ⬇️
appsec-mysql 51.26% <34.61%> (-0.07%) ⬇️
appsec-node-serialize 43.49% <27.83%> (-0.08%) ⬇️
appsec-passport 48.10% <51.11%> (-0.07%) ⬇️
appsec-postgres 51.05% <34.61%> (-0.07%) ⬇️
appsec-sourcing 42.84% <27.83%> (-0.08%) ⬇️
appsec-template 43.66% <27.83%> (-0.08%) ⬇️
appsec-ubuntu 58.50% <71.02%> (-0.04%) ⬇️
appsec-windows 58.36% <71.02%> (-0.04%) ⬇️
instrumentations-instrumentation-bluebird 32.23% <12.82%> (-0.13%) ⬇️
instrumentations-instrumentation-body-parser 40.72% <38.63%> (-0.07%) ⬇️
instrumentations-instrumentation-child_process 37.87% <38.09%> (-0.10%) ⬇️
instrumentations-instrumentation-cookie-parser 34.50% <31.81%> (-0.09%) ⬇️
instrumentations-instrumentation-express 34.84% <36.36%> (-0.09%) ⬇️
instrumentations-instrumentation-express-mongo-sanitize 34.63% <31.81%> (-0.09%) ⬇️
instrumentations-instrumentation-express-session 40.40% <43.18%> (-0.07%) ⬇️
instrumentations-instrumentation-fs 31.83% <12.82%> (-0.13%) ⬇️
instrumentations-instrumentation-generic-pool 29.79% <30.00%> (ø)
instrumentations-instrumentation-http 39.61% <41.46%> (-0.08%) ⬇️
instrumentations-instrumentation-knex 32.24% <12.82%> (-0.13%) ⬇️
instrumentations-instrumentation-mongoose 33.61% <44.68%> (-0.07%) ⬇️
instrumentations-instrumentation-multer 40.46% <38.63%> (-0.07%) ⬇️
instrumentations-instrumentation-mysql2 38.26% <28.20%> (-0.10%) ⬇️
instrumentations-instrumentation-passport 40.76% <43.18%> (-0.07%) ⬇️
instrumentations-instrumentation-passport-http 40.73% <43.18%> (-0.07%) ⬇️
instrumentations-instrumentation-passport-local 40.73% <43.18%> (-0.07%) ⬇️
instrumentations-instrumentation-pg 37.78% <28.20%> (-0.10%) ⬇️
instrumentations-instrumentation-promise 32.16% <12.82%> (-0.13%) ⬇️
instrumentations-instrumentation-promise-js 32.17% <12.82%> (-0.13%) ⬇️
instrumentations-instrumentation-q 32.21% <12.82%> (-0.13%) ⬇️
instrumentations-instrumentation-url 32.13% <12.82%> (-0.13%) ⬇️
instrumentations-instrumentation-when 32.18% <12.82%> (-0.13%) ⬇️
llmobs-ai 41.40% <36.58%> (-0.07%) ⬇️
llmobs-anthropic 40.62% <36.58%> (-0.07%) ⬇️
llmobs-bedrock 39.51% <34.04%> (-0.07%) ⬇️
llmobs-google-genai 40.11% <36.36%> (-0.07%) ⬇️
llmobs-langchain 39.65% <34.04%> (-0.06%) ⬇️
llmobs-openai 44.45% <36.58%> (-0.07%) ⬇️
llmobs-vertex-ai 40.33% <36.36%> (-0.15%) ⬇️
platform-core 28.09% <ø> (ø)
platform-esbuild 31.49% <ø> (ø)
platform-instrumentations-misc 39.62% <0.00%> (ø)
platform-shimmer 34.83% <ø> (ø)
platform-unit-guardrails 30.37% <ø> (ø)
plugins-azure-event-hubs 22.64% <ø> (ø)
plugins-azure-service-bus 22.08% <ø> (ø)
plugins-bullmq 43.56% <44.44%> (-0.07%) ⬇️
plugins-cassandra 38.03% <36.58%> (-0.07%) ⬇️
plugins-cookie 23.69% <ø> (ø)
plugins-cookie-parser 23.50% <ø> (ø)
plugins-crypto 22.88% <ø> (ø)
plugins-dd-trace-api 38.38% <38.46%> (-0.10%) ⬇️
plugins-express-mongo-sanitize 23.67% <ø> (ø)
plugins-express-session 23.46% <ø> (ø)
plugins-fastify 42.52% <42.85%> (-0.07%) ⬇️
plugins-fetch 38.59% <38.63%> (-0.07%) ⬇️
plugins-fs 38.66% <38.46%> (-0.08%) ⬇️
plugins-generic-pool 22.68% <ø> (ø)
plugins-google-cloud-pubsub 45.73% <56.66%> (-0.07%) ⬇️
plugins-grpc 41.29% <46.93%> (-0.08%) ⬇️
plugins-handlebars 23.71% <ø> (ø)
plugins-hapi 40.42% <41.46%> (-0.08%) ⬇️
plugins-hono 40.62% <40.47%> (-0.08%) ⬇️
plugins-ioredis 38.46% <38.46%> (-0.08%) ⬇️
plugins-knex 23.51% <ø> (ø)
plugins-ldapjs 21.28% <ø> (ø)
plugins-limitd-client 32.53% <12.82%> (-0.13%) ⬇️
plugins-lodash 22.74% <ø> (ø)
plugins-mariadb 39.53% <43.58%> (-0.08%) ⬇️
plugins-memcached 38.20% <38.46%> (-0.07%) ⬇️
plugins-microgateway-core 39.43% <39.02%> (-0.08%) ⬇️
plugins-moleculer 40.83% <38.63%> (-0.08%) ⬇️
plugins-mongodb 39.54% <39.53%> (-0.07%) ⬇️
plugins-mongodb-core 39.12% <38.46%> (-0.08%) ⬇️
plugins-mongoose 39.17% <44.68%> (-0.07%) ⬇️
plugins-multer 23.46% <ø> (ø)
plugins-mysql 39.22% <38.46%> (-0.11%) ⬇️
plugins-mysql2 39.30% <38.46%> (-0.08%) ⬇️
plugins-node-serialize 23.73% <ø> (ø)
plugins-opensearch 37.87% <36.58%> (-0.07%) ⬇️
plugins-postgres 35.70% <34.04%> (-0.07%) ⬇️
plugins-process 22.88% <ø> (ø)
plugins-pug 23.69% <ø> (ø)
plugins-redis 38.78% <38.46%> (-0.08%) ⬇️
plugins-router 43.23% <45.45%> (-0.08%) ⬇️
plugins-sequelize 22.27% <ø> (ø)
plugins-test-and-upstream-amqp10 38.53% <42.85%> (-0.07%) ⬇️
plugins-test-and-upstream-amqplib 43.74% <45.23%> (-0.22%) ⬇️
plugins-test-and-upstream-apollo 39.32% <31.37%> (-0.07%) ⬇️
plugins-test-and-upstream-avsc 38.80% <41.02%> (-0.09%) ⬇️
plugins-test-and-upstream-bunyan 33.85% <33.33%> (-0.10%) ⬇️
plugins-test-and-upstream-connect 41.04% <41.46%> (-0.08%) ⬇️
plugins-test-and-upstream-graphql 40.22% <55.81%> (-0.09%) ⬇️
plugins-test-and-upstream-koa 40.68% <41.86%> (-0.07%) ⬇️
plugins-test-and-upstream-protobufjs 39.04% <42.50%> (-0.09%) ⬇️
plugins-test-and-upstream-rhea 44.15% <47.72%> (-0.11%) ⬇️
plugins-undici 39.39% <37.77%> (-0.07%) ⬇️
plugins-url 22.88% <ø> (ø)
plugins-valkey 38.11% <38.46%> (-0.05%) ⬇️
plugins-vm 22.88% <ø> (ø)
plugins-winston 34.26% <31.70%> (-0.09%) ⬇️
plugins-ws 40.74% <39.02%> (-0.09%) ⬇️
profiling-macos 40.05% <46.15%> (-0.06%) ⬇️
profiling-ubuntu 40.10% <46.15%> (-0.06%) ⬇️
profiling-windows 41.46% <42.10%> (-0.07%) ⬇️
serverless-azure-functions-client 22.88% <ø> (ø)
serverless-azure-functions-eventhubs 22.88% <ø> (ø)
serverless-azure-functions-servicebus 22.88% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Feb 1, 2026

Overall package size

Self size: 4.5 MB
Deduped: 5.34 MB
No deduping: 5.34 MB

Dependency sizes | name | version | self size | total size | |------|---------|-----------|------------| | import-in-the-middle | 2.0.3 | 76.87 kB | 808.03 kB | | dc-polyfill | 0.1.10 | 26.73 kB | 26.73 kB |

🤖 This report was automatically generated by heaviest-objects-in-the-universe

@datadog-datadog-prod-us1

This comment has been minimized.

@pr-commenter
Copy link
Copy Markdown

pr-commenter bot commented Feb 1, 2026

Benchmarks

Benchmark execution time: 2026-02-03 03:07:28

Comparing candidate commit 6684250 in PR branch BridgeAR/2026-02-01-activate-unicorn-foreach-rule with baseline commit e19ce95 in branch master.

Found 0 performance improvements and 0 performance regressions! Performance is the same for 229 metrics, 31 unstable metrics.

@BridgeAR BridgeAR marked this pull request as ready for review February 1, 2026 15:26
@BridgeAR BridgeAR requested review from a team as code owners February 1, 2026 15:26
@BridgeAR BridgeAR requested review from khanayan123 and removed request for a team February 1, 2026 15:26
status = 'skip'
} else {
// has to check every test in the test file
// eslint-disable-next-line unicorn/no-array-for-each
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Why skip this one?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Mocha was weird. I believe they have own methods that are not behaving as the native one.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

@juan-fernandez you might know more

tlhunter
tlhunter previously approved these changes Feb 2, 2026
This uses autofixes with manual improvements afterwards.
@BridgeAR BridgeAR force-pushed the BridgeAR/2026-02-01-activate-unicorn-foreach-rule branch from 95fce24 to 6684250 Compare February 3, 2026 02:55
Copy link
Copy Markdown
Collaborator

@sabrenner sabrenner left a comment

Choose a reason for hiding this comment

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

lgtm! just a couple of questions about some things are changing behavior/could cause regressions (although, i could be wrong for sure, but if i'm right, it seems we don't have test cases that cover them 😅). on resolving the comments im good to approve!

Copy link
Copy Markdown
Collaborator

@sabrenner sabrenner left a comment

Choose a reason for hiding this comment

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

lgtm!

@BridgeAR BridgeAR merged commit d308b93 into master Feb 3, 2026
819 of 821 checks passed
@BridgeAR BridgeAR deleted the BridgeAR/2026-02-01-activate-unicorn-foreach-rule branch February 3, 2026 16:09
dd-octo-sts bot pushed a commit that referenced this pull request Feb 4, 2026
This uses autofixes with manual improvements afterwards.
@dd-octo-sts dd-octo-sts bot mentioned this pull request Feb 4, 2026
BridgeAR added a commit that referenced this pull request Feb 5, 2026
This uses autofixes with manual improvements afterwards.
bm1549 pushed a commit that referenced this pull request Feb 10, 2026
This uses autofixes with manual improvements afterwards.
BridgeAR added a commit that referenced this pull request Feb 22, 2026
This uses autofixes with manual improvements afterwards.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants