Skip to content

Commit c288e85

Browse files
Update linting rule (#90)
* update linting rule * fix format issue * update
1 parent 0863334 commit c288e85

18 files changed

+34
-18
lines changed

.eslintrc

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,22 @@
4040
"avoidEscape": true
4141
}
4242
],
43-
"@typescript-eslint/no-explicit-any": "off"
43+
"@typescript-eslint/no-explicit-any": "off",
44+
"eol-last": [
45+
"error",
46+
"always"
47+
],
48+
"no-trailing-spaces": "error",
49+
"space-before-blocks": [
50+
"error",
51+
"always"
52+
],
53+
"no-multi-spaces": "error",
54+
"no-multiple-empty-lines": [
55+
"error",
56+
{
57+
"max": 1
58+
}
59+
]
4460
}
4561
}

src/AzureAppConfigurationImpl.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -575,4 +575,4 @@ function getValidFeatureFlagSelectors(selectors?: SettingSelector[]): SettingSel
575575
} else {
576576
return getValidSelectors(selectors);
577577
}
578-
}
578+
}

src/AzureAppConfigurationOptions.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,4 +47,4 @@ export interface AzureAppConfigurationOptions {
4747
* Specifies options used to configure feature flags.
4848
*/
4949
featureFlagOptions?: FeatureFlagOptions;
50-
}
50+
}

src/IKeyValueAdapter.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@ export interface IKeyValueAdapter {
1313
* This method process the original configuration setting, and returns processed key and value in an array.
1414
*/
1515
processKeyValue(setting: ConfigurationSetting): Promise<[string, unknown]>;
16-
}
16+
}

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/RefreshOptions.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ export interface RefreshOptions {
2020
refreshIntervalInMs?: number;
2121

2222
/**
23-
* One or more configuration settings to be watched for changes on the server.
23+
* One or more configuration settings to be watched for changes on the server.
2424
* Any modifications to watched settings will refresh all settings loaded by the configuration provider when refresh() is called.
2525
*/
2626
watchedSettings?: WatchedSetting[];

src/WatchedSetting.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,4 @@ export interface WatchedSetting {
1515
* Leaving this undefined means this setting does not have a label.
1616
*/
1717
label?: string;
18-
}
18+
}

src/common/disposable.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,4 @@ export class Disposable {
1515
}
1616
this.#disposed = true;
1717
}
18-
}
18+
}

src/featureManagement/FeatureFlagOptions.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,4 @@ export interface FeatureFlagOptions {
2727
* Specifies how feature flag refresh is configured. All selected feature flags will be watched for changes.
2828
*/
2929
refresh?: FeatureFlagRefreshOptions;
30-
}
30+
}

src/featureManagement/constants.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
// Licensed under the MIT license.
33

44
export const FEATURE_MANAGEMENT_KEY_NAME = "feature_management";
5-
export const FEATURE_FLAGS_KEY_NAME = "feature_flags";
5+
export const FEATURE_FLAGS_KEY_NAME = "feature_flags";

src/keyvault/AzureKeyVaultKeyValueAdapter.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,4 +72,4 @@ export class AzureKeyVaultKeyValueAdapter implements IKeyValueAdapter {
7272

7373
function getHost(url: string) {
7474
return new URL(url).host;
75-
}
75+
}

src/keyvault/KeyVaultOptions.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,4 @@ export interface KeyVaultOptions {
2424
* @returns The secret value.
2525
*/
2626
secretResolver?: (keyVaultReference: URL) => string | Promise<string>;
27-
}
27+
}

src/version.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
// Copyright (c) Microsoft Corporation.
22
// Licensed under the MIT license.
33

4-
export const VERSION = "1.1.0";
4+
export const VERSION = "1.1.0";

test/exportedApi.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
// Copyright (c) Microsoft Corporation.
22
// Licensed under the MIT license.
33

4-
export { load } from "../src";
4+
export { load } from "../src";

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/refresh.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -423,4 +423,4 @@ describe("dynamic refresh feature flags", function () {
423423
await settings.refresh();
424424
expect(refreshSuccessfulCount).eq(1); // change in feature flags, because page etags are different.
425425
});
426-
});
426+
});

test/requestTracing.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -345,4 +345,4 @@ describe("request tracing", function () {
345345
expect(correlationContext.includes("Host=Web")).eq(false);
346346
});
347347
});
348-
});
348+
});

test/utils/testHelper.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,4 +210,4 @@ export {
210210
createMockedFeatureFlag,
211211

212212
sleepInMs
213-
}
213+
}

0 commit comments

Comments
 (0)