Skip to content

Commit 571065e

Browse files
authored
fix linting error (#11)
1 parent 10bfd4e commit 571065e

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

src/JsonKeyValueAdapter.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ export class JsonKeyValueAdapter implements IKeyValueAdapter {
2525
if (!setting.value) {
2626
throw new Error("Unexpected empty value for application/json content type.");
2727
}
28-
let parsedValue: any;
28+
let parsedValue: unknown;
2929
try {
3030
parsedValue = JSON.parse(setting.value);
3131
} catch (error) {
@@ -42,9 +42,9 @@ function isJsonContentType(contentTypeValue: string): boolean {
4242
return false;
4343
}
4444

45-
let contentTypeNormalized: string = contentTypeValue.trim().toLowerCase();
46-
let mimeType: string = contentTypeNormalized.split(";", 1)[0].trim();
47-
let typeParts: string[] = mimeType.split("/");
45+
const contentTypeNormalized: string = contentTypeValue.trim().toLowerCase();
46+
const mimeType: string = contentTypeNormalized.split(";", 1)[0].trim();
47+
const typeParts: string[] = mimeType.split("/");
4848
if (typeParts.length !== 2) {
4949
return false;
5050
}

test/json.test.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@ const {
1515

1616
const jsonKeyValue = {
1717
value: '{"Test":{"Level":"Debug"},"Prod":{"Level":"Warning"}}',
18-
key: 'json.settings.logging',
18+
key: "json.settings.logging",
1919
label: null,
20-
contentType: 'application/json',
21-
lastModified: '2023-05-04T04:32:56.000Z',
20+
contentType: "application/json",
21+
lastModified: "2023-05-04T04:32:56.000Z",
2222
tags: {},
23-
etag: 'GdmsLWq3mFjFodVEXUYRmvFr3l_qRiKAW_KdpFbxZKk',
23+
etag: "GdmsLWq3mFjFodVEXUYRmvFr3l_qRiKAW_KdpFbxZKk",
2424
isReadOnly: false
2525
};
2626
const keyVaultKeyValue = createMockedKeyVaultReference("TestKey", "https://fake-vault-name.vault.azure.net/secrets/fakeSecretName");

0 commit comments

Comments
 (0)