Fix lint errors and formatting
- Wrap error.code with String() in CLI complete-login command - Apply formatting fixes from linter Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -21,7 +21,7 @@ async function completeLogin(
|
||||
console.log(`Completed login request for: ${flags.email}`);
|
||||
} catch (error) {
|
||||
if (error instanceof ORPCError) {
|
||||
console.error(`Error [${error.code}]:`, error.message);
|
||||
console.error(`Error [${String(error.code)}]:`, error.message);
|
||||
} else {
|
||||
console.error(
|
||||
"Error:",
|
||||
|
||||
@@ -7,11 +7,15 @@ type OrgRole = "owner" | "admin" | "member";
|
||||
const validRoles: OrgRole[] = ["owner", "admin", "member"];
|
||||
|
||||
function parseRole(role: string | undefined): OrgRole | undefined {
|
||||
if (!role) return undefined;
|
||||
if (!role) {
|
||||
return undefined;
|
||||
}
|
||||
if (validRoles.includes(role as OrgRole)) {
|
||||
return role as OrgRole;
|
||||
}
|
||||
throw new Error(`Invalid role: ${role}. Must be one of: ${validRoles.join(", ")}`);
|
||||
throw new Error(
|
||||
`Invalid role: ${role}. Must be one of: ${validRoles.join(", ")}`,
|
||||
);
|
||||
}
|
||||
|
||||
interface CreateUserFlags {
|
||||
|
||||
Reference in New Issue
Block a user