diff --git a/.eslintrc b/.eslintrc index 8b96047e..f2852f86 100644 --- a/.eslintrc +++ b/.eslintrc @@ -40,6 +40,22 @@ "avoidEscape": true } ], - "@typescript-eslint/no-explicit-any": "off" + "@typescript-eslint/no-explicit-any": "off", + "eol-last": [ + "error", + "always" + ], + "no-trailing-spaces": "error", + "space-before-blocks": [ + "error", + "always" + ], + "no-multi-spaces": "error", + "no-multiple-empty-lines": [ + "error", + { + "max": 1 + } + ] } } \ No newline at end of file diff --git a/src/AzureAppConfigurationImpl.ts b/src/AzureAppConfigurationImpl.ts index 6c650244..76d2c963 100644 --- a/src/AzureAppConfigurationImpl.ts +++ b/src/AzureAppConfigurationImpl.ts @@ -575,4 +575,4 @@ function getValidFeatureFlagSelectors(selectors?: SettingSelector[]): SettingSel } else { return getValidSelectors(selectors); } -} \ No newline at end of file +} diff --git a/src/AzureAppConfigurationOptions.ts b/src/AzureAppConfigurationOptions.ts index e780fc89..c98de463 100644 --- a/src/AzureAppConfigurationOptions.ts +++ b/src/AzureAppConfigurationOptions.ts @@ -47,4 +47,4 @@ export interface AzureAppConfigurationOptions { * Specifies options used to configure feature flags. */ featureFlagOptions?: FeatureFlagOptions; -} \ No newline at end of file +} diff --git a/src/IKeyValueAdapter.ts b/src/IKeyValueAdapter.ts index 530c870b..afd7bdc3 100644 --- a/src/IKeyValueAdapter.ts +++ b/src/IKeyValueAdapter.ts @@ -13,4 +13,4 @@ export interface IKeyValueAdapter { * This method process the original configuration setting, and returns processed key and value in an array. */ processKeyValue(setting: ConfigurationSetting): Promise<[string, unknown]>; -} \ No newline at end of file +} diff --git a/src/JsonKeyValueAdapter.ts b/src/JsonKeyValueAdapter.ts index e821af70..c558f4e4 100644 --- a/src/JsonKeyValueAdapter.ts +++ b/src/JsonKeyValueAdapter.ts @@ -54,4 +54,4 @@ function isJsonContentType(contentTypeValue: string): boolean { } return typeParts[1].split("+").includes("json"); -} \ No newline at end of file +} diff --git a/src/RefreshOptions.ts b/src/RefreshOptions.ts index 0d7b75c3..29f35be2 100644 --- a/src/RefreshOptions.ts +++ b/src/RefreshOptions.ts @@ -20,7 +20,7 @@ export interface RefreshOptions { refreshIntervalInMs?: number; /** - * One or more configuration settings to be watched for changes on the server. + * One or more configuration settings to be watched for changes on the server. * Any modifications to watched settings will refresh all settings loaded by the configuration provider when refresh() is called. */ watchedSettings?: WatchedSetting[]; diff --git a/src/WatchedSetting.ts b/src/WatchedSetting.ts index b714f2ef..40f4d4fb 100644 --- a/src/WatchedSetting.ts +++ b/src/WatchedSetting.ts @@ -15,4 +15,4 @@ export interface WatchedSetting { * Leaving this undefined means this setting does not have a label. */ label?: string; -} \ No newline at end of file +} diff --git a/src/common/disposable.ts b/src/common/disposable.ts index 4843e121..c075b6b1 100644 --- a/src/common/disposable.ts +++ b/src/common/disposable.ts @@ -15,4 +15,4 @@ export class Disposable { } this.#disposed = true; } -} \ No newline at end of file +} diff --git a/src/featureManagement/FeatureFlagOptions.ts b/src/featureManagement/FeatureFlagOptions.ts index de0ff896..6facb592 100644 --- a/src/featureManagement/FeatureFlagOptions.ts +++ b/src/featureManagement/FeatureFlagOptions.ts @@ -27,4 +27,4 @@ export interface FeatureFlagOptions { * Specifies how feature flag refresh is configured. All selected feature flags will be watched for changes. */ refresh?: FeatureFlagRefreshOptions; -} \ No newline at end of file +} diff --git a/src/featureManagement/constants.ts b/src/featureManagement/constants.ts index d8a6afc6..f0082f48 100644 --- a/src/featureManagement/constants.ts +++ b/src/featureManagement/constants.ts @@ -2,4 +2,4 @@ // Licensed under the MIT license. export const FEATURE_MANAGEMENT_KEY_NAME = "feature_management"; -export const FEATURE_FLAGS_KEY_NAME = "feature_flags"; \ No newline at end of file +export const FEATURE_FLAGS_KEY_NAME = "feature_flags"; diff --git a/src/keyvault/AzureKeyVaultKeyValueAdapter.ts b/src/keyvault/AzureKeyVaultKeyValueAdapter.ts index b65a0314..92f6e261 100644 --- a/src/keyvault/AzureKeyVaultKeyValueAdapter.ts +++ b/src/keyvault/AzureKeyVaultKeyValueAdapter.ts @@ -72,4 +72,4 @@ export class AzureKeyVaultKeyValueAdapter implements IKeyValueAdapter { function getHost(url: string) { return new URL(url).host; -} \ No newline at end of file +} diff --git a/src/keyvault/KeyVaultOptions.ts b/src/keyvault/KeyVaultOptions.ts index 88e86a9c..6d476b54 100644 --- a/src/keyvault/KeyVaultOptions.ts +++ b/src/keyvault/KeyVaultOptions.ts @@ -24,4 +24,4 @@ export interface KeyVaultOptions { * @returns The secret value. */ secretResolver?: (keyVaultReference: URL) => string | Promise; -} \ No newline at end of file +} diff --git a/src/version.ts b/src/version.ts index a6fe1977..877c8101 100644 --- a/src/version.ts +++ b/src/version.ts @@ -1,4 +1,4 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. -export const VERSION = "1.1.0"; \ No newline at end of file +export const VERSION = "1.1.0"; diff --git a/test/exportedApi.ts b/test/exportedApi.ts index 7e6feba1..c49bc1a3 100644 --- a/test/exportedApi.ts +++ b/test/exportedApi.ts @@ -1,4 +1,4 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. -export { load } from "../src"; \ No newline at end of file +export { load } from "../src"; diff --git a/test/keyvault.test.ts b/test/keyvault.test.ts index 194517a0..5f70d0a5 100644 --- a/test/keyvault.test.ts +++ b/test/keyvault.test.ts @@ -111,4 +111,4 @@ describe("key vault reference", function () { expect(settings.get("TestKey")).eq("SecretValue"); expect(settings.get("TestKey2")).eq("SecretValue2"); }); -}) \ No newline at end of file +}) diff --git a/test/refresh.test.ts b/test/refresh.test.ts index b756038a..021ac3ba 100644 --- a/test/refresh.test.ts +++ b/test/refresh.test.ts @@ -423,4 +423,4 @@ describe("dynamic refresh feature flags", function () { await settings.refresh(); expect(refreshSuccessfulCount).eq(1); // change in feature flags, because page etags are different. }); -}); \ No newline at end of file +}); diff --git a/test/requestTracing.test.ts b/test/requestTracing.test.ts index cdaa7ca3..5362d004 100644 --- a/test/requestTracing.test.ts +++ b/test/requestTracing.test.ts @@ -345,4 +345,4 @@ describe("request tracing", function () { expect(correlationContext.includes("Host=Web")).eq(false); }); }); -}); \ No newline at end of file +}); diff --git a/test/utils/testHelper.ts b/test/utils/testHelper.ts index 80da36bc..9f0034e7 100644 --- a/test/utils/testHelper.ts +++ b/test/utils/testHelper.ts @@ -210,4 +210,4 @@ export { createMockedFeatureFlag, sleepInMs -} \ No newline at end of file +}