Skip to content

Commit

Permalink
chore(instrumentation): fix linting errors
Browse files Browse the repository at this point in the history
  • Loading branch information
mhassan1 committed Dec 5, 2022
1 parent a8e857d commit f11f703
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -167,11 +167,13 @@ export abstract class InstrumentationBase<T = any>

this._warnOnPreloadedModules();
for (const module of this._modules) {
const onRequire: RequireInTheMiddle.OnRequireFn = (exports, name, baseDir) => {
const onRequire: RequireInTheMiddle.OnRequireFn = (
exports,
name,
baseDir
) => {
return this._onRequire<typeof exports>(
module as unknown as InstrumentationModuleDefinition<
typeof exports
>,
module as unknown as InstrumentationModuleDefinition<typeof exports>,
exports,
name,
baseDir
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import {
InstrumentationBase,
InstrumentationModuleDefinition,
InstrumentationNodeModuleDefinition,
InstrumentationNodeModuleFile
InstrumentationNodeModuleFile,
} from '../../src';

const MODULE_NAME = 'test-module';
Expand Down Expand Up @@ -295,7 +295,9 @@ describe('InstrumentationBase', () => {
const moduleName = 'net';
class TestInstrumentation extends InstrumentationBase<Exports> {
constructor() {
super('@opentelemetry/instrumentation-net-test', '0.0.0', { enabled: false });
super('@opentelemetry/instrumentation-net-test', '0.0.0', {
enabled: false,
});
}
init(): InstrumentationNodeModuleDefinition<Exports>[] {
return [
Expand All @@ -310,7 +312,7 @@ describe('InstrumentationBase', () => {
exports.__patched = false;
return exports;
}
)
),
];
}
}
Expand All @@ -335,7 +337,9 @@ describe('InstrumentationBase', () => {
const fileName = path.join(__dirname, 'fixtures', `${moduleName}.js`);
class TestInstrumentation extends InstrumentationBase<Exports> {
constructor() {
super('@opentelemetry/instrumentation-absolute-path-test', '0.0.0', { enabled: false });
super('@opentelemetry/instrumentation-absolute-path-test', '0.0.0', {
enabled: false,
});
}
init(): InstrumentationNodeModuleDefinition<Exports>[] {
return [
Expand All @@ -356,9 +360,9 @@ describe('InstrumentationBase', () => {
if (exports) exports.__patched = false;
return exports;
}
)
],
)
),
]
),
];
}
}
Expand Down

0 comments on commit f11f703

Please sign in to comment.