Skip to content

Commit

Permalink
fix member order lint issue
Browse files Browse the repository at this point in the history
Signed-off-by: Rudy Flores <68666202+rudyflores@users.noreply.github.com>
  • Loading branch information
rudyflores committed Apr 1, 2022
1 parent 14c67a1 commit 65e0a3f
Showing 1 changed file with 22 additions and 22 deletions.
44 changes: 22 additions & 22 deletions packages/zowe-explorer/src/utils/SettingsConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,28 @@ nls.config({
const localize: nls.LocalizeFunc = nls.loadMessageBundle();

export class SettingsConfig {
public static async standardizeSettings(): Promise<void> {
const globalIsNotMigrated =
SettingsConfig.configurations.inspect(globals.SETTINGS_VERSION).globalValue !==
SettingsConfig.currentVersionNumber;
const workspaceIsNotMigrated =
SettingsConfig.configurations.inspect(globals.SETTINGS_VERSION).workspaceValue !==
SettingsConfig.currentVersionNumber;
const workspaceIsOpen = vscode.workspace.workspaceFolders !== undefined;
const zoweSettingsExist = SettingsConfig.zoweOldConfigurations.length > 0;

if (!zoweSettingsExist) {
return;
}

if (workspaceIsNotMigrated && workspaceIsOpen) {
await SettingsConfig.standardizeWorkspaceSettings();
}

if (globalIsNotMigrated) {
await SettingsConfig.standardizeGlobalSettings();
}
}
// Dictionary describing translation from old configuration names to new standardized names
private static configurationDictionary = {
"Zowe-Default-Datasets-Binary": globals.SETTINGS_DS_DEFAULT_BINARY,
Expand All @@ -44,28 +66,6 @@ export class SettingsConfig {
private static currentVersionNumber = semver.major(
vscode.extensions.getExtension("zowe.vscode-extension-for-zowe").packageJSON.version
);
public static async standardizeSettings(): Promise<void> {
const globalIsNotMigrated =
SettingsConfig.configurations.inspect(globals.SETTINGS_VERSION).globalValue !==
SettingsConfig.currentVersionNumber;
const workspaceIsNotMigrated =
SettingsConfig.configurations.inspect(globals.SETTINGS_VERSION).workspaceValue !==
SettingsConfig.currentVersionNumber;
const workspaceIsOpen = vscode.workspace.workspaceFolders !== undefined;
const zoweSettingsExist = SettingsConfig.zoweOldConfigurations.length > 0;

if (!zoweSettingsExist) {
return;
}

if (workspaceIsNotMigrated && workspaceIsOpen) {
await SettingsConfig.standardizeWorkspaceSettings();
}

if (globalIsNotMigrated) {
await SettingsConfig.standardizeGlobalSettings();
}
}
private static async promptReload(): Promise<void> {
// Prompt user to reload VS Code window
const reloadButton = localize("standardization.reload.button", "Reload Window");
Expand Down

0 comments on commit 65e0a3f

Please sign in to comment.