Skip to content
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

Evaluate and fix lint warnings #4258

Closed
dyladan opened this issue Nov 8, 2023 · 4 comments
Closed

Evaluate and fix lint warnings #4258

dyladan opened this issue Nov 8, 2023 · 4 comments
Assignees
Labels
contribfest These small and isolated issues are suitable for Kubecon Contribfest stale

Comments

@dyladan
Copy link
Member

dyladan commented Nov 8, 2023

Below is a list of lint warnings in OTel JS. Lint warnings may not be fixable in all cases, an exception for the lint failure may be warranted, and in some cases the rule itself may even need to be disabled. For each warning listed below, evaluate if the code should be fixed, the warning should be suppressed, or the rule should be disabled.

Please limit PRs to a single package in order to make them quickly and easily reviewable.
If you are working on one of the below packages, please comment so others know the issue is being worked on.

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

api/src/propagation/TextMapPropagator.ts
30:46 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any
78:42 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any
96:42 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any

api/src/trace/NoopTracer.ts
102:37 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any

packages/opentelemetry-context-zone-peer-dep/src/util.ts
22:39 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any

packages/opentelemetry-context-async-hooks/src/AbstractAsyncHooksContextManager.ts
72:35 warning Don't use Function as a type @typescript-eslint/ban-types
134:60 warning Don't use Function as a type @typescript-eslint/ban-types
152:64 warning Don't use Function as a type @typescript-eslint/ban-types
176:15 warning Don't use Function as a type @typescript-eslint/ban-types

packages/opentelemetry-context-async-hooks/src/AsyncHooksContextManager.ts
49:22 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion

packages/opentelemetry-core/src/utils/lodash.merge.ts
44:24 warning Don't use Function as a type @typescript-eslint/ban-types

experimental/packages/otlp-exporter-base/src/platform/browser/util.ts
119:15 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion

experimental/packages/otlp-exporter-base/src/platform/node/util.ts
118:50 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion
145:37 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any

packages/opentelemetry-resources/src/utils.ts
17:39 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any

experimental/packages/opentelemetry-browser-detector/src/BrowserDetector.ts
67:66 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any

packages/opentelemetry-sdk-trace-base/src/Span.ts
146:9 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion
181:31 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion

packages/opentelemetry-sdk-trace-node/test/registration.test.ts
34:61 warning Don't use Function as a type @typescript-eslint/ban-types

packages/opentelemetry-sdk-trace-web/src/utils.ts
49:14 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any

packages/opentelemetry-exporter-zipkin/src/platform/node/util.ts
34:19 warning 'url.parse' was deprecated since v11.0.0. Use 'url.URL' constructor instead node/no-deprecated-api

experimental/packages/opentelemetry-instrumentation/src/instrumentation.ts
34:51 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any

experimental/packages/opentelemetry-instrumentation/src/platform/node/instrumentation.ts
37:47 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any
173:22 warning 'T' is already declared in the upper scope on line 37 column 43 @typescript-eslint/no-shadow

experimental/packages/opentelemetry-instrumentation/src/platform/node/instrumentationNodeModuleDefinition.ts
31:39 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any

experimental/packages/opentelemetry-instrumentation-xml-http-request/src/types.ts
66:28 warning Don't use Function as a type @typescript-eslint/ban-types

experimental/packages/opentelemetry-instrumentation-xml-http-request/test/xhr.test.ts
60:22 warning Don't use Function as a type @typescript-eslint/ban-types

experimental/packages/opentelemetry-instrumentation-http/src/http.ts
379:17 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion
462:11 warning 'url.parse' was deprecated since v11.0.0. Use 'url.URL' constructor instead node/no-deprecated-api
750:11 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion
828:13 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion
839:13 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion
847:15 warning Don't use Function as a type @typescript-eslint/ban-types

experimental/packages/opentelemetry-instrumentation-http/src/utils.ts
236:21 warning 'url.parse' was deprecated since v11.0.0. Use 'url.URL' constructor instead node/no-deprecated-api
269:18 warning 'url.parse' was deprecated since v11.0.0. Use 'url.URL' constructor instead node/no-deprecated-api
460:36 warning 'url.parse' was deprecated since v11.0.0. Use 'url.URL' constructor instead node/no-deprecated-api

