Skip to content

Update linting rule #90

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Aug 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 17 additions & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
]
}
}
2 changes: 1 addition & 1 deletion src/AzureAppConfigurationImpl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -575,4 +575,4 @@ function getValidFeatureFlagSelectors(selectors?: SettingSelector[]): SettingSel
} else {
return getValidSelectors(selectors);
}
}
}
2 changes: 1 addition & 1 deletion src/AzureAppConfigurationOptions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,4 @@ export interface AzureAppConfigurationOptions {
* Specifies options used to configure feature flags.
*/
featureFlagOptions?: FeatureFlagOptions;
}
}
2 changes: 1 addition & 1 deletion src/IKeyValueAdapter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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]>;
}
}
2 changes: 1 addition & 1 deletion src/JsonKeyValueAdapter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,4 +54,4 @@ function isJsonContentType(contentTypeValue: string): boolean {
}

return typeParts[1].split("+").includes("json");
}
}
2 changes: 1 addition & 1 deletion src/RefreshOptions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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[];
Expand Down
2 changes: 1 addition & 1 deletion src/WatchedSetting.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ export interface WatchedSetting {
* Leaving this undefined means this setting does not have a label.
*/
label?: string;
}
}
2 changes: 1 addition & 1 deletion src/common/disposable.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ export class Disposable {
}
this.#disposed = true;
}
}
}
2 changes: 1 addition & 1 deletion src/featureManagement/FeatureFlagOptions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
2 changes: 1 addition & 1 deletion src/featureManagement/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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";
export const FEATURE_FLAGS_KEY_NAME = "feature_flags";
2 changes: 1 addition & 1 deletion src/keyvault/AzureKeyVaultKeyValueAdapter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,4 +72,4 @@ export class AzureKeyVaultKeyValueAdapter implements IKeyValueAdapter {

function getHost(url: string) {
return new URL(url).host;
}
}
2 changes: 1 addition & 1 deletion src/keyvault/KeyVaultOptions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ export interface KeyVaultOptions {
* @returns The secret value.
*/
secretResolver?: (keyVaultReference: URL) => string | Promise<string>;
}
}
2 changes: 1 addition & 1 deletion src/version.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.

export const VERSION = "1.1.0";
export const VERSION = "1.1.0";
2 changes: 1 addition & 1 deletion test/exportedApi.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.

export { load } from "../src";
export { load } from "../src";
2 changes: 1 addition & 1 deletion test/keyvault.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,4 +111,4 @@ describe("key vault reference", function () {
expect(settings.get("TestKey")).eq("SecretValue");
expect(settings.get("TestKey2")).eq("SecretValue2");
});
})
})
2 changes: 1 addition & 1 deletion test/refresh.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.
});
});
});
2 changes: 1 addition & 1 deletion test/requestTracing.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -345,4 +345,4 @@ describe("request tracing", function () {
expect(correlationContext.includes("Host=Web")).eq(false);
});
});
});
});
2 changes: 1 addition & 1 deletion test/utils/testHelper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -210,4 +210,4 @@ export {
createMockedFeatureFlag,

sleepInMs
}
}
Loading