Next.js + Typescript + ESLint + Prettier + Jest + tesing-library 환경 설정

npx create-next-app
npm install --save-dev typescript @types/react @types/node
touch tsconfig.json
tsconfig.json 설정 (config 설정 참고)]{
"compilerOptions": {
"target": "ES2017",
"lib": ["es6", "dom", "dom.iterable", "esnext"],
"allowJs": true,
"skipLibCheck": true,
"strict": false,
"forceConsistentCasingInFileNames": true,
"noEmit": true,
"esModuleInterop": true,
"module": "ESNEXT",
"moduleResolution": "node",
"resolveJsonModule": true,
"isolatedModules": true,
"jsx": "preserve",
"baseUrl": ".", // 해당 url 기준으로 paths에 절대경로 alias
"paths": {
"@components/*": ["./src/components/*"],
...
}
},
"exclude": ["node_modules"],
"include": ["**/*.ts", "**/*.tsx", "next-env.d.ts", "next.config.js"]
}