-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtsconfig.json
38 lines (35 loc) · 1.95 KB
/
tsconfig.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
{
"compilerOptions": {
"target": "ES2020", // 컴파일 결과물의 문법 -> ES2020
"useDefineForClassFields": true, // 클래스 필드 정의 사용
"lib": ["ES2020", "DOM", "DOM.Iterable"], // 사용 가능한 문법
"module": "ESNext", // 컴파일 결과물의 module 방식
"skipLibCheck": true, // d.ts 파일의 타입 검사 생략
"useUnknownInCatchVariables": true, // try catch절에서 unknown 변수 유형 사용 가능
"allowJs": true, // .js, .jsx 확장자 허용
"forceConsistentCasingInFileNames": false, // jsxImportSource 동일한 파일에 대해 일관되지 않은 참조 허용
"esModuleInterop": true, // es module이 아니어도 import, export 쓸 수 있게 함
"incremental": true, // 컴파일 결과물과 동일한 폴더에 .tsbuildinfo 파일이 생성
"newLine": "lf", // 파일을 내보낼 때 줄바꿈의 끝을 unix로 지정
/* Bundler mode */
"moduleResolution": "bundler", // import가 무엇을 참조하는지 알아내기 위해 사용하는 프로세스
"allowImportingTsExtensions": true, // .ts, .mts, .tsx 등 확장자로 서로를 가져올 수 있음
"resolveJsonModule": true, // JSON을 import 할 수 있음
"isolatedModules": true, // 모든 파일을 모듈로 만들어야 함 (import, export 하지 않으면 에러)
"noEmit": true, // 결과물을 만들지 않음 -> 타입 체크용
"jsx": "react-jsx",
/* Linting */
"strict": true, // 모든 strict가 붙은 설정 true
"noUnusedLocals": true, // 사용하지 않는 지역 변수 경고
"noUnusedParameters": true, // 함수에서 사용하지 않는 매개변수 경고
"noFallthroughCasesInSwitch": true, // switch문 break문 사용하지 않으면 경고
"baseUrl": ".",
"paths": {
"@lib/*": ["./src/lib/*"],
"@ui/*": ["./src/ui/*"]
}
},
"include": ["src"],
"exclude": ["**/node_modules"],
"references": [{ "path": "./tsconfig.node.json" }]
}