opentelemetry-js
opentelemetry-js copied to clipboard
refactor(instrumentation-http): fix eslint warnings
trafficstars
Which problem is this PR solving?
Fixes the following eslint warnings:
/home/runner/work/opentelemetry-js/opentelemetry-js/experimental/packages/opentelemetry-instrumentation-http/src/http.ts
236:41 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any
251:31 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any
252:31 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any
283:41 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any
298:31 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any
299:31 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any
508:17 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion
931:11 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion
1032:13 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion
1043:13 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion
1051:15 warning Don't use `Function` as a type @typescript-eslint/ban-types
/home/runner/work/opentelemetry-js/opentelemetry-js/experimental/packages/opentelemetry-instrumentation-http/test/functionals/http-package.test.ts
86:27 warning 'url.parse' was deprecated since v11.0.0. Use 'url.URL' constructor instead node/no-deprecated-api
/home/runner/work/opentelemetry-js/opentelemetry-js/experimental/packages/opentelemetry-instrumentation-http/test/functionals/https-package.test.ts
86:27 warning 'url.parse' was deprecated since v11.0.0. Use 'url.URL' constructor instead node/no-deprecated-api
/home/runner/work/opentelemetry-js/opentelemetry-js/experimental/packages/opentelemetry-instrumentation-http/test/functionals/utils.test.ts
81:25 warning 'url.parse' was deprecated since v11.0.0. Use 'url.URL' constructor instead node/no-deprecated-api
156:43 warning 'url.parse' was deprecated since v11.0.0. Use 'url.URL' constructor instead node/no-deprecated-api
161:43 warning 'url.parse' was deprecated since v11.0.0. Use 'url.URL' constructor instead node/no-deprecated-api
213:35 warning 'url.parse' was deprecated since v11.0.0. Use 'url.URL' constructor instead node/no-deprecated-api
/home/runner/work/opentelemetry-js/opentelemetry-js/experimental/packages/opentelemetry-instrumentation-http/test/integrations/http-enable.test.ts
300:9 warning 'url.parse' was deprecated since v11.0.0. Use 'url.URL' constructor instead node/no-deprecated-api
/home/runner/work/opentelemetry-js/opentelemetry-js/experimental/packages/opentelemetry-instrumentation-http/test/integrations/https-enable.test.ts
274:9 warning 'url.parse' was deprecated since v11.0.0. Use 'url.URL' constructor instead node/no-deprecated-api
Ref #5365
Short description of the changes
There are a fair bit of changes here, but splitting into multiple PRs would just create a lot of conflicts. So instead, each commit is one unit of change with a detailed description in the commit message.
Type of change
Please delete options that are not relevant.
- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [ ] This change requires a documentation update
How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration
- [x] unit tests
- [x] eslint
- [x] TypeScript
Checklist:
- [x] Followed the style guidelines of this project
- [ ] Unit tests have been added
- [ ] Documentation has been updated