Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
134 changes: 134 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,134 @@
/**
* ESLint 설정 파일
* Next.js + TypeScript 프로젝트용
*
* 주요 설정:
* - TypeScript 파서 사용
* - Next.js 및 TypeScript 권장 규칙 적용
* - Prettier와의 충돌 방지
*/
module.exports = {
root: true,
parser: "@typescript-eslint/parser",
parserOptions: {
ecmaVersion: "latest",
sourceType: "module",
project: "./tsconfig.json",
},
env: {
browser: true,
es2021: true,
node: true,
},
plugins: ["@typescript-eslint"],
extends: [
// Next.js 기본 설정
"next",
// Next.js TypeScript 설정 (plugin:@typescript-eslint/recommended 기반)
"next/typescript",
// TypeScript ESLint 권장 규칙
"plugin:@typescript-eslint/recommended",
// Prettier와 충돌하는 규칙 비활성화 (항상 마지막에 위치해야 함)
"prettier",
],
overrides: [
{
// 설정 파일들은 TypeScript 프로젝트에 포함되지 않으므로 project 옵션 비활성화
env: {
node: true,
},
files: [".eslintrc.{js,cjs}", "*.config.{js,mjs,ts}"],
parserOptions: {
sourceType: "script",
project: null,
},
},
],
rules: {
// ==========================================
// React 관련 규칙
// ==========================================

// JSX 사용 시 React import 불필요 (React 17+)
"react/react-in-jsx-scope": "off",

// JSX 허용 파일 확장자
"react/jsx-filename-extension": [1, { extensions: [".js", ".jsx", ".tsx"] }],

// defaultProps 필수 여부 비활성화
"react/require-default-props": "off",

// 함수 컴포넌트는 화살표 함수로 정의
"react/function-component-definition": [1, { namedComponents: "arrow-function" }],

// ==========================================
// Import 관련 규칙
// ==========================================

// import 순서는 Prettier 플러그인에서 처리
"import/order": "off",

// import 시 파일 확장자 생략 (warning으로 설정)
"import/extensions": "off",

// 단일 export 시 default export 권장 (warning)
"import/prefer-default-export": "off",

// ==========================================
// 일반 JavaScript 규칙
// ==========================================

// console.log 허용 (개발 편의)
"no-console": "off",

// alert 허용
"no-alert": "off",

// 정의 전 사용 허용 (TypeScript에서 처리)
"no-use-before-define": "off",

// 미사용 변수 - 기본 규칙 비활성화 (TypeScript 규칙과 충돌 방지)
"no-unused-vars": "off",

// ==========================================
// TypeScript 관련 규칙
// ==========================================

// 미사용 변수 경고 (TypeScript용 - 기본 규칙 대신 사용)
"@typescript-eslint/no-unused-vars": "warn",

// any 타입 사용 경고 (error -> warn)
"@typescript-eslint/no-explicit-any": "warn",

// any 타입 관련 규칙 (경고로 설정)
"@typescript-eslint/no-unsafe-assignment": "warn",
"@typescript-eslint/no-unsafe-member-access": "warn",
"@typescript-eslint/no-unsafe-return": "warn",
"@typescript-eslint/no-unsafe-call": "warn",
"@typescript-eslint/no-unsafe-argument": "warn",

// ==========================================
// 접근성 (a11y) 관련 규칙
// ==========================================

// label과 control 연결 규칙 비활성화
"jsx-a11y/label-has-associated-control": "off",

// 클릭 이벤트에 키보드 이벤트 필요 (경고)
"jsx-a11y/click-events-have-key-events": "warn",

// 정적 요소에 이벤트 핸들러 (경고)
"jsx-a11y/no-static-element-interactions": "warn",
},
settings: {
"import/parsers": {
"@typescript-eslint/parser": [".ts", ".tsx"],
},
"import/resolver": {
typescript: {
alwaysTryTypes: true,
project: "./tsconfig.json",
},
},
},
};
82 changes: 0 additions & 82 deletions .eslintrc.json

This file was deleted.

7 changes: 4 additions & 3 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
title: ""
labels: bug
assignees: ''

assignees: ""
---

## 어떤 버그인가요

> 문제가 되는 부분에 대해 설명해주세요
## 재현 방법(선택)

버그를 재현할 수 있는 과정을 설명해주세요(필요하다면 사진을 첨부해주세요)

1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
Expand Down
5 changes: 2 additions & 3 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
title: ""
labels: enhancement
assignees: ''

assignees: ""
---

## 어떤 기능인가요?
Expand Down
20 changes: 12 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ on:

jobs:
lint:
name: Lint & Type Check
runs-on: ubuntu-latest
steps:
- name: Checkout code
Expand All @@ -16,19 +17,23 @@ jobs:
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '22.x'
cache: 'npm'
node-version: "22.x"
cache: "npm"

- name: Install dependencies
run: npm ci

- name: Run linter
- name: Run ESLint
run: npm run lint

- name: Type check
run: npx tsc --noEmit
- name: Check Prettier formatting
run: npm run format:check

- name: TypeScript type check
run: npm run typecheck

build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Checkout code
Expand All @@ -37,8 +42,8 @@ jobs:
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '22.x'
cache: 'npm'
node-version: "22.x"
cache: "npm"

- name: Install dependencies
run: npm ci
Expand All @@ -47,4 +52,3 @@ jobs:
run: npm run build
env:
NODE_ENV: production

7 changes: 7 additions & 0 deletions .husky/pre-push
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
echo "🔍 Running lint check before push..."
npm run lint

echo "🔍 Running type check before push..."
npm run typecheck

echo "✅ All checks passed!"
38 changes: 38 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Dependencies
node_modules

# Build outputs
.next
out
build
dist

# Generated files
*.min.js
*.min.css
next-env.d.ts

# Lock files
package-lock.json
yarn.lock
pnpm-lock.yaml

# Cache
.cache
.turbo

# Coverage
coverage

# Sentry
.sentryclirc

# Vercel
.vercel

# Environment
.env*

# IDE
.idea
.vscode
9 changes: 2 additions & 7 deletions commitlint.config.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
module.exports = {
extends: ['@commitlint/config-conventional'],
extends: ["@commitlint/config-conventional"],
rules: {
'type-enum': [
2,
'always',
['feat', 'fix', 'refactor', 'style', 'test', 'docs', 'chore'],
],
"type-enum": [2, "always", ["feat", "fix", "refactor", "style", "test", "docs", "chore"]],
},
};

2 changes: 1 addition & 1 deletion components.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@
"hooks": "@/hooks"
},
"iconLibrary": "lucide"
}
}
Loading
Loading