📝 목차
작업 환경
macOS Monterey 12.6
node v16.18.0 (nvm)
🍅 사용 기술
- next.js (typescript)
- eslint
- prettier
- lint-staged
- husky
- emotion
- react-query
🔥 설정 과정
yarn을 사용하고 있지만 prettier 설정까지는 아래 글의 흐름을 따라가며 진행했습니다.
next.js
create-next-app
을 통해 next.js 프로젝트 생성
- 참고
eslint
- create-next-app을 통해 next에서 기본적으로 제공하는 ESLint(
eslint-config-next
) 설정
- typescript-eslint 설정
eslint-config-next
가 @typescript-eslint/parser에 의존성을 가지고 있어서 따로 설치하지 않음.- 참고
- .eslintrc.json
- settings.json
prettier
- .prettierrc.json
- .eslintrc.json
- .vscode/settings.json
lint-staged
- package.json
- 아래 명령어로 lint-staged가 잘 동작하는지 확인
husky
- package.json
- Hook 생성
.husky/pre-commit
파일 내용이 아래와 같은지 확인
- 참고
Emotion
- @emotion/react, @emotion/styled 설치
React Query
- react query 이름이 바뀌었다..
tanstack
- tanstack 설치해야함…….