From ce64afe2832554d1709e975d315ed8192732b571 Mon Sep 17 00:00:00 2001 From: Jesse Wierzbinski Date: Wed, 26 Feb 2025 00:12:31 +0100 Subject: [PATCH] fix(cli): :rotating_light: Use RegExp literal instead of .match() --- cli/user/create.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cli/user/create.ts b/cli/user/create.ts index 3f123d05..4d840b25 100644 --- a/cli/user/create.ts +++ b/cli/user/create.ts @@ -35,7 +35,7 @@ export const createUserCommand = defineCommand( const { admin, email, password } = context.flags; const { username } = context.parameters; - if (!username.match(/^[a-z0-9_-]+$/)) { + if (!/^[a-z0-9_-]+$/.test(username)) { throw new Error("Username must be alphanumeric and lowercase."); }