experimental/packages/opentelemetry-instrumentation-http/test/functionals/http-package.test.ts
101:27 warning 'url.parse' was deprecated since v11.0.0. Use 'url.URL' constructor instead node/no-deprecated-api

experimental/packages/opentelemetry-instrumentation-http/test/functionals/https-package.test.ts
101:27 warning 'url.parse' was deprecated since v11.0.0. Use 'url.URL' constructor instead node/no-deprecated-api

experimental/packages/opentelemetry-instrumentation-http/test/functionals/utils.test.ts
72:25 warning 'url.parse' was deprecated since v11.0.0. Use 'url.URL' constructor instead node/no-deprecated-api
226:43 warning 'url.parse' was deprecated since v11.0.0. Use 'url.URL' constructor instead node/no-deprecated-api
231:43 warning 'url.parse' was deprecated since v11.0.0. Use 'url.URL' constructor instead node/no-deprecated-api
278:35 warning 'url.parse' was deprecated since v11.0.0. Use 'url.URL' constructor instead node/no-deprecated-api

experimental/packages/opentelemetry-instrumentation-http/test/integrations/http-enable.test.ts
277:9 warning 'url.parse' was deprecated since v11.0.0. Use 'url.URL' constructor instead node/no-deprecated-api

experimental/packages/opentelemetry-instrumentation-http/test/integrations/https-enable.test.ts
281:9 warning 'url.parse' was deprecated since v11.0.0. Use 'url.URL' constructor instead node/no-deprecated-api

experimental/packages/otlp-grpc-exporter-base/src/OTLPGRPCExporterNodeBase.ts
46:19 warning Don't use Function as a type @typescript-eslint/ban-types

experimental/packages/otlp-grpc-exporter-base/src/types.ts
39:14 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any
42:15 warning Don't use Function as a type @typescript-eslint/ban-types
43:8 warning Don't use {} as a type. {} actually means "any non-nullish value".

  • If you want a type meaning "any object", you probably want object instead.
  • If you want a type meaning "any value", you probably want unknown instead.
  • If you want a type meaning "empty object", you probably want Record<string, never> instead.
  • If you really want a type meaning "any non-nullish value", you probably want NonNullable<unknown> instead @typescript-eslint/ban-types

experimental/packages/opentelemetry-instrumentation-grpc/src/grpc-js/clientUtils.ts
105:42 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any

experimental/packages/opentelemetry-instrumentation-grpc/src/grpc-js/index.ts
155:69 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any
160:69 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any
165:68 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any
170:68 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any

experimental/packages/opentelemetry-instrumentation-grpc/src/grpc-js/serverUtils.ts
113:23 warning Don't use Function as a type @typescript-eslint/ban-types
156:23 warning Don't use Function as a type @typescript-eslint/ban-types
211:31 warning Don't use Function as a type @typescript-eslint/ban-types
215:31 warning Don't use Function as a type @typescript-eslint/ban-types

experimental/packages/opentelemetry-instrumentation-grpc/test/helper.ts
83:11 warning Don't use Function as a type @typescript-eslint/ban-types

experimental/packages/opentelemetry-sdk-node/src/sdk.ts
144:32 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion

@dyladan dyladan added the contribfest These small and isolated issues are suitable for Kubecon Contribfest label Nov 8, 2023
@dyladan dyladan changed the title Evaluate and lint warnings Evaluate and fix lint warnings Nov 8, 2023
@kirandhamodharan
Copy link

Hi, I'm working on it

@lilacyl
Copy link

lilacyl commented Nov 8, 2023

Hey @kirandhamodharan which package are you working on? Is it okay if I work on one package out of these?

@pkanal pkanal assigned pkanal and kirandhamodharan and unassigned pkanal Nov 8, 2023
Copy link

This issue 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.

@github-actions github-actions bot added the stale label Jan 22, 2024
Copy link

This issue was closed because it has been stale for 14 days with no activity.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Mar 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contribfest These small and isolated issues are suitable for Kubecon Contribfest stale
Projects
None yet
Development

No branches or pull requests

4 participants