Skip to content

Commit dd743a3

Browse files
enforce to use semicolon
1 parent c288e85 commit dd743a3

13 files changed

+30
-27
lines changed

.eslintrc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@
5656
{
5757
"max": 1
5858
}
59-
]
59+
],
60+
"semi": ["error", "always"]
6061
}
6162
}

src/AzureAppConfigurationImpl.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -481,7 +481,7 @@ export class AzureAppConfigurationImpl implements AzureAppConfiguration {
481481
if (index >= 0) {
482482
this.#onRefreshListeners.splice(index, 1);
483483
}
484-
}
484+
};
485485
return new Disposable(remove);
486486
}
487487

src/JsonKeyValueAdapter.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,4 +54,4 @@ function isJsonContentType(contentTypeValue: string): boolean {
5454
}
5555

5656
return typeParts[1].split("+").includes("json");
57-
}
57+
}

src/load.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ function getClientOptions(options?: AzureAppConfigurationOptions): AppConfigurat
9494
const defaultRetryOptions = {
9595
maxRetries: MaxRetries,
9696
maxRetryDelayInMs: MaxRetryDelayInMs,
97-
}
97+
};
9898
const retryOptions = Object.assign({}, defaultRetryOptions, options?.clientOptions?.retryOptions);
9999

100100
return Object.assign({}, options?.clientOptions, {

src/requestTracing/utils.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ export function listConfigurationSettingsWithTrace(
4040
customHeaders: {
4141
[CORRELATION_CONTEXT_HEADER_NAME]: createCorrelationContextHeader(appConfigOptions, initialLoadCompleted)
4242
}
43-
}
43+
};
4444
}
4545

4646
return client.listConfigurationSettings(actualListOptions);
@@ -64,7 +64,7 @@ export function getConfigurationSettingWithTrace(
6464
customHeaders: {
6565
[CORRELATION_CONTEXT_HEADER_NAME]: createCorrelationContextHeader(appConfigOptions, initialLoadCompleted)
6666
}
67-
}
67+
};
6868
}
6969

7070
return client.getConfigurationSetting(configurationSettingId, actualGetOptions);

test/clientOptions.test.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ describe("custom client options", function () {
3737

3838
afterEach(() => {
3939
nock.restore();
40-
})
40+
});
4141

4242
it("should retry 2 times by default", async () => {
4343
const countPolicy = new HttpRequestCountPolicy();
@@ -49,7 +49,7 @@ describe("custom client options", function () {
4949
position: "perRetry"
5050
}]
5151
}
52-
})
52+
});
5353
};
5454
let error;
5555
try {
@@ -74,7 +74,7 @@ describe("custom client options", function () {
7474
maxRetries
7575
}
7676
}
77-
})
77+
});
7878
};
7979

8080
let error;
@@ -109,7 +109,7 @@ describe("custom client options", function () {
109109
position: "perRetry"
110110
}]
111111
}
112-
})
112+
});
113113
};
114114
let error;
115115
try {
@@ -120,4 +120,4 @@ describe("custom client options", function () {
120120
expect(error).not.undefined;
121121
expect(countPolicy.count).eq(3);
122122
});
123-
})
123+
});

test/featureFlag.test.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,8 @@ describe("feature flags", function () {
6565

6666
after(() => {
6767
restoreMocks();
68-
})
68+
});
69+
6970
it("should load feature flags if enabled", async () => {
7071
const connectionString = createMockedConnectionString();
7172
const settings = await load(connectionString, {

test/json.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ describe("json", function () {
1717

1818
afterEach(() => {
1919
restoreMocks();
20-
})
20+
});
2121

2222
it("should load and parse if content type is application/json", async () => {
2323
mockAppConfigurationClientListConfigurationSettings([jsonKeyValue]);
@@ -86,4 +86,4 @@ describe("json", function () {
8686
expect(settings.get("json.settings.emptyString")).eq("", "is empty string");
8787
expect(settings.get("json.settings.illegalString")).eq("[unclosed", "is illegal string");
8888
});
89-
})
89+
});

test/keyvault.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,4 +111,4 @@ describe("key vault reference", function () {
111111
expect(settings.get("TestKey")).eq("SecretValue");
112112
expect(settings.get("TestKey2")).eq("SecretValue2");
113113
});
114-
})
114+
});

