"tsconfig 가 100+ 옵션. 대부분 시간 10개가 가장 중요."
대부분 중요한 옵션
target— emit 할 JavaScript 버전.ES2022가 modern default; 더 옛 target 이 문법 down. 너의 runtime 과 match.module— emit 할 module 시스템. Node ESM 엔NodeNext, bundler 엔ESNext, legacy Node 엔만CommonJS.moduleResolution— import 어떻게 resolve. Modern Node 엔NodeNext, Vite/esbuild 엔Bundler.strict— 안전 meta-flag. 항상true. 다음 트랙에서 자세히 다룸.esModuleInterop— CommonJS interop 더 sane 하게.true설정.skipLibCheck—.d.ts파일에 타입 체크 스킵. 대부분 프로젝트엔true(더 빠르고, library 타입 어차피 못 고침).forceConsistentCasingInFileNames— import 의 case mismatch 잡음 (./MyFilevs./myfile). 항상true.outDir— compile 된 JS 가는 곳 (emit 할 때만 중요).rootDir— source TS 오는 곳. outDir 와 쌍.include/exclude— 파일 패턴.include: ['src']가 전형적;exclude가 보통 node_modules + dist default.
tsconfig base
npm 의 @tsconfig/* 패키지가 흔한 시나리오용 pre-tuned tsconfig base 제공. extends: "@tsconfig/node20" 가 Node 20 의 옳은 default 상속. 이것들 써 — 지루한 부분 cover 하고 너가 프로젝트 specific 에 집중하게.
알려진 좋은 base 로 시작, 필수만 override. 새 tsconfig 의 모든 옵션 손-tuning 이 낭비; 커뮤니티가 sensible default 에 수렴. 그것들 써.