master-project
CHAPTER 13 / 50
읽기 약 2분
FUNCTION
개발 환경: ESLint + Prettier + Husky + CI
핵심 개념
코드 품질 자동화 — ESLint flat config·Prettier·lint-staged·Husky pre-commit·GitHub Actions CI.
본문
ESLint flat config
// eslint.config.mjs
import next from 'eslint-config-next'
import prettier from 'eslint-config-prettier'
export default [
...next,
prettier,
{
rules: {
'@typescript-eslint/no-unused-vars': ['error', { argsIgnorePattern: '^_' }],
'@typescript-eslint/no-explicit-any': 'error',
'react/no-unescaped-entities': 'off',
'no-console': ['warn', { allow: ['warn', 'error'] }],
},
},
]Prettier
// .prettierrc.json
{
"semi": false,
"singleQuote": true,
"trailingComma": "es5",
"tabWidth": 2,
"printWidth": 100,
"plugins": ["prettier-plugin-tailwindcss"]
}// .prettierignore
.next
node_modules
public
*.locklint-staged + Husky
pnpm add -D husky lint-staged
pnpm husky init// package.json
{
"scripts": {
"lint": "next lint",
"format": "prettier --write .",
"typecheck": "tsc --noEmit",
"prepare": "husky"
},
"lint-staged": {
"*.{ts,tsx}": ["eslint --fix", "prettier --write"],
"*.{json,md,css}": ["prettier --write"]
}
}# .husky/pre-commit
pnpm exec lint-stagedGitHub Actions CI
# .github/workflows/ci.yml
name: CI
on:
pull_request:
branches: [main]
push:
branches: [main]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v3
with:
version: 9
- uses: actions/setup-node@v4
with:
node-version: 20
cache: pnpm
- run: pnpm install --frozen-lockfile
- run: pnpm lint
- run: pnpm typecheck
- run: pnpm build
env:
NEXT_PUBLIC_SUPABASE_URL: ${{ secrets.NEXT_PUBLIC_SUPABASE_URL }}
NEXT_PUBLIC_SUPABASE_ANON_KEY: ${{ secrets.NEXT_PUBLIC_SUPABASE_ANON_KEY }}VS Code 설정 (팀 공유)
// .vscode/settings.json
{
"editor.formatOnSave": true,
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.codeActionsOnSave": {
"source.fixAll.eslint": "explicit"
},
"tailwindCSS.experimental.classRegex": [
["clsx\\(([^)]*)\\)", "(?:'|\"|`)([^']*)(?:'|\"|`)"]
]
}// .vscode/extensions.json
{
"recommendations": [
"esbenp.prettier-vscode",
"dbaeumer.vscode-eslint",
"bradlc.vscode-tailwindcss",
"ms-azuretools.vscode-docker"
]
}Branch 보호 (GitHub)
Settings → Branches → Add rule
✓ Require status checks: ci.yml
✓ Require branches up to date
✓ Include administrators (1인은 옵션)커밋 컨벤션
feat: 새 기능
fix: 버그 수정
docs: 문서
style: 포맷팅
refactor: 리팩토링
test: 테스트
chore: 설정·도구
perf: 성능# 예시
git commit -m "feat(auth): Google OAuth 추가"
git commit -m "fix(stripe): webhook 검증 누락"다음 챕터
CH.14 "레이아웃: 헤더 + 사이드바 + 메인 + 푸터".
AI 프롬프트
🤖 AI에게 잘 물어보는 법 — 모델·전략별 프롬프트
Claude
무료: Sonnet 4.6 / Pro $20/mo: Opus 4.6
내 마스터 프로젝트의 개발 환경 셋업 부분을 분석해서 실전 적용 + 개선 우선순위 3가지를 알려줘.
ChatGPT
무료: GPT-5.5 / Plus $20/mo: GPT-5.5 Pro
개발 환경 셋업 관련 모범 사례·안티패턴 5개를 비교 분석해서 실전 적용를 위한 추천 방안을 알려줘.
Gemini
무료: 2.5 Flash / Pro $19.99/mo: 3.1 Pro
내 프로젝트 전체에서 개발 환경 셋업 최적화 가능 위치와 리스크를 보고해줘.
Grok
무료: Grok 4.1 / SuperGrok $30/mo
2026년 한국 1인 개발자 시장의 개발 환경 셋업 트렌드와 차별화 포인트를 정리해줘.
⭐ 이것만 기억하세요
개발 환경: ESLint + Prettier + Husky + CI는 이 3가지만 확실히 잡으세요
1.ESLint + Prettier + Husky = 자동 코드 품질
2.GitHub Actions CI = main 보호 + PR 검증
3.다음 챕터에서 레이아웃 구현 시작
공유하기
진행도 13 / 50