test/load.test.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,8 @@ describe("load", function () {
8585

8686
after(() => {
8787
restoreMocks();
88-
})
88+
});
89+
8990
it("should load data from config store with connection string", async () => {
9091
const connectionString = createMockedConnectionString();
9192
const settings = await load(connectionString);

test/refresh.test.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,12 @@ describe("dynamic refresh", function () {
3333
{ value: "30", key: "app.settings.fontSize", label: "prod" }
3434
].map(createMockedKeyValue);
3535
mockAppConfigurationClientListConfigurationSettings(mockedKVs);
36-
mockAppConfigurationClientGetConfigurationSetting(mockedKVs)
36+
mockAppConfigurationClientGetConfigurationSetting(mockedKVs);
3737
});
3838

3939
afterEach(() => {
4040
restoreMocks();
41-
})
41+
});
4242

4343
it("should throw error when refresh is not enabled but refresh is called", async () => {
4444
const connectionString = createMockedConnectionString();
@@ -331,14 +331,14 @@ describe("dynamic refresh feature flags", function () {
331331

332332
afterEach(() => {
333333
restoreMocks();
334-
})
334+
});
335335

336336
it("should refresh feature flags when enabled", async () => {
337337
mockedKVs = [
338338
createMockedFeatureFlag("Beta", { enabled: true })
339339
];
340340
mockAppConfigurationClientListConfigurationSettings(mockedKVs);
341-
mockAppConfigurationClientGetConfigurationSetting(mockedKVs)
341+
mockAppConfigurationClientGetConfigurationSetting(mockedKVs);
342342

343343
const connectionString = createMockedConnectionString();
344344
const settings = await load(connectionString, {

test/requestTracing.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ describe("request tracing", function () {
4242
});
4343

4444
after(() => {
45-
})
45+
});
4646

4747
it("should have correct user agent prefix", async () => {
4848
try {

test/utils/testHelper.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ function _filterKVs(unfilteredKvs: ConfigurationSetting[], listOptions: any) {
3535
labelMatched = kv.label === labelFilter;
3636
}
3737
return keyMatched && labelMatched;
38-
})
38+
});
3939
}
4040

4141
/**
@@ -86,7 +86,7 @@ function mockAppConfigurationClientListConfigurationSettings(...pages: Configura
8686
});
8787
}
8888
}
89-
}
89+
};
9090
}
9191
};
9292

@@ -126,7 +126,7 @@ function mockSecretClientGetSecret(uriValueList: [string, string][]) {
126126
name: secretName,
127127
value: dict.get(url.toString())
128128
} as KeyVaultSecret;
129-
})
129+
});
130130
}
131131

132132
function restoreMocks() {
@@ -139,11 +139,11 @@ const createMockedConnectionString = (endpoint = createMockedEndpoint(), secret
139139
const toEncodeAsBytes = Buffer.from(secret);
140140
const returnValue = toEncodeAsBytes.toString("base64");
141141
return `Endpoint=${endpoint};Id=${id};Secret=${returnValue}`;
142-
}
142+
};
143143

144144
const createMockedTokenCredential = (tenantId = TEST_TENANT_ID, clientId = TEST_CLIENT_ID, clientSecret = TEST_CLIENT_SECRET) => {
145145
return new ClientSecretCredential(tenantId, clientId, clientSecret);
146-
}
146+
};
147147

148148
const createMockedKeyVaultReference = (key: string, vaultUri: string): ConfigurationSetting => ({
149149
// https://${vaultName}.vault.azure.net/secrets/${secretName}
@@ -210,4 +210,4 @@ export {
210210
createMockedFeatureFlag,
211211

212212
sleepInMs
213-
}
213+
};

0 commit comments

Comments
 (0)