From b87e735cb9fc18fc891346320b225c74b0855049 Mon Sep 17 00:00:00 2001 From: p-sw Date: Sun, 31 May 2026 22:54:11 +0900 Subject: [PATCH] feat: remove extension in import --- src/commands/greet.ts | 2 +- src/index.ts | 4 ++-- src/utils/logger.ts | 1 + tsconfig.json | 5 +++++ 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/commands/greet.ts b/src/commands/greet.ts index 51a2b70..cb66e72 100644 --- a/src/commands/greet.ts +++ b/src/commands/greet.ts @@ -1,4 +1,4 @@ -import { logger } from "../utils/logger.js"; +import { logger } from "@/utils/logger"; interface GreetOptions { uppercase?: boolean; diff --git a/src/index.ts b/src/index.ts index dd4f9c6..26d8588 100755 --- a/src/index.ts +++ b/src/index.ts @@ -3,8 +3,8 @@ import { Command } from "commander"; import { readFileSync } from "fs"; import { fileURLToPath } from "url"; import { dirname, join } from "path"; -import { logger } from "./utils/logger.js"; -import { greet } from "./commands/greet.js"; +import { logger } from "@/utils/logger"; +import { greet } from "@/commands/greet"; const __filename = fileURLToPath(import.meta.url); const __dirname = dirname(__filename); diff --git a/src/utils/logger.ts b/src/utils/logger.ts index 022f83b..ef73219 100644 --- a/src/utils/logger.ts +++ b/src/utils/logger.ts @@ -1,6 +1,7 @@ import chalk, { type ChalkInstance } from "chalk"; import { appendFileSync, existsSync, mkdirSync, createWriteStream, type WriteStream } from "fs"; import { dirname } from "path"; +import { config } from "@/config"; export type LogLevel = "debug" | "info" | "success" | "warn" | "error" | "fatal"; diff --git a/tsconfig.json b/tsconfig.json index b2e7497..fb243ad 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,5 +1,6 @@ { "compilerOptions": { + "ignoreDeprecations": "6.0", // Environment setup & latest features "lib": ["ESNext"], "target": "ESNext", @@ -10,6 +11,10 @@ "types": ["bun"], // Bundler mode + "baseUrl": ".", + "paths": { + "@/*": ["src/*"] + }, "moduleResolution": "bundler", "allowImportingTsExtensions": true, "verbatimModuleSyntax": true,