-
Notifications
You must be signed in to change notification settings - Fork 842
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor(instrumentation-fetch): fix eslint warnings #5401
Merged
pichlermarc
merged 1 commit into
open-telemetry:main
from
tildeio:eslint-warning-instrumentation-fetch
Jan 30, 2025
Merged
refactor(instrumentation-fetch): fix eslint warnings #5401
pichlermarc
merged 1 commit into
open-telemetry:main
from
tildeio:eslint-warning-instrumentation-fetch
Jan 30, 2025
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
``` /home/runner/work/opentelemetry-js/opentelemetry-js/experimental/packages/opentelemetry-instrumentation-fetch/src/utils.ts 137:16 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any 138:21 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any ``` This can be avoided by re-ordering the branches so that TypeScript can narrow the type of the value progressively. Ref open-telemetry#5365
25 tasks
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #5401 +/- ##
=======================================
Coverage 94.63% 94.63%
=======================================
Files 318 318
Lines 8032 8032
Branches 1685 1685
=======================================
Hits 7601 7601
Misses 431 431 |
chancancode
added a commit
to tildeio/opentelemetry-js
that referenced
this pull request
Jan 30, 2025
``` /home/runner/work/opentelemetry-js/opentelemetry-js/experimental/packages/opentelemetry-instrumentation-xml-http-request/src/types.ts 66:28 warning Don't use `Function` as a type @typescript-eslint/ban-types /home/runner/work/opentelemetry-js/opentelemetry-js/experimental/packages/opentelemetry-instrumentation-xml-http-request/src/utils.ts 44:16 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any 45:21 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any /home/runner/work/opentelemetry-js/opentelemetry-js/experimental/packages/opentelemetry-instrumentation-xml-http-request/test/xhr.test.ts 69:22 warning Don't use `Function` as a type @typescript-eslint/ban-types 104:22 warning Don't use `Function` as a type @typescript-eslint/ban-types ``` The middle ones are the same as open-telemetry#5401, the rest are replacing `Function` with a more specific call signature, and they are either in tests or private API, so no breakages expected.
chancancode
added a commit
to tildeio/opentelemetry-js
that referenced
this pull request
Jan 30, 2025
``` /home/runner/work/opentelemetry-js/opentelemetry-js/experimental/packages/opentelemetry-instrumentation-xml-http-request/src/types.ts 66:28 warning Don't use `Function` as a type @typescript-eslint/ban-types /home/runner/work/opentelemetry-js/opentelemetry-js/experimental/packages/opentelemetry-instrumentation-xml-http-request/src/utils.ts 44:16 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any 45:21 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any /home/runner/work/opentelemetry-js/opentelemetry-js/experimental/packages/opentelemetry-instrumentation-xml-http-request/test/xhr.test.ts 69:22 warning Don't use `Function` as a type @typescript-eslint/ban-types 104:22 warning Don't use `Function` as a type @typescript-eslint/ban-types ``` The middle ones are the same as open-telemetry#5401, the rest are replacing `Function` with a more specific call signature, and they are either in tests or private API, so no breakages expected. Ref open-telemetry#5365
8 tasks
pichlermarc
approved these changes
Jan 30, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
neat!
Merged
via the queue into
open-telemetry:main
with commit Jan 30, 2025
29d0da5
15 of 16 checks passed
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Which problem is this PR solving?
Fix the following eslint warnings:
Ref #5365
Short description of the changes
This can be avoided by re-ordering the branches so that TypeScript can narrow the type of the value progressively.
Type of change
Please delete options that are not relevant.
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
Checklist: