hia-frontend-typescript-config
v0.0.3
Published
HIA 공통 TypeScript 설정
Readme
hia-frontend-typescript-config
HIA AI 프로젝트 공통 TypeScript 설정 패키지입니다.
설치
pnpm add -D hia-frontend-typescript-config사용법
용도에 맞는 config를 extends로 참조하세요.
base.json — 공통 기본 설정
// tsconfig.json
{
"extends": "hia-frontend-typescript-config/base.json"
}nextjs.json — Next.js 앱 / 패키지 (기본)
base.json + jsx: preserve + noEmit: true (Next.js 컴파일러가 직접 처리)
// tsconfig.json
{
"extends": "hia-frontend-typescript-config/nextjs.json",
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"],
"exclude": ["node_modules"]
}node.json — Node.js 환경 (유틸, CLI 등)
base.json + module: CommonJS + moduleResolution: node
// tsconfig.json
{
"extends": "hia-frontend-typescript-config/node.json",
"compilerOptions": {
"outDir": "./dist",
"rootDir": "./src"
},
"include": ["src"]
}compilerOptions 주요 설정
| 옵션 | 값 | 설명 |
| -------------------- | --------- | ---------------------------------- |
| target | ES2020 | 출력 JS 버전 |
| module | ESNext | 모듈 시스템 (node.json은 CommonJS) |
| moduleResolution | bundler | tsup/vite 환경 최적화 |
| strict | true | 엄격한 타입 검사 전체 활성화 |
| declaration | true | .d.ts 타입 파일 생성 |
| declarationMap | true | 타입 파일 소스맵 생성 |
| sourceMap | true | 소스맵 생성 |
| noUnusedLocals | true | 미사용 로컬 변수 오류 |
| noUnusedParameters | true | 미사용 함수 파라미터 오류 |
| skipLibCheck | true | node_modules 타입 검사 생략 |
