Skip to content

Commit 4a188b1

Browse files
committed
linter
1 parent f2b20b2 commit 4a188b1

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

src/__tests__/LDClient-test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ describe('LDClient', () => {
176176
});
177177

178178
it('logs warning when bootstrap object uses old format', () => {
179-
const client = LDClient.initialize(envName, user, {
179+
LDClient.initialize(envName, user, {
180180
bootstrap: { foo: 'bar' },
181181
});
182182

@@ -192,7 +192,7 @@ describe('LDClient', () => {
192192
});
193193

194194
it('does not log warning when bootstrap object uses new format', () => {
195-
const client = LDClient.initialize(envName, user, {
195+
LDClient.initialize(envName, user, {
196196
bootstrap: { foo: 'bar', $flagsState: { foo: { version: 1 } } },
197197
});
198198

src/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ export function initialize(env, user, options = {}) {
4646
console.warn(messages.bootstrapOldFormat());
4747
}
4848
const ret = {};
49-
keys.forEach(function(key) {
49+
keys.forEach(key => {
5050
if (key !== metadataKey) {
5151
let flag = { value: data[key] };
5252
if (metadata && metadata[key]) {

src/messages.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,11 @@ export const invalidUser = function() {
3838
};
3939

4040
export const bootstrapOldFormat = function() {
41-
'LaunchDarkly client was initialized with bootstrap data that did not include flag metadata. Events may not be sent correctly.' + docLink;
41+
return (
42+
'LaunchDarkly client was initialized with bootstrap data that did not include flag metadata. ' +
43+
'Events may not be sent correctly.' +
44+
docLink
45+
);
4246
};
4347

4448
export const deprecated = function(oldName, newName) {

0 commit comments

Comments
 (0)