hia-frontend-typescript-config 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +66 -0
- package/base.json +19 -0
- package/nextjs.json +15 -0
- package/node.json +10 -0
- package/package.json +21 -0
- package/react.json +8 -0
package/README.md
ADDED
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
# hia-frontend-typescript-config
|
|
2
|
+
|
|
3
|
+
HIA AI 프로젝트 공통 TypeScript 설정 패키지입니다.
|
|
4
|
+
|
|
5
|
+
## 설치
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
pnpm add -D hia-frontend-typescript-config
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## 사용법
|
|
12
|
+
|
|
13
|
+
용도에 맞는 config를 `extends`로 참조하세요.
|
|
14
|
+
|
|
15
|
+
### base.json — 공통 기본 설정
|
|
16
|
+
|
|
17
|
+
```json
|
|
18
|
+
// tsconfig.json
|
|
19
|
+
{
|
|
20
|
+
"extends": "hia-frontend-typescript-config/base.json"
|
|
21
|
+
}
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
### nextjs.json — Next.js 앱 / 패키지 (기본)
|
|
25
|
+
|
|
26
|
+
`base.json` + `jsx: preserve` + `noEmit: true` (Next.js 컴파일러가 직접 처리)
|
|
27
|
+
|
|
28
|
+
```json
|
|
29
|
+
// tsconfig.json
|
|
30
|
+
{
|
|
31
|
+
"extends": "hia-frontend-typescript-config/nextjs.json",
|
|
32
|
+
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"],
|
|
33
|
+
"exclude": ["node_modules"]
|
|
34
|
+
}
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
### node.json — Node.js 환경 (유틸, CLI 등)
|
|
38
|
+
|
|
39
|
+
`base.json` + `module: CommonJS` + `moduleResolution: node`
|
|
40
|
+
|
|
41
|
+
```json
|
|
42
|
+
// tsconfig.json
|
|
43
|
+
{
|
|
44
|
+
"extends": "hia-frontend-typescript-config/node.json",
|
|
45
|
+
"compilerOptions": {
|
|
46
|
+
"outDir": "./dist",
|
|
47
|
+
"rootDir": "./src"
|
|
48
|
+
},
|
|
49
|
+
"include": ["src"]
|
|
50
|
+
}
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
## compilerOptions 주요 설정
|
|
54
|
+
|
|
55
|
+
| 옵션 | 값 | 설명 |
|
|
56
|
+
| -------------------- | --------- | ---------------------------------- |
|
|
57
|
+
| `target` | `ES2020` | 출력 JS 버전 |
|
|
58
|
+
| `module` | `ESNext` | 모듈 시스템 (node.json은 CommonJS) |
|
|
59
|
+
| `moduleResolution` | `bundler` | tsup/vite 환경 최적화 |
|
|
60
|
+
| `strict` | `true` | 엄격한 타입 검사 전체 활성화 |
|
|
61
|
+
| `declaration` | `true` | `.d.ts` 타입 파일 생성 |
|
|
62
|
+
| `declarationMap` | `true` | 타입 파일 소스맵 생성 |
|
|
63
|
+
| `sourceMap` | `true` | 소스맵 생성 |
|
|
64
|
+
| `noUnusedLocals` | `true` | 미사용 로컬 변수 오류 |
|
|
65
|
+
| `noUnusedParameters` | `true` | 미사용 함수 파라미터 오류 |
|
|
66
|
+
| `skipLibCheck` | `true` | node_modules 타입 검사 생략 |
|
package/base.json
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json.schemastore.org/tsconfig",
|
|
3
|
+
"compilerOptions": {
|
|
4
|
+
"declaration": true,
|
|
5
|
+
"declarationMap": true,
|
|
6
|
+
"esModuleInterop": true,
|
|
7
|
+
"incremental": false,
|
|
8
|
+
"isolatedModules": true,
|
|
9
|
+
"lib": ["es2022", "DOM", "DOM.Iterable"],
|
|
10
|
+
"module": "NodeNext",
|
|
11
|
+
"moduleDetection": "force",
|
|
12
|
+
"moduleResolution": "NodeNext",
|
|
13
|
+
"noUncheckedIndexedAccess": true,
|
|
14
|
+
"resolveJsonModule": true,
|
|
15
|
+
"skipLibCheck": true,
|
|
16
|
+
"strict": true,
|
|
17
|
+
"target": "ES2022"
|
|
18
|
+
}
|
|
19
|
+
}
|
package/nextjs.json
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json.schemastore.org/tsconfig",
|
|
3
|
+
"extends": "./base.json",
|
|
4
|
+
"compilerOptions": {
|
|
5
|
+
"target": "ES2017",
|
|
6
|
+
"lib": ["dom", "dom.iterable", "esnext"],
|
|
7
|
+
"allowJs": true,
|
|
8
|
+
"noEmit": true,
|
|
9
|
+
"module": "esnext",
|
|
10
|
+
"moduleResolution": "bundler",
|
|
11
|
+
"jsx": "preserve",
|
|
12
|
+
"incremental": true,
|
|
13
|
+
"plugins": [{ "name": "next" }]
|
|
14
|
+
}
|
|
15
|
+
}
|
package/node.json
ADDED
package/package.json
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "hia-frontend-typescript-config",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"description": "HIA 공통 TypeScript 설정",
|
|
5
|
+
"files": [
|
|
6
|
+
"base.json",
|
|
7
|
+
"react.json",
|
|
8
|
+
"nextjs.json",
|
|
9
|
+
"node.json",
|
|
10
|
+
"README.md"
|
|
11
|
+
],
|
|
12
|
+
"peerDependencies": {
|
|
13
|
+
"typescript": ">=5.0"
|
|
14
|
+
},
|
|
15
|
+
"publishConfig": {
|
|
16
|
+
"access": "public"
|
|
17
|
+
},
|
|
18
|
+
"scripts": {
|
|
19
|
+
"lint": "echo 'No lint for config package'"
|
|
20
|
+
}
|
|
21
|
+
}
|