Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 4 additions & 0 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

pnpm commitlint --edit "$1"
4 changes: 4 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

pnpm lint-staged
172 changes: 120 additions & 52 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,54 +1,122 @@
# React + TypeScript + Vite

This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.

Currently, two official plugins are available:

- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react/README.md) uses [Babel](https://babeljs.io/) for Fast Refresh
- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh

## Expanding the ESLint configuration

If you are developing a production application, we recommend updating the configuration to enable type-aware lint rules:

```js
export default tseslint.config({
extends: [
// Remove ...tseslint.configs.recommended and replace with this
...tseslint.configs.recommendedTypeChecked,
// Alternatively, use this for stricter rules
...tseslint.configs.strictTypeChecked,
// Optionally, add this for stylistic rules
...tseslint.configs.stylisticTypeChecked,
],
languageOptions: {
// other options...
parserOptions: {
project: ['./tsconfig.node.json', './tsconfig.app.json'],
tsconfigRootDir: import.meta.dirname,
},
},
})
```
---
# 📝 Nettee Kanban
---

### 📢 소개

Nettee 팀의 생산성과 협업 효율을 높이기 위한 실사용 목적의 칸반 보드입니다.🚀

최신 프론트엔드 기술 스택을 기반으로, 향후 기능 확장과 유지보수가 용이하도록 구조화된 형태로 구성되어 있으며,

팀 내 작업에서 직접 사용될 예정입니다.

---

### 🚧 향후 계획

- 칸반 보드 컬럼 및 카드 UI 개발
- 드래그 앤 드롭 기능 구현
- github 연동
- 데이터 퍼시스턴스 연결 (e.g., Supabase, Firebase 등)

---

### 📦 사용 스택

- **Vite** + **React 19** + **TypeScript**
- **SWC** 기반 빌드
- **Tailwind CSS v4** + **shadcn/ui**
- **pnpm** 패키지 매니저
- **ESLint**, **Prettier**, **Husky**, **Commitlint**

---

### ⚙️ 설치 및 실행 방법

1. **pnpm 설정**
이 프로젝트는 `[email protected]`을 사용합니다.

```
corepack enable
corepack prepare [email protected] --activate
```

2. **레포 클론 및 의존성 설치**

```
git clone [email protected]:nettee-space/nettee-kanban.git
cd nettee-kanban
pnpm install
```

3. **개발 서버 실행**

```
pnpm dev
```

4. **빌드**

```
pnpm build
```

5. **Lint & Format**

```
pnpm lint # ESLint 실행
pnpm format # Prettier 실행
```

---

### 🧪 스크립트 목록

| 명령어 | 설명 |
| -------------- | ----------------------------- |
| `pnpm dev` | 개발 서버 실행 (Vite) |
| `pnpm build` | 타입 체크 후 빌드 |
| `pnpm preview` | 빌드된 앱을 로컬에서 미리보기 |
| `pnpm lint` | ESLint 실행 |
| `pnpm format` | Prettier로 코드 포맷팅 |
| `pnpm prepare` | Husky 초기화용 |

---

### ✅ 커밋 컨벤션

이 프로젝트는 명확한 변경 이력을 위해 다음과 같은 커밋 메시지 컨벤션을 따릅니다:

| 태그 | 설명 |
| ---------- | -------------------------------------- |
| `feat` | 새로운 기능 추가 |
| `fix` | 버그 수정 |
| `docs` | 문서 변경 (README 등) |
| `style` | 코드 스타일 변경 (포맷팅, 세미콜론 등) |
| `design` | 사용자 UI 디자인 변경 (CSS 등) |
| `test` | 테스트 코드 추가/수정 |
| `refactor` | 리팩토링 (기능 변경 없음) |
| `build` | 빌드 관련 변경 |
| `ci` | CI/CD 관련 변경 |
| `perf` | 성능 개선 |
| `chore` | 기타 변경 사항 (패키지 업데이트 등) |
| `rename` | 파일 혹은 폴더명을 수정한 경우 |
| `remove` | 파일을 삭제한 경우 |

`Husky`, `Commitlint`, `Lint-staged`가 설정되어 있으며, 커밋 전에 자동으로 lint 및 포맷팅이 수행됩니다.

---

### 📁 디렉토리 구조 (초기 기준)

You can also install [eslint-plugin-react-x](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-x) and [eslint-plugin-react-dom](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-dom) for React-specific lint rules:

```js
// eslint.config.js
import reactX from 'eslint-plugin-react-x'
import reactDom from 'eslint-plugin-react-dom'

export default tseslint.config({
plugins: {
// Add the react-x and react-dom plugins
'react-x': reactX,
'react-dom': reactDom,
},
rules: {
// other rules...
// Enable its recommended typescript rules
...reactX.configs['recommended-typescript'].rules,
...reactDom.configs.recommended.rules,
},
})
```
src/
├─ shared/
│ └─ components/ui/ # shadcn/ui 구성요소
│ └─ lib/ # 유틸 함수들
│ └─ styles/global.css # 글로벌 스타일 설정
└─ main.tsx
└─ app.tsx
```

---
24 changes: 24 additions & 0 deletions commitlint.config.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
module.exports = {
extends: ['@commitlint/config-conventional'],
rules: {
'type-enum': [
2, // 에러 레벨 (0 = off, 1 = warning, 2 = error)
'always', // 항상 적용
[
'feat', // 새로운 기능 추가
'fix', // 버그 수정
'docs', // 문서 변경 (README 등)
'style', // 코드 스타일 변경 (포맷팅, 세미콜론 등)
'design', // 사용자 UI 디자인 변경 (CSS 등)
'test', // 테스트 코드 추가/수정
'refactor', // 리팩토링 (기능 변경 X)
'build', // 빌드 관련 변경
'ci', // CI/CD 관련 변경
'perf', // 성능 개선
'chore', // 기타 변경 사항 (패키지 업데이트 등)
'rename', // 파일 혹은 폴더명을 수정만 한 경우
'remove', // 파일을 삭제만 한 경우
],
],
},
};
21 changes: 21 additions & 0 deletions components.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"$schema": "https://ui.shadcn.com/schema.json",
"style": "new-york",
"rsc": false,
"tsx": true,
"tailwind": {
"config": "",
"css": "@/shared/styles/global.css",
"baseColor": "neutral",
"cssVariables": true,
"prefix": ""
},
"aliases": {
"components": "@/shared/components",
"utils": "@/shared/lib/utils",
"ui": "@/shared/components/ui",
"lib": "@/shared/lib",
"hooks": "@/shared/hooks"
},
"iconLibrary": "lucide"
}
101 changes: 95 additions & 6 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,19 @@
import js from '@eslint/js'
import globals from 'globals'
import reactHooks from 'eslint-plugin-react-hooks'
import reactRefresh from 'eslint-plugin-react-refresh'
import tseslint from 'typescript-eslint'
// ESLint 기본 및 확장 설정 관련
import js from '@eslint/js';
import tseslint from 'typescript-eslint';
import globals from 'globals';

// ESLint 플러그인
import importPlugin from 'eslint-plugin-import';
import prettierPlugin from 'eslint-plugin-prettier';
import simpleImportSort from 'eslint-plugin-simple-import-sort';
import unusedImports from 'eslint-plugin-unused-imports';
import onlyWarn from 'eslint-plugin-only-warn';

// React 관련 플러그인
import reactPlugin from 'eslint-plugin-react';
import reactHooks from 'eslint-plugin-react-hooks';
import reactRefresh from 'eslint-plugin-react-refresh';

export default tseslint.config(
{ ignores: ['dist'] },
Expand All @@ -14,15 +25,93 @@ export default tseslint.config(
globals: globals.browser,
},
plugins: {
// 기본 유틸 관련
'only-warn': onlyWarn,
prettier: prettierPlugin,

// import 정리 및 미사용 처리 관련
import: importPlugin,
'simple-import-sort': simpleImportSort,
'unused-imports': unusedImports,

// React 및 Hooks 관련
react: reactPlugin,
'react-hooks': reactHooks,
'react-refresh': reactRefresh,
},

rules: {
// React Hooks 규칙 (이미 포함된 부분도 있지만 명시적으로 유지)
...reactHooks.configs.recommended.rules,
'react-hooks/rules-of-hooks': 'error',
'react-hooks/exhaustive-deps': 'warn',

// Import 관련 규칙
'import/no-unresolved': 'off', // Vite alias 고려
'import/no-named-default': 'error',
'import/no-default-export': 'error',

// Import 정렬 (simple-import-sort)
'simple-import-sort/imports': 'error',
'simple-import-sort/exports': 'error',

// Unused import / variable 정리
'no-unused-vars': 'off',
'@typescript-eslint/no-unused-vars': 'off',
'unused-imports/no-unused-vars': [
'error',
{
vars: 'all',
varsIgnorePattern: '^_',
args: 'after-used',
argsIgnorePattern: '^_',
},
],
'unused-imports/no-unused-imports': 'error',

// React 관련 규칙
'react/react-in-jsx-scope': 'off', // React 17+
'react/jsx-uses-react': 'off',

// React Refresh
'react-refresh/only-export-components': [
'warn',
{ allowConstantExport: true },
],

// Prettier 적용
'prettier/prettier': ['warn', {}, { usePrettierrc: true }],
},
settings: {
'import/resolver': {
typescript: {
project: './tsconfig.json',
},
},
},
},
)

// config 파일 내 default export 허용
{
files: [
'**/*.config.mjs',
'**/*.config.js',
'**/*.config.ts',
'**/vite.config.*',
'**/jest.config.*',
'**/webpack.config.*',
'**/next.config.*',
],
rules: {
'import/no-default-export': 'off',
},
},

// react-refresh 관련 예외 처리 (shadcn UI 컴포넌트 경로)
{
files: ['src/shared/components/ui/**/*.tsx'], // shadcn UI 폴더 예외 처리
rules: {
'react-refresh/only-export-components': 'off', // 해당 폴더 내에서 규칙 비활성화
},
}
);
4 changes: 4 additions & 0 deletions lint-staged.config.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
module.exports = {
'**/*.{ts,tsx}': ['eslint --fix', 'prettier --write'],
'**/*.{json,css,md}': ['prettier --write'],
};
Loading