From 942a15072cdda5bc14a181d3d12960863cc9c35d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sigui=20Kess=C3=A9=20Emmanuel?= Date: Thu, 17 Oct 2024 00:19:19 +0100 Subject: [PATCH] :rotating_light: Fix code lint --- libs/create-qwikdev-astro/src/index.ts | 35 ++------------------------ libs/create-qwikdev-astro/src/utils.ts | 10 ++++---- 2 files changed, 7 insertions(+), 38 deletions(-) diff --git a/libs/create-qwikdev-astro/src/index.ts b/libs/create-qwikdev-astro/src/index.ts index 8d08c7b..f94bf67 100644 --- a/libs/create-qwikdev-astro/src/index.ts +++ b/libs/create-qwikdev-astro/src/index.ts @@ -1,38 +1,7 @@ -import fs, { cpSync, existsSync, mkdirSync } from "node:fs"; -import path, { join } from "node:path"; -import process from "node:process"; -import { - cancel, - confirm, - intro, - isCancel, - log, - outro, - select, - spinner, - text -} from "@clack/prompts"; -import { bgBlue, bgMagenta, bold, cyan, gray, magenta, red } from "kleur/colors"; import yargs from "yargs"; import { app } from "./app"; -import { type Adapter, type Config, type UserConfig, defaultConfig } from "./config"; -import { - $, - __dirname, - getPackageManager, - installDependencies, - note, - panic, - panicCanceled, - pmRunCommand, - replacePackageJsonRunCommand, - resolveAbsoluteDir, - resolveRelativeDir, - sanitizePackageName, - scanBoolean, - scanString, - updatePackageName -} from "./utils"; +import { type UserConfig, defaultConfig } from "./config"; +import { __dirname, panic } from "./utils"; export function parseArgs(args: string[]): UserConfig { const parsedArgs = yargs(args) diff --git a/libs/create-qwikdev-astro/src/utils.ts b/libs/create-qwikdev-astro/src/utils.ts index cc25109..8428415 100644 --- a/libs/create-qwikdev-astro/src/utils.ts +++ b/libs/create-qwikdev-astro/src/utils.ts @@ -3,7 +3,7 @@ import fs from "node:fs"; import os from "node:os"; import path, { join, resolve, relative } from "node:path"; import { fileURLToPath } from "node:url"; -import { isCancel, log, text } from "@clack/prompts"; +import { confirm, isCancel, log, text } from "@clack/prompts"; import { gray, green, red, reset, white } from "kleur/colors"; import detectPackageManager from "which-pm-runs"; import { defaultConfig } from "./config"; @@ -309,16 +309,16 @@ export async function scanBoolean( export function ensureString( input: any, - validate?: (v: string) => v is T, - positional = false + positional = false, + validate?: (v: string) => v is T ): asserts input is T { ensure(input, validate ?? isString, positional); } export function ensureNumber( input: any, - validate?: (v: number) => v is T, - positional = false + positional = false, + validate?: (v: number) => v is T ): asserts input is T { ensure(input, validate ?? isNumber, positional); }