Skip to content

Commit ff9f521

Browse files
committed
style: fix lint errors
1 parent 397a636 commit ff9f521

9 files changed

Lines changed: 33 additions & 32 deletions

File tree

packages/cli/commands/apps.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,17 +14,17 @@ export const listAppsAction = async () => {
1414
console.table(apps);
1515
} catch (error) {
1616
spinner.fail("Failed to list apps");
17-
handleError(error, "Apps List");
17+
void handleError(error, "Apps List");
1818
}
1919
};
2020

21-
export function registerAppCommands(program: Command) {
21+
export function registerAppCommands(cli: Command) {
2222
const appsCommand = new Command("apps").description("Manage apps");
2323

2424
appsCommand
2525
.command("list")
2626
.description("List all available apps")
2727
.action(listAppsAction);
2828

29-
program.addCommand(appsCommand);
29+
cli.addCommand(appsCommand);
3030
}

packages/cli/commands/auth.ts

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ export const loginAction = async () => {
1313
spinner.succeed(`Logged in to ${chalk.cyan(baseUrl)} successfully! 🎉`);
1414
} catch (error) {
1515
spinner.fail("Login failed");
16-
handleError(error, "Login");
16+
void handleError(error, "Login");
1717
}
1818
};
1919

@@ -25,15 +25,12 @@ export const logoutAction = async () => {
2525
spinner.succeed("Logged out successfully! 👋");
2626
} catch (error) {
2727
spinner.fail("Logout failed");
28-
handleError(error, "Logout");
28+
void handleError(error, "Logout");
2929
}
3030
};
3131

32-
export function registerAuthCommands(program: Command) {
33-
program.command("login").description("Login to Bucket").action(loginAction);
32+
export function registerAuthCommands(cli: Command) {
33+
cli.command("login").description("Login to Bucket").action(loginAction);
3434

35-
program
36-
.command("logout")
37-
.description("Logout from Bucket")
38-
.action(logoutAction);
35+
cli.command("logout").description("Logout from Bucket").action(logoutAction);
3936
}

packages/cli/commands/features.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -41,14 +41,14 @@ export const createFeatureAction = async (
4141
);
4242
} catch (error) {
4343
spinner?.fail("Loading features failed");
44-
handleError(error, "Features Create");
44+
void handleError(error, "Features Create");
4545
}
4646

4747
try {
4848
if (!name) {
4949
name = await input({
5050
message: "New feature name:",
51-
validate: (input) => input.length > 0 || "Name is required",
51+
validate: (text) => text.length > 0 || "Name is required",
5252
});
5353
}
5454

@@ -68,7 +68,7 @@ export const createFeatureAction = async (
6868
);
6969
} catch (error) {
7070
spinner?.fail("Feature creation failed");
71-
handleError(error, "Features Create");
71+
void handleError(error, "Features Create");
7272
}
7373
};
7474

@@ -85,7 +85,7 @@ export const listFeaturesAction = async ({ appId }: AppIdArgs) => {
8585
console.table(features);
8686
} catch (error) {
8787
spinner.fail("Loading features failed");
88-
handleError(error, "Features List");
88+
void handleError(error, "Features List");
8989
}
9090
};
9191

@@ -106,7 +106,7 @@ export const generateTypesAction = async ({
106106
);
107107
} catch (error) {
108108
spinner?.fail("Loading features failed");
109-
handleError(error, "Features Types");
109+
void handleError(error, "Features Types");
110110
}
111111

112112
try {
@@ -119,11 +119,11 @@ export const generateTypesAction = async ({
119119
console.log(chalk.green(`Generated types for ${appId}.`));
120120
} catch (error) {
121121
spinner?.fail("Type generation failed");
122-
handleError(error, "Features Types");
122+
void handleError(error, "Features Types");
123123
}
124124
};
125125

126-
export function registerFeatureCommands(program: Command) {
126+
export function registerFeatureCommands(cli: Command) {
127127
const featuresCommand = new Command("features").description(
128128
"Manage features",
129129
);
@@ -165,5 +165,5 @@ export function registerFeatureCommands(program: Command) {
165165
)
166166
.action(generateTypesAction);
167167

168-
program.addCommand(featuresCommand);
168+
cli.addCommand(featuresCommand);
169169
}

packages/cli/commands/init.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ export const initAction = async (args: InitArgs) => {
3636
spinner.succeed(`Loaded apps from ${chalk.cyan(baseUrl)}`);
3737
} catch (error) {
3838
spinner?.fail("Loading apps failed");
39-
handleError(error, "Initialization");
39+
void handleError(error, "Initialization");
4040
}
4141

4242
try {
@@ -89,12 +89,12 @@ export const initAction = async (args: InitArgs) => {
8989
);
9090
} catch (error) {
9191
spinner?.fail("Configuration creation failed");
92-
handleError(error, "Initialization");
92+
void handleError(error, "Initialization");
9393
}
9494
};
9595

96-
export function registerInitCommand(program: Command) {
97-
program
96+
export function registerInitCommand(cli: Command) {
97+
cli
9898
.command("init")
9999
.description("Initialize a new Bucket configuration")
100100
.option(options.initOverride.flags, options.initOverride.description)

packages/cli/commands/new.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,12 @@ export const newAction = async (
3838
out,
3939
});
4040
} catch (error) {
41-
handleError(error, "New");
41+
void handleError(error, "New");
4242
}
4343
};
4444

45-
export function registerNewCommand(program: Command) {
46-
program
45+
export function registerNewCommand(cli: Command) {
46+
cli
4747
.command("new")
4848
.description(
4949
"Initialize the Bucket CLI, authenticates, and creates a new feature",

packages/cli/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,4 +49,4 @@ async function main() {
4949
program.parse(process.argv);
5050
}
5151

52-
main();
52+
void main();

packages/cli/utils/auth.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ export async function authenticateUser() {
136136
const address = server.address();
137137
if (address && typeof address === "object") {
138138
const port = address.port;
139-
open(loginUrl(baseUrl, port), {
139+
void open(loginUrl(baseUrl, port), {
140140
newInstance: true,
141141
});
142142
}

packages/cli/utils/config.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,10 @@ export async function loadConfig() {
9898
const content = await readFile(configPath, "utf-8");
9999
const parsed = JSON5.parse<Config>(content);
100100
if (!validateConfig(parsed)) {
101-
handleError(new ConfigValidationError(validateConfig.errors), "Config");
101+
void handleError(
102+
new ConfigValidationError(validateConfig.errors),
103+
"Config",
104+
);
102105
}
103106
config = parsed;
104107
} catch {
@@ -120,7 +123,10 @@ const getDefaultConfig = (): Partial<Config> => ({
120123

121124
export async function saveConfig(newConfig: Config, overwrite = false) {
122125
if (!validateConfig(newConfig)) {
123-
handleError(new ConfigValidationError(validateConfig.errors), "Config");
126+
void handleError(
127+
new ConfigValidationError(validateConfig.errors),
128+
"Config",
129+
);
124130
}
125131

126132
const defaults = getDefaultConfig();

vitest.workspace.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,4 @@ export default defineWorkspace([
66
"./packages/openfeature-node-provider/vite.config.js",
77
"./packages/node-sdk/vite.config.js",
88
"./packages/react-sdk/vite.config.mjs",
9-
"./packages/tracking-sdk/vite.e2e.config.js",
10-
"./packages/tracking-sdk/vite.config.js",
119
]);

0 commit comments

Comments
 (0)