Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 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
74 changes: 74 additions & 0 deletions .changeset/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
# Changesets

이 프로젝트는 [Changesets](https://github.com/changesets/changesets)를 사용하여 버전 관리 및 배포를 자동화합니다.

## 📝 Changeset 생성하기

패키지를 변경한 후 다음 명령어를 실행하세요:

```bash
pnpm changeset
```

대화형 프롬프트가 나타나면:

1. 변경된 패키지 선택
2. 버전 범프 타입 선택 (major/minor/patch)
3. 변경사항 요약 작성

## 🔖 버전 업데이트

Release PR을 생성하려면:

```bash
pnpm version-packages
```

이 명령어는:

- 패키지 버전 업데이트
- CHANGELOG.md 생성
- changeset 파일 제거

## 🚀 배포

Release PR이 머지되면, GitHub Actions가 자동으로:

Comment on lines +35 to +36
Copy link

Copilot AI Nov 29, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

문서에서 GitHub Actions를 통한 자동 배포를 언급하고 있지만, 현재 .github/workflows 디렉토리에는 changesets 관련 워크플로우가 없는 것으로 보입니다. 실제 구현이 아직 완료되지 않았다면 이 부분을 "추후 구현 예정"으로 명시하거나 제거하는 것이 좋습니다.

Suggested change
Release PR이 머지되면, GitHub Actions가 자동으로:
> ⚠️ 현재 GitHub Actions를 통한 자동 배포는 아직 구현되지 않았으며, 추후 구현될 예정입니다.
Release PR이 머지되면, (추후 구현 예정) GitHub Actions가 자동으로 다음 작업을 수행합니다:

Copilot uses AI. Check for mistakes.
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

곧 합니다

1. 패키지 빌드
2. npm에 배포
3. GitHub Release 생성

## 📚 Semantic Versioning

- **Major (1.0.0)**: Breaking changes
- **Minor (0.1.0)**: 새로운 기능 추가 (하위 호환)
- **Patch (0.0.1)**: 버그 수정

## 예시

### 1. 새로운 기능 추가

```bash
pnpm changeset
# Select: @soso/ui
# Bump: minor
# Summary: "Add Checkbox component"
```

### 2. 버그 수정

```bash
pnpm changeset
# Select: @soso/ui
# Bump: patch
# Summary: "Fix Button disabled state"
```

### 3. Breaking Change

```bash
pnpm changeset
# Select: @soso/ui
# Bump: major
# Summary: "Remove deprecated props from Button"
```
11 changes: 11 additions & 0 deletions .changeset/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"$schema": "https://unpkg.com/@changesets/[email protected]/schema.json",
"changelog": "@changesets/cli/changelog",
"commit": false,
"fixed": [],
"linked": [],
"access": "public",
"baseBranch": "main",
"updateInternalDependencies": "patch",
"ignore": ["@soso/web", "@soso/docs", "@soso/storybook"]
Copy link

Copilot AI Nov 29, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

현재 ignore 목록에 @soso/docs@soso/storybook가 포함되어 있지만, 실제 apps/ 디렉토리에는 아직 이 패키지들이 존재하지 않습니다. 향후 추가될 패키지를 미리 설정해둔 것이라면 문제없지만, 존재하지 않는 패키지를 설정에 포함하면 혼란을 줄 수 있습니다. 실제 패키지가 추가될 때 함께 설정하는 것을 권장합니다.

Suggested change
"ignore": ["@soso/web", "@soso/docs", "@soso/storybook"]
"ignore": ["@soso/web"]

Copilot uses AI. Check for mistakes.
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

추가할겁니다

}
36 changes: 14 additions & 22 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1,33 +1,25 @@
# ESLint ignore patterns
# Node modules
node_modules/

# Build outputs
dist/
build/
.next/
.turbo/
build/
out/
storybook-static/

# Dependencies
node_modules/
pnpm-lock.yaml

# Config files that don't need linting
*.config.js
*.config.cjs
*.config.mjs

# Specific config files
commitlint.config.cjs
next.config.js
tailwind.config.js
postcss.config.js
# Config files (JSON)
**/*.json
!package.json

# Test coverage
coverage/

# Cache directories
.turbo/
.cache/
# Temporary files
*.log
.DS_Store

# Environment files
.env*
!.env.example
# ESLint config packages (JavaScript config files)
packages/eslint-config/*.cjs
packages/tsconfig/*.json
11 changes: 9 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,22 @@
"packageManager": "[email protected]",
"scripts": {
"dev": " turbo run dev --parallel",
"dev:storybook": "pnpm --filter @soso/storybook dev",
"dev:docs": "pnpm --filter @soso/docs dev",
"build": " turbo run build",
"build:packages": "turbo run build --filter='./packages/*'",
"lint": " turbo run lint",
"lint:fix": " turbo run lint -- --fix",
"typecheck": " turbo run typecheck",
"test": " turbo run test",
"test:ci": " turbo run test:coverage",
"test:packages": "turbo run test --filter='./packages/*'",
"commitlint": "commitlint --from HEAD~1 --to HEAD --verbose",
"hooks:help": "sh .husky/help.sh",
"validate": "pnpm lint && pnpm typecheck && pnpm test",
"changeset": "changeset",
"version-packages": "changeset version",
"release": "pnpm build:packages && changeset publish",
"prepare": "husky install"
},
"keywords": [],
Expand All @@ -39,6 +46,7 @@
]
},
"devDependencies": {
"@changesets/cli": "^2.29.8",
"@commitlint/cli": "^19.8.1",
"@commitlint/config-conventional": "^19.8.1",
"@typescript-eslint/eslint-plugin": "^8.35.1",
Expand All @@ -54,6 +62,5 @@
"lint-staged": "^16.1.2",
"prettier": "^3.6.2",
"turbo": "^2.5.4"
},
"dependencies": {}
}
}
24 changes: 24 additions & 0 deletions packages/eslint-config/.eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
/* packages/eslint-config/.eslintrc.cjs ───── ESLint 설정 패키지 자체의 ESLint 설정 */

module.exports = {
root: true,
// JavaScript 파일이므로 TypeScript 파서 사용 안 함
parser: '@typescript-eslint/parser',
parserOptions: {
// 타입 체크 비활성화 (설정 파일은 JS만 사용)
project: null,
sourceType: 'module',
},
extends: [
'eslint:recommended',
'prettier',
],
env: {
node: true,
es2020: true,
},
rules: {
// Node.js require 허용
'@typescript-eslint/no-var-requires': 'off',
},
};
65 changes: 65 additions & 0 deletions packages/eslint-config/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
# @soso/eslint-config

SOSO 모노레포를 위한 공유 ESLint 설정 패키지

## 📦 포함된 설정

### index.cjs

Next.js 앱용 ESLint 설정

**사용 대상**:

- `apps/web`
- `apps/docs`

**특징**:

- Airbnb 스타일 가이드
- TypeScript 지원
- Next.js 규칙
- Prettier 통합

### library.cjs

React 라이브러리용 ESLint 설정

**사용 대상**:

- `packages/ui`
- `packages/hooks`
- `apps/storybook`

**특징**:

- Next.js 규칙 제외
- devDependencies import 허용
- 라이브러리 개발에 최적화

## 🔧 사용법

### Next.js 앱

```js
// apps/web/.eslintrc.cjs
module.exports = {
root: true,
extends: ['@soso/eslint-config'],
};
```

### React 라이브러리

```js
// packages/ui/.eslintrc.cjs
module.exports = {
root: true,
extends: ['@soso/eslint-config/library'],
};
```

## 📚 참고

- [ESLint Documentation](https://eslint.org/docs/latest/)
- [Airbnb JavaScript Style Guide](https://github.com/airbnb/javascript)
- [터보레포 ESLint 설정](https://turborepo.com/docs/guides/tools/eslint)
42 changes: 42 additions & 0 deletions packages/eslint-config/index.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
/* tools/eslint-config/index.cjs ───── 공통 ESLint preset */
Copy link

Copilot AI Nov 29, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

파일 경로가 잘못되었습니다. "tools/eslint-config/index.cjs" → "packages/eslint-config/index.cjs"로 수정해야 합니다.

Suggested change
/* tools/eslint-config/index.cjs ───── 공통 ESLint preset */
/* packages/eslint-config/index.cjs ───── 공통 ESLint preset */

Copilot uses AI. Check for mistakes.

const path = require('path');

module.exports = {
/* 이 파일은 서브-preset이므로 root=false */
root: false,

/* TypeScript AST 파서 지정 */
parser: '@typescript-eslint/parser',
parserOptions: {
// 모노레포 루트의 tsconfig.json 을 지정해야 타입-기반 룰이 동작
project: [path.resolve(__dirname, '../../tsconfig.json')],
tsconfigRootDir: path.resolve(__dirname, '../../'),
sourceType: 'module',
},

plugins: ['@typescript-eslint'],

extends: [
'airbnb',
'airbnb-typescript',
'plugin:@typescript-eslint/recommended',
'next',
'next/core-web-vitals',
'prettier',
],

rules: {
/* React 17+ 는 import React 불필요 */
'react/react-in-jsx-scope': 'off',
/* .tsx 파일만 JSX 허용 */
'react/jsx-filename-extension': ['error', { extensions: ['.tsx'] }],
/* App Router 프로젝트이므로 pages 전용 규칙 끔 */
'@next/next/no-html-link-for-pages': 'off',
'@typescript-eslint/lines-between-class-members': 'off',
'@typescript-eslint/no-throw-literal': 'off',
'@typescript-eslint/dot-notation': 'off',
'@typescript-eslint/no-implied-eval': 'off',
'@typescript-eslint/return-await': 'off',
},
};
40 changes: 40 additions & 0 deletions packages/eslint-config/library.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
/* packages/eslint-config/library.cjs ───── React 라이브러리용 ESLint preset */

const path = require('path');

module.exports = {
root: false,

parser: '@typescript-eslint/parser',
parserOptions: {
project: [path.resolve(__dirname, '../../tsconfig.json')],
tsconfigRootDir: path.resolve(__dirname, '../../'),
sourceType: 'module',
},

plugins: ['@typescript-eslint'],

extends: [
'airbnb',
'airbnb-typescript',
'plugin:@typescript-eslint/recommended',
'prettier',
],

rules: {
'react/react-in-jsx-scope': 'off',
'react/jsx-filename-extension': ['error', { extensions: ['.tsx'] }],
'@typescript-eslint/lines-between-class-members': 'off',
'@typescript-eslint/no-throw-literal': 'off',
'@typescript-eslint/dot-notation': 'off',
'@typescript-eslint/no-implied-eval': 'off',
'@typescript-eslint/return-await': 'off',
// 라이브러리에서는 devDependencies import 허용
'import/no-extraneous-dependencies': [
'error',
{
devDependencies: true,
},
],
},
};
11 changes: 11 additions & 0 deletions packages/eslint-config/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"name": "@soso/eslint-config",
"version": "0.0.0",
"private": true,
"description": "Shared ESLint configurations for SOSO monorepo",
"main": "./index.cjs",
"files": [
"index.cjs",
"library.cjs"
]
}
14 changes: 14 additions & 0 deletions packages/tsconfig/.eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
/* packages/tsconfig/.eslintrc.cjs ───── TypeScript 설정 패키지의 ESLint 설정 */

module.exports = {
root: true,
extends: [
'eslint:recommended',
'prettier',
],
env: {
node: true,
},
// JSON 파일이므로 ESLint 비활성화
ignorePatterns: ['*.json'],
};
Loading