opentelemetry-js
opentelemetry-js copied to clipboard
refactor(api): fix eslint warnings
Which problem is this PR solving?
Fixes the following eslint warnings:
/home/runner/work/opentelemetry-js/opentelemetry-js/api/src/diag/ComponentLogger.ts
36:25 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any
40:25 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any
44:24 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any
48:24 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any
52:27 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any
60:9 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any
/home/runner/work/opentelemetry-js/opentelemetry-js/api/src/experimental/trace/SugaredTracer.ts
80:5 warning 'context' is already declared in the upper scope on line 17 column 10 @typescript-eslint/no-shadow
129:5 warning 'context' is already declared in the upper scope on line 17 column 10 @typescript-eslint/no-shadow
135:5 warning 'context' is already declared in the upper scope on line 17 column 10 @typescript-eslint/no-shadow
/home/runner/work/opentelemetry-js/opentelemetry-js/api/src/trace/NoopTracer.ts
102:37 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any
Ref #5365
Fixing TextMapPropagator.ts is a breaking change, so that will be submitted separately.
Short description of the changes
Refactor to avoid the patterns being flagged.
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] TypeScript
Checklist:
- [x] Followed the style guidelines of this project
- [ ] Unit tests have been added
- [ ] Documentation has been updated
Codecov Report
:white_check_mark: All modified and coverable lines are covered by tests.
:white_check_mark: Project coverage is 95.01%. Comparing base (93187f0) to head (ffcf8cc).
:warning: Report is 29 commits behind head on main.
Additional details and impacted files
@@ Coverage Diff @@
## main #5366 +/- ##
==========================================
- Coverage 95.01% 95.01% -0.01%
==========================================
Files 303 303
Lines 7946 7945 -1
Branches 1607 1607
==========================================
- Hits 7550 7549 -1
Misses 396 396
| Files with missing lines | Coverage Δ | |
|---|---|---|
| api/src/diag/ComponentLogger.ts | 94.73% <100.00%> (-0.27%) |
:arrow_down: |
| api/src/experimental/trace/SugaredTracer.ts | 87.23% <100.00%> (ø) |
:rocket: New features to boost your workflow:
- :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
- :package: JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
This PR is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 14 days.
This PR is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 14 days.
Thank you for your contribution @chancancode! 🎉 We would like to hear from you about your experience contributing to OpenTelemetry by taking a few minutes to fill out this survey.