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: 2 additions & 2 deletions .github/workflows/analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,12 @@ jobs:

- name: 📦 Setup pnpm
uses: pnpm/action-setup@v3
with: { version: 9 }
with: { version: 10 }

- name: 🏗️ Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
node-version: '24'
cache: 'pnpm'

- name: 📂 Install dependencies
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,12 @@ jobs:

- name: 📦 Setup pnpm
uses: pnpm/action-setup@v3
with: { version: 9 }
with: { version: 10 }

- name: 🏗️ Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20
node-version: 24
cache: pnpm

- name: 📂 Install dependencies
Expand Down
2 changes: 1 addition & 1 deletion .npmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
package-manager=pnpm@9.1.0
package-manager=pnpm@10.24.0
30 changes: 6 additions & 24 deletions apps/web/.eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -1,29 +1,11 @@
// apps/web/.eslintrc.js
module.exports = {
root: true,
parser: '@typescript-eslint/parser',
parserOptions: {
project: './tsconfig.json',
},
ignorePatterns: ['stylelint.config.js', 'postcss.config.mjs', '**/__tests__/e2e/**', 'server.mjs'],
extends: [
'next',
'next/core-web-vitals',
'plugin:@typescript-eslint/recommended',
],
overrides: [
{
// 이 패턴에 걸리는 파일은 타입 검사(parserOptions.project) 하지 않음
files: [
'next.config.js',
'postcss.config.cjs',
'tailwind.config.js',
'.eslintrc.js',
],
parserOptions: {
project: null, // or []
},
},
extends: ['next', 'next/core-web-vitals'],
ignorePatterns: [
'stylelint.config.js',
'postcss.config.mjs',
'**/__tests__/e2e/**',
'server.mjs',
],
rules: {
// 기존 규칙
Expand Down
3 changes: 2 additions & 1 deletion apps/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
"devDependencies": {
"@eslint/eslintrc": "^3",
"@lhci/cli": "^0.15.1",
"eslint": "^8.56.0",
Comment on lines 50 to +51
Copy link

Copilot AI Dec 6, 2025

Choose a reason for hiding this comment

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

eslint가 devDependencies 목록의 중간에 추가되어 있어 알파벳 순서가 깨졌습니다. 일관성을 위해 @eslint/eslintrc 다음에 위치시키시기 바랍니다.

Suggested change
"@lhci/cli": "^0.15.1",
"eslint": "^8.56.0",
"eslint": "^8.56.0",
"@lhci/cli": "^0.15.1",

Copilot uses AI. Check for mistakes.
"@next/bundle-analyzer": "^15.5.3",
"@playwright/test": "^1.56.1",
"@stylistic/stylelint-config": "^2.0.0",
Expand All @@ -58,7 +59,7 @@
"@testing-library/react": "^14.3.1",
"@testing-library/user-event": "^14.5.2",
"@types/js-cookie": "^3.0.6",
"@types/node": "^20",
"@types/node": "^24",
"@types/react": "^18.2.0",
"@types/react-dom": "^18.2.0",
"@vitejs/plugin-react": "^4.3.3",
Expand Down
21 changes: 19 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "1.0.0",
"description": "",
"main": "index.js",
"packageManager": "pnpm@9.15.9",
"packageManager": "pnpm@10.24.0",
"scripts": {
"dev": " turbo run dev --parallel",
"dev:web": "pnpm --filter web dev:https",
Expand All @@ -26,13 +26,29 @@
},
"keywords": [],
"author": "",
"license": "ISC",
"license": "Apache-2.0",
"private": true,
"engines": {
"node": "^24",
"pnpm": "^10"
},
"workspaces": [
"apps/*",
"packages/*",
"tools/*"
],
"pnpm": {
"overrides": {
"@types/node": "^24"
},
"peerDependencyRules": {
"allowedVersions": {
"@typescript-eslint/eslint-plugin": "8",
"@typescript-eslint/parser": "8",
"eslint-plugin-react-hooks": "5"
}
}
},
"lint-staged": {
"*.{ts,tsx}": [
"eslint --fix",
Expand All @@ -49,6 +65,7 @@
"@changesets/cli": "^2.29.8",
"@commitlint/cli": "^19.8.1",
"@commitlint/config-conventional": "^19.8.1",
"@types/node": "24.10.1",
"@typescript-eslint/eslint-plugin": "^8.35.1",
"@typescript-eslint/parser": "^8.35.1",
"eslint": "^8.56.0",
Expand Down
10 changes: 10 additions & 0 deletions packages/eslint-config/library.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,15 @@ module.exports = {
devDependencies: true,
},
],
// 라이브러리에서는 props spreading 허용 (유연한 API를 위해)
'react/jsx-props-no-spreading': 'off',
// TypeScript 사용 시 defaultProps 불필요 (optional props 사용)
'react/require-default-props': 'off',
// named export를 선호 (Tree-shaking에 유리)
'import/prefer-default-export': 'off',
// 화살표 함수 스타일 자유롭게
'arrow-body-style': 'off',
// useEffect cleanup 함수 등에서 유연한 return 허용
'consistent-return': 'off',
},
};
3 changes: 3 additions & 0 deletions packages/ui/.eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
dist
node_modules
*.config.ts
17 changes: 17 additions & 0 deletions packages/ui/.eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
const path = require('path');

module.exports = {
root: true,
extends: [require.resolve('@soso/eslint-config/library.cjs')],
parserOptions: {
project: path.resolve(__dirname, './tsconfig.json'),
tsconfigRootDir: __dirname,
},
ignorePatterns: [
'dist',
'*.config.ts',
'*.config.js',
'*.config.mjs',
'.eslintrc.*',
],
};
38 changes: 38 additions & 0 deletions packages/ui/.npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Source files
src/
*.ts
*.tsx
!*.d.ts

# Config files
tsconfig.json
tsup.config.ts
vitest.config.ts
.eslintrc.cjs

# Test files
**/*.test.*
**/*.spec.*
src/test/
__tests__/
tests/
coverage/

# Development
.turbo/
node_modules/
.DS_Store
*.log

# Git
.git/
.gitignore

# IDE
.vscode/
.idea/
*.swp
*.swo

# Misc
.changeset/
89 changes: 89 additions & 0 deletions packages/ui/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
# @soso/ui

SOSO UI component library - Production-grade React components for SOSO applications.

## Installation

```bash
# Using pnpm
pnpm add @soso/ui

# Using npm
npm install @soso/ui

# Using yarn
yarn add @soso/ui
```

## Usage

```tsx
import { Button } from '@soso/ui';

function App() {
return (
<Button onClick={() => console.log('Clicked!')}>Click me</Button>
);
}
```

## Development

### Prerequisites

- Node.js 18+
- pnpm 8+

### Setup

```bash
# Install dependencies
pnpm install

# Run tests
pnpm test

# Run tests in watch mode
pnpm test:watch

# Build the library
pnpm build

# Type check
pnpm typecheck

# Lint
pnpm lint
```

### Scripts

- `pnpm build` - Build the library (ESM + CJS + TypeScript declarations)
- `pnpm dev` - Build in watch mode
- `pnpm test` - Run unit tests
- `pnpm test:watch` - Run tests in watch mode
- `pnpm test:coverage` - Generate coverage report
- `pnpm test:ui` - Open Vitest UI
- `pnpm typecheck` - Run TypeScript type checking
- `pnpm lint` - Lint the codebase
- `pnpm clean` - Clean build artifacts

## Features

- ✅ **TypeScript**: Full TypeScript support with type definitions
- ✅ **Tree-shakeable**: ESM and CJS builds with tree-shaking support
- ✅ **Tested**: Comprehensive unit tests with Vitest
- ✅ **Accessible**: Built with accessibility in mind
- ✅ **Modern**: Uses latest React patterns and best practices

## Components

_(Component documentation will be added as components are developed)_

## License

MIT

## Contributing

See [CONTRIBUTING.md](../../CONTRIBUTING.md) for details.
92 changes: 91 additions & 1 deletion packages/ui/package.json
Original file line number Diff line number Diff line change
@@ -1 +1,91 @@
{ "name": "@soso/ui", "version": "0.0.0", "private": true }
{
"name": "@soso/ui",
"version": "0.0.0",
"description": "SOSO UI component library",
"author": "SOSO Team",
"license": "MIT",
"type": "module",
"exports": {
"./package.json": "./package.json",
".": {
"import": {
"types": "./dist/index.d.mts",
"default": "./dist/index.mjs"
},
"require": {
"types": "./dist/index.d.ts",
"default": "./dist/index.js"
}
},
"./components/*": {
"import": {
"types": "./dist/components/*.d.mts",
"default": "./dist/components/*.mjs"
},
"require": {
"types": "./dist/components/*.d.ts",
"default": "./dist/components/*.js"
}
}
Comment on lines +20 to +29
Copy link

Copilot AI Dec 6, 2025

Choose a reason for hiding this comment

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

subpath exports 패턴 ./components/*가 설정되어 있으나, tsup 빌드 설정(tsup.config.ts)에서는 entry: ['src/index.ts']만 지정되어 있어 개별 컴포넌트 파일이 생성되지 않습니다.

현재 빌드로는 dist/components/ 디렉토리가 생성되지 않아 이 export가 작동하지 않습니다.

해결 방법:

  1. tsup.config.ts의 entry에 개별 컴포넌트를 추가하거나
  2. 이 subpath export를 제거하거나
  3. 번들러가 tree-shaking을 처리하도록 메인 export만 사용하시기 바랍니다.
Suggested change
"./components/*": {
"import": {
"types": "./dist/components/*.d.mts",
"default": "./dist/components/*.mjs"
},
"require": {
"types": "./dist/components/*.d.ts",
"default": "./dist/components/*.js"
}
}

Copilot uses AI. Check for mistakes.
},
"main": "./dist/index.js",
"module": "./dist/index.mjs",
"types": "./dist/index.d.ts",
"files": [
"dist",
"README.md",
"CHANGELOG.md"
],
"scripts": {
"build": "tsup",
"dev": "tsup --watch",
"test": "vitest run",
"test:watch": "vitest",
"test:coverage": "vitest run --coverage",
"test:ui": "vitest --ui",
"typecheck": "tsc --noEmit",
"lint": "eslint .",
"clean": "rm -rf dist"
},
"dependencies": {
"clsx": "^2.1.1",
"motion": "^12.23.24",
"tailwind-merge": "^3.3.1"
},
"peerDependencies": {
"react": "^18.2.0",
"react-dom": "^18.2.0"
},
"devDependencies": {
"@soso/eslint-config": "workspace:*",
"@soso/tsconfig": "workspace:*",
"@testing-library/jest-dom": "^6.6.1",
"@testing-library/react": "^14.3.1",
"@testing-library/user-event": "^14.5.2",
"@types/react": "^18.2.0",
"@types/react-dom": "^18.2.0",
"@vitejs/plugin-react": "^4.3.3",
"@vitest/coverage-v8": "^3.2.4",
"@vitest/ui": "^3.2.4",
"eslint": "^8.56.0",
"jsdom": "^25.0.1",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"tsup": "^8.3.5",
"typescript": "^5.4.2",
"vitest": "^3.2.4"
},
"engines": {
"node": ">=18.0.0"
},
"publishConfig": {
"access": "public"
},
"keywords": [
"react",
"components",
"ui",
"design-system",
"soso"
]
}
Loading