From 817bd92319b266ca7e0bb083034128e01ad6cc8d Mon Sep 17 00:00:00 2001 From: Godfrey Chan Date: Tue, 28 Jan 2025 14:16:45 -0800 Subject: [PATCH] refactor(instrumentation): fix eslint warnings ``` /home/runner/work/opentelemetry-js/opentelemetry-js/experimental/packages/opentelemetry-instrumentation/src/types.ts 140:24 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any 140:68 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any 146:24 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any ``` The annotations weren't working because they were placed on the wrong lines. Ref #5365 --- .../opentelemetry-instrumentation/src/types.ts | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/experimental/packages/opentelemetry-instrumentation/src/types.ts b/experimental/packages/opentelemetry-instrumentation/src/types.ts index b58054ac0df..feb94ba7342 100644 --- a/experimental/packages/opentelemetry-instrumentation/src/types.ts +++ b/experimental/packages/opentelemetry-instrumentation/src/types.ts @@ -135,15 +135,12 @@ export interface InstrumentationModuleDefinition { includePrerelease?: boolean; /** Method to patch the instrumentation */ - // eslint-disable-next-line @typescript-eslint/no-explicit-any - patch?: - | ((moduleExports: any, moduleVersion?: string | undefined) => any) - | undefined; + patch?: // eslint-disable-next-line @typescript-eslint/no-explicit-any + ((moduleExports: any, moduleVersion?: string | undefined) => any) | undefined; /** Method to unpatch the instrumentation */ - // eslint-disable-next-line @typescript-eslint/no-explicit-any - unpatch?: - | ((moduleExports: any, moduleVersion?: string | undefined) => void) + unpatch?: // eslint-disable-next-line @typescript-eslint/no-explicit-any + | ((moduleExports: any, moduleVersion?: string | undefined) => void) | undefined; }