Skip to content

Commit f11f703

Browse files
committed
chore(instrumentation): fix linting errors
1 parent a8e857d commit f11f703

File tree

2 files changed

+17
-11
lines changed

2 files changed

+17
-11
lines changed

experimental/packages/opentelemetry-instrumentation/src/platform/node/instrumentation.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -167,11 +167,13 @@ export abstract class InstrumentationBase<T = any>
167167

168168
this._warnOnPreloadedModules();
169169
for (const module of this._modules) {
170-
const onRequire: RequireInTheMiddle.OnRequireFn = (exports, name, baseDir) => {
170+
const onRequire: RequireInTheMiddle.OnRequireFn = (
171+
exports,
172+
name,
173+
baseDir
174+
) => {
171175
return this._onRequire<typeof exports>(
172-
module as unknown as InstrumentationModuleDefinition<
173-
typeof exports
174-
>,
176+
module as unknown as InstrumentationModuleDefinition<typeof exports>,
175177
exports,
176178
name,
177179
baseDir

experimental/packages/opentelemetry-instrumentation/test/node/InstrumentationBase.test.ts

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ import {
2121
InstrumentationBase,
2222
InstrumentationModuleDefinition,
2323
InstrumentationNodeModuleDefinition,
24-
InstrumentationNodeModuleFile
24+
InstrumentationNodeModuleFile,
2525
} from '../../src';
2626

2727
const MODULE_NAME = 'test-module';
@@ -295,7 +295,9 @@ describe('InstrumentationBase', () => {
295295
const moduleName = 'net';
296296
class TestInstrumentation extends InstrumentationBase<Exports> {
297297
constructor() {
298-
super('@opentelemetry/instrumentation-net-test', '0.0.0', { enabled: false });
298+
super('@opentelemetry/instrumentation-net-test', '0.0.0', {
299+
enabled: false,
300+
});
299301
}
300302
init(): InstrumentationNodeModuleDefinition<Exports>[] {
301303
return [
@@ -310,7 +312,7 @@ describe('InstrumentationBase', () => {
310312
exports.__patched = false;
311313
return exports;
312314
}
313-
)
315+
),
314316
];
315317
}
316318
}
@@ -335,7 +337,9 @@ describe('InstrumentationBase', () => {
335337
const fileName = path.join(__dirname, 'fixtures', `${moduleName}.js`);
336338
class TestInstrumentation extends InstrumentationBase<Exports> {
337339
constructor() {
338-
super('@opentelemetry/instrumentation-absolute-path-test', '0.0.0', { enabled: false });
340+
super('@opentelemetry/instrumentation-absolute-path-test', '0.0.0', {
341+
enabled: false,
342+
});
339343
}
340344
init(): InstrumentationNodeModuleDefinition<Exports>[] {
341345
return [
@@ -356,9 +360,9 @@ describe('InstrumentationBase', () => {
356360
if (exports) exports.__patched = false;
357361
return exports;
358362
}
359-
)
360-
],
361-
)
363+
),
364+
]
365+
),
362366
];
363367
}
364368
}

0 commit comments

Comments
 (0)