Skip to content

Commit 82b27b6

Browse files
committed
fix linter issues
1 parent bbb46cd commit 82b27b6

File tree

2 files changed

+17
-7
lines changed

2 files changed

+17
-7
lines changed

packages/shared/common/__tests__/options/ServiceEndpoints.test.ts

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,19 @@ describe.each([
3535
});
3636

3737
it('applies payload filter to polling and streaming endpoints', () => {
38-
const endpoints = new ServiceEndpoints('https://stream.launchdarkly.com', 'https://sdk.launchdarkly.com', 'https://events.launchdarkly.com', '/bulk', '/diagnostic', true, 'filterKey');
38+
const endpoints = new ServiceEndpoints(
39+
'https://stream.launchdarkly.com',
40+
'https://sdk.launchdarkly.com',
41+
'https://events.launchdarkly.com',
42+
'/bulk',
43+
'/diagnostic',
44+
true,
45+
'filterKey',
46+
);
3947

40-
expect(endpoints.getStreamingUri('')).toEqual('https://stream.launchdarkly.com/?filter=filterKey');
48+
expect(endpoints.getStreamingUri('')).toEqual(
49+
'https://stream.launchdarkly.com/?filter=filterKey',
50+
);
4151
expect(endpoints.getPollingUri('')).toEqual('https://sdk.launchdarkly.com/?filter=filterKey');
4252
expect(endpoints.events).toEqual('https://events.launchdarkly.com');
4353
});

packages/shared/common/src/options/ServiceEndpoints.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -49,15 +49,15 @@ export default class ServiceEndpoints {
4949
}
5050

5151
/**
52-
* Constructs and returns the URI to be used for a streaming connection.
53-
*/
52+
* Constructs and returns the URI to be used for a streaming connection.
53+
*/
5454
public getStreamingUri(path: string): string {
5555
return this.getFilteredUri(`${this.streaming}${path}`);
5656
}
5757

5858
/**
59-
* Constructs and returns the URI to be used for a polling connection.
60-
*/
59+
* Constructs and returns the URI to be used for a polling connection.
60+
*/
6161
public getPollingUri(path: string): string {
6262
return this.getFilteredUri(`${this.polling}${path}`);
6363
}
@@ -75,7 +75,7 @@ export default class ServiceEndpoints {
7575
}
7676

7777
try {
78-
let url = new URL(uri);
78+
const url = new URL(uri);
7979
url.searchParams.set('filter', this.payloadFilterKey);
8080
return url.toString();
8181
} catch (e) {

0 commit comments

Comments
 (0)