Skip to content

Commit ed1030c

Browse files
committed
fix: lint issues in browser SDK and example app
1 parent da5ccdc commit ed1030c

3 files changed

Lines changed: 10 additions & 11 deletions

File tree

packages/sdk/browser/example-fdv2/src/app.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -112,12 +112,12 @@ function buildUI() {
112112
modeSection.appendChild(modeStatus);
113113
modeSection.appendChild(el('br'));
114114
const modes: FDv2ConnectionMode[] = ['streaming', 'polling', 'offline', 'one-shot', 'background'];
115-
for (const mode of modes) {
115+
modes.forEach((mode) => {
116116
const btn = el('button', { id: `btn-mode-${mode}` });
117117
btn.textContent = mode;
118118
modeSection.appendChild(btn);
119119
modeSection.appendChild(text(' '));
120-
}
120+
});
121121
const btnModeClear = el('button', { id: 'btn-mode-clear' });
122122
btnModeClear.textContent = 'Clear';
123123
modeSection.appendChild(btnModeClear);
@@ -282,13 +282,13 @@ const main = async () => {
282282
'one-shot',
283283
'background',
284284
];
285-
for (const mode of connectionModes) {
285+
connectionModes.forEach((mode) => {
286286
document.getElementById(`btn-mode-${mode}`)!.addEventListener('click', () => {
287287
client.setConnectionMode(mode);
288288
updateModeStatus(mode);
289289
log(`setConnectionMode('${mode}')`);
290290
});
291-
}
291+
});
292292
document.getElementById('btn-mode-clear')!.addEventListener('click', () => {
293293
client.setConnectionMode(undefined);
294294
updateModeStatus(undefined);

packages/sdk/browser/src/LDClient.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import {
2-
FDv2ConnectionMode,
32
LDClient as CommonClient,
3+
FDv2ConnectionMode,
44
LDContext,
55
LDIdentifyResult,
66
LDWaitForInitializationOptions,
@@ -33,10 +33,7 @@ export interface LDStartOptions extends LDWaitForInitializationOptions {
3333
* For more information, see the [SDK Reference Guide](https://docs.launchdarkly.com/sdk/client-side/javascript).
3434
*/
3535

36-
export type LDClient = Omit<
37-
CommonClient,
38-
'getConnectionMode' | 'getOffline' | 'identify'
39-
> & {
36+
export type LDClient = Omit<CommonClient, 'getConnectionMode' | 'getOffline' | 'identify'> & {
4037
/**
4138
* @ignore
4239
* Implementation Note: The SDK does not support offline mode. Instead bootstrap data can be used.

packages/sdk/browser/src/options.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,10 @@ const DEFAULT_FLUSH_INTERVAL_SECONDS = 2;
2424
* to this feature please join the EAP.
2525
* https://launchdarkly.com/docs/sdk/features/data-saving-mode
2626
*/
27-
export interface BrowserDataSystemOptions
28-
extends Omit<LDClientDataSystemOptions, 'automaticModeSwitching'> {
27+
export interface BrowserDataSystemOptions extends Omit<
28+
LDClientDataSystemOptions,
29+
'automaticModeSwitching'
30+
> {
2931
automaticModeSwitching?: false | ManualModeSwitching;
3032
}
3133

0 commit comments

Comments
 (0)