Add ESLint to all packages and reorganize CLI
ESLint: - Add @macalinao/eslint-config and eslint to all packages/apps - Add lint scripts to all package.json files - Create eslint.config.js for all apps - Add lint task to turbo.json - Add @macalinao/eslint-config and @types/bun to catalog Biome: - Exclude docs/ from biome checks CLI Reorganization: - Restructure CLI to use route maps with one command per file - Move commands to routes/ directory structure - Use func property instead of async loaders - Route maps in _command.ts files for each directory Environment: - Use Bun.env instead of process.env for env vars - Add DATABASE_URL and PORT to turbo.json globalEnv Lint Fixes: - Fix nullish coalescing operator usage - Update deprecated Zod API (z.email() instead of .string().email()) - Fix import sorting Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
13
apps/cli/src/routes/user/_command.ts
Normal file
13
apps/cli/src/routes/user/_command.ts
Normal file
@@ -0,0 +1,13 @@
|
||||
import { buildRouteMap } from "@stricli/core";
|
||||
import { confirmEmailCommand } from "./confirm-email.js";
|
||||
import { createCommand } from "./create.js";
|
||||
|
||||
export const userRouteMap = buildRouteMap({
|
||||
routes: {
|
||||
create: createCommand,
|
||||
"confirm-email": confirmEmailCommand,
|
||||
},
|
||||
docs: {
|
||||
brief: "User management commands",
|
||||
},
|
||||
});
|
||||
15
apps/cli/src/routes/user/confirm-email.ts
Normal file
15
apps/cli/src/routes/user/confirm-email.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
import type { LocalContext } from "../../context.js";
|
||||
import { buildCommand } from "@stricli/core";
|
||||
|
||||
function confirmEmail(this: LocalContext): void {
|
||||
console.log("User confirm-email command - Not implemented");
|
||||
console.log("This command will confirm a user's email address");
|
||||
}
|
||||
|
||||
export const confirmEmailCommand = buildCommand({
|
||||
func: confirmEmail,
|
||||
parameters: {},
|
||||
docs: {
|
||||
brief: "Confirm user email",
|
||||
},
|
||||
});
|
||||
15
apps/cli/src/routes/user/create.ts
Normal file
15
apps/cli/src/routes/user/create.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
import type { LocalContext } from "../../context.js";
|
||||
import { buildCommand } from "@stricli/core";
|
||||
|
||||
function create(this: LocalContext): void {
|
||||
console.log("User create command - Not implemented");
|
||||
console.log("This command will create a new user account");
|
||||
}
|
||||
|
||||
export const createCommand = buildCommand({
|
||||
func: create,
|
||||
parameters: {},
|
||||
docs: {
|
||||
brief: "Create a new user",
|
||||
},
|
||||
});
|
||||
Reference in New Issue
Block a user