Skip to content

Commit 384e5fb

Browse files
committed
chore(project-setup): Configure development environment and code quality tools
1 parent 48db19d commit 384e5fb

19 files changed

+320
-217
lines changed

.editorconfig

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# EditorConfig는 다양한 에디터와 IDE에서 일관된 코딩 스타일을 유지하는 데 도움을 줍니다
2+
# https://editorconfig.org
3+
4+
root = true
5+
6+
[*]
7+
charset = utf-8
8+
end_of_line = lf
9+
insert_final_newline = true
10+
trim_trailing_whitespace = true
11+
indent_style = space
12+
indent_size = 2
13+
14+
[*.{js,jsx,ts,tsx,json,css}]
15+
indent_style = space
16+
indent_size = 2
17+
18+
[*.md]
19+
trim_trailing_whitespace = false
20+
21+
[*.{yml,yaml}]
22+
indent_size = 2

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,4 +251,4 @@ $RECYCLE.BIN/
251251
.claude
252252
/documents/**
253253

254-
.kiro
254+
.kiro

.vscode/settings.json

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
{
2+
// Biome를 기본 포맷터로 설정
3+
"editor.defaultFormatter": "biomejs.biome",
4+
5+
// 저장 시 자동 포맷팅
6+
"editor.formatOnSave": true,
7+
8+
// 붙여넣기 시 자동 포맷팅
9+
"editor.formatOnPaste": true,
10+
11+
// 타입 시 자동 포맷팅 (선택사항)
12+
"editor.formatOnType": false,
13+
14+
// Biome 설정
15+
"biome.enabled": true,
16+
17+
// 파일 타입별 포맷터 설정
18+
"[javascript]": {
19+
"editor.defaultFormatter": "biomejs.biome",
20+
"editor.formatOnSave": true
21+
},
22+
"[javascriptreact]": {
23+
"editor.defaultFormatter": "biomejs.biome",
24+
"editor.formatOnSave": true
25+
},
26+
"[typescript]": {
27+
"editor.defaultFormatter": "biomejs.biome",
28+
"editor.formatOnSave": true
29+
},
30+
"[typescriptreact]": {
31+
"editor.defaultFormatter": "biomejs.biome",
32+
"editor.formatOnSave": true
33+
},
34+
"[json]": {
35+
"editor.defaultFormatter": "biomejs.biome",
36+
"editor.formatOnSave": true
37+
},
38+
"[jsonc]": {
39+
"editor.defaultFormatter": "biomejs.biome",
40+
"editor.formatOnSave": true
41+
},
42+
43+
// 줄바꿈 문자 설정 (LF로 통일)
44+
"files.eol": "\n",
45+
46+
// 저장 시 trailing whitespace 제거
47+
"files.trimTrailingWhitespace": true,
48+
49+
// 파일 끝에 빈 줄 추가
50+
"files.insertFinalNewline": true
51+
}

README.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,32 @@ npm start
7777

7878
# Run linter
7979
npm run lint
80+
81+
# Format code with Biome
82+
npm run format
83+
84+
# Check code formatting
85+
npm run format:check
86+
87+
# Run Biome linter and formatter
88+
npm run biome:check
89+
90+
# Auto-fix with Biome
91+
npm run biome:fix
8092
```
8193

94+
### Code Quality Tools
95+
96+
This project uses **Biome** for fast and consistent code formatting and linting:
97+
98+
- **Formatter**: Automatically formats JavaScript/TypeScript code
99+
- **Linter**: Catches common errors and enforces best practices
100+
- **Line Ending**: LF (Unix-style) for cross-platform compatibility
101+
- **Quote Style**: Double quotes
102+
- **Indent**: 2 spaces
103+
104+
Configuration is in `biome.json` and `.editorconfig`.
105+
82106
## Implementation Status
83107

84108
This project follows a spec-driven development approach. See `.kiro/specs/webrtc-1-to-1-communication/` for:

app/layout.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1-
import './globals.css'
1+
import "./globals.css";
22

33
export const metadata = {
4-
title: 'WebRTC 1:1 Communication',
5-
description: 'Real-time video chat and whiteboard collaboration',
6-
}
4+
title: "WebRTC 1:1 Communication",
5+
description: "Real-time video chat and whiteboard collaboration",
6+
};
77

88
export default function RootLayout({ children }) {
99
return (
1010
<html lang="ko">
1111
<body suppressHydrationWarning>{children}</body>
1212
</html>
13-
)
13+
);
1414
}

app/page.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@ export default function Home() {
66
Real-time video chat and whiteboard collaboration
77
</p>
88
</main>
9-
)
9+
);
1010
}

biome.json

Lines changed: 56 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,58 @@
11
{
2-
"$schema": "https://biomejs.dev/schemas/2.3.2/schema.json",
3-
"vcs": {
4-
"enabled": true,
5-
"clientKind": "git",
6-
"useIgnoreFile": true
7-
},
8-
"files": {
9-
"ignoreUnknown": false
10-
},
11-
"formatter": {
12-
"enabled": true,
13-
"indentStyle": "space"
14-
},
15-
"linter": {
16-
"enabled": true,
17-
"rules": {
18-
"recommended": true
19-
}
20-
},
21-
"javascript": {
22-
"formatter": {
23-
"quoteStyle": "double"
24-
}
25-
},
26-
"assist": {
27-
"enabled": true,
28-
"actions": {
29-
"source": {
30-
"organizeImports": "on"
31-
}
32-
}
33-
}
2+
"$schema": "https://biomejs.dev/schemas/2.3.2/schema.json",
3+
"vcs": {
4+
"enabled": true,
5+
"clientKind": "git",
6+
"useIgnoreFile": true
7+
},
8+
"files": {
9+
"ignoreUnknown": false,
10+
"includes": [
11+
"app/**/*.js",
12+
"app/**/*.jsx",
13+
"components/**/*.js",
14+
"components/**/*.jsx",
15+
"contexts/**/*.js",
16+
"hooks/**/*.js",
17+
"lib/**/*.js",
18+
"server/**/*.js",
19+
"services/**/*.js",
20+
"*.js",
21+
"*.json"
22+
]
23+
},
24+
"formatter": {
25+
"enabled": true,
26+
"indentStyle": "space",
27+
"indentWidth": 2,
28+
"lineWidth": 100,
29+
"lineEnding": "lf"
30+
},
31+
"linter": {
32+
"enabled": true,
33+
"rules": {
34+
"recommended": true,
35+
"correctness": {
36+
"noUnusedImports": "warn"
37+
},
38+
"suspicious": {
39+
"noUnknownAtRules": "off"
40+
}
41+
}
42+
},
43+
"javascript": {
44+
"formatter": {
45+
"quoteStyle": "double",
46+
"semicolons": "always",
47+
"trailingCommas": "es5"
48+
}
49+
},
50+
"assist": {
51+
"enabled": true,
52+
"actions": {
53+
"source": {
54+
"organizeImports": "on"
55+
}
56+
}
57+
}
3458
}

jest.config.js

Lines changed: 13 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -4,31 +4,28 @@
44
*/
55
export default {
66
// Node.js 환경에서 테스트 실행
7-
testEnvironment: 'node',
8-
7+
testEnvironment: "node",
8+
99
// ES6 modules 지원
1010
transform: {},
11-
11+
1212
// 전역 변수 주입
1313
injectGlobals: true,
14-
14+
1515
// 테스트 파일 패턴
16-
testMatch: [
17-
'**/*.test.js',
18-
'**/*.spec.js'
19-
],
20-
16+
testMatch: ["**/*.test.js", "**/*.spec.js"],
17+
2118
// 커버리지 수집 대상
2219
collectCoverageFrom: [
23-
'server/**/*.js',
24-
'!server/**/*.test.js',
25-
'!server/**/*.spec.js',
26-
'!server/test-*.js'
20+
"server/**/*.js",
21+
"!server/**/*.test.js",
22+
"!server/**/*.spec.js",
23+
"!server/test-*.js",
2724
],
28-
25+
2926
// 테스트 타임아웃 (밀리초)
3027
testTimeout: 10000,
31-
28+
3229
// 상세한 출력
33-
verbose: true
30+
verbose: true,
3431
};

lib/utils.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import { clsx } from "clsx"
2-
import { twMerge } from "tailwind-merge"
1+
import { clsx } from "clsx";
2+
import { twMerge } from "tailwind-merge";
33

44
export function cn(...inputs) {
5-
return twMerge(clsx(inputs))
5+
return twMerge(clsx(inputs));
66
}
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/** @type {import('next').NextConfig} */
22
const nextConfig = {
33
reactStrictMode: true,
4-
}
4+
};
55

6-
module.exports = nextConfig
6+
export default nextConfig;

0 commit comments

Comments
 (0)