Skip to content

Commit cf3b026

Browse files
committed
Fix linting issues
1 parent daceae0 commit cf3b026

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

src/trace/patch-http.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { LogLevel, setLogLevel } from "../utils";
77
import { parentIDHeader, SampleMode, samplingPriorityHeader, traceIDHeader, Source } from "./constants";
88
import { patchHttp, unpatchHttp } from "./patch-http";
99
import { TraceContextService } from "./trace-context-service";
10-
import {URL} from 'url'
10+
import { URL } from "url";
1111

1212
describe("patchHttp", () => {
1313
let traceWrapper = {

src/trace/patch-http.ts

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ function patchMethod(mod: typeof http | typeof https, method: "get" | "request",
3838
[arg1, arg2, arg3] = addTraceContextToArgs(contextService, arg1, arg2, arg3);
3939

4040
if (arg3 === undefined || arg3 === null) {
41-
return original(arg1, arg2)
41+
return original(arg1, arg2);
4242
} else {
4343
return original(arg1, arg2, arg3);
4444
}
@@ -61,18 +61,17 @@ function addTraceContextToArgs(
6161
arg2?: RequestCallback | http.RequestOptions,
6262
arg3?: RequestCallback,
6363
) {
64-
6564
let requestOpts: http.RequestOptions | undefined;
6665
if (typeof arg1 === "string" || arg1 instanceof URL) {
6766
if (arg2 === undefined || arg2 === null) {
6867
requestOpts = {
69-
method: 'GET'
68+
method: "GET",
7069
};
7170
requestOpts = getRequestOptionsWithTraceContext(requestOpts, contextService);
7271
return [arg1, requestOpts, arg3];
73-
} else if (typeof arg2 === "function"){
72+
} else if (typeof arg2 === "function") {
7473
requestOpts = {
75-
method: 'GET'
74+
method: "GET",
7675
};
7776
requestOpts = getRequestOptionsWithTraceContext(requestOpts, contextService);
7877
return [arg1, requestOpts, arg2];

0 commit comments

Comments
 (0)