@wishket/eslint-config-wishket 1.1.0 → 2.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -5,4 +5,4 @@ with multi-package repos, or single-package repos to help you version and publis
5
5
  find the full documentation for it [in our repository](https://github.com/changesets/changesets)
6
6
 
7
7
  We have a quick list of common questions to get you started engaging with this project in
8
- [our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md)
8
+ [our documentation](https://g.ithub.com/changesets/changesets/blob/main/docs/common-questions.md)
@@ -2,4 +2,4 @@
2
2
  '@wishket/eslint-config-wishket': patch
3
3
  ---
4
4
 
5
- Publish with tag 1.1.0
5
+ Publish with tag 2.1.0
@@ -0,0 +1,17 @@
1
+ ---
2
+ "@wishket/eslint-config-wishket": major
3
+ ---
4
+
5
+ BREAKING CHANGE: 모든 ESLint 플러그인을 peer-dependencies로 이동
6
+
7
+ v2.0에서는 eslint-config-airbnb와 동일한 패턴을 따라 모든 플러그인이 peer dependencies로 이동했습니다.
8
+
9
+ **변경사항:**
10
+ - 17개 플러그인이 peer-dependencies로 이동
11
+ - typescript와 Jest 관련 플러그인은 optional로 표시
12
+ - 버전 충돌 방지 및 유연성 향상
13
+
14
+ **마이그레이션:**
15
+ 자동 설치: `npx install-peerdeps --dev @wishket/eslint-config-wishket`
16
+
17
+ 자세한 내용은 MIGRATION.md를 참조하세요.
@@ -0,0 +1,300 @@
1
+ # Augmented Coding Principles
2
+
3
+ ## ⚠️ REMINDER: 한국어로 응답하세요!
4
+
5
+ All responses must be in Korean. Check `critical.md` for details.
6
+
7
+ Based on Kent Beck's approach: https://tidyfirst.substack.com/p/augmented-coding-beyond-the-vibes
8
+
9
+ ## Philosophy: Beyond Vibe Coding
10
+
11
+ ### Vibe Coding vs Augmented Coding
12
+
13
+ - **Vibe Coding**: Don't care about code, only behavior. Feed errors back to AI hoping for fixes.
14
+ - **Augmented Coding**: Care about code quality, complexity, tests, and coverage. Same value system as hand coding—tidy code that works. You just don't type much of it.
15
+
16
+ **We practice Augmented Coding**: High standards for AI-generated code, same as hand-written code.
17
+
18
+ ---
19
+
20
+ ## TDD Cycle (Strict Adherence)
21
+
22
+ Follow the **Red → Green → Refactor** cycle religiously:
23
+
24
+ 1. **Red**: Write a failing test that defines a small increment of functionality
25
+ 2. **Green**: Implement the minimum code needed to make the test pass
26
+ 3. **Refactor**: Improve structure only after tests are passing
27
+
28
+ ### Core Rules
29
+
30
+ - Write one test at a time
31
+ - Make it pass with minimal code
32
+ - Run all tests after each change
33
+ - Never skip the refactor step
34
+
35
+ ### Project-Specific TDD Strategy
36
+
37
+ #### ESLint 규칙 검증 (Test-First TDD)
38
+
39
+ ESLint 설정 변경 시 TDD 적용:
40
+
41
+ **Workflow:**
42
+
43
+ 1. 검증할 코드 예제 작성
44
+ - 규칙을 위반하는 코드
45
+ - 규칙을 준수하는 코드
46
+ 2. 예상되는 ESLint 결과 정의
47
+ 3. ESLint 규칙 추가/수정
48
+ 4. 실제 프로젝트에서 테스트
49
+ 5. 규칙 미세 조정
50
+
51
+ **예제:**
52
+
53
+ ```javascript
54
+ // 1. 테스트 케이스 작성
55
+ // bad.js - 규칙 위반 (에러 발생 예상)
56
+ function foo() {
57
+ return 'bar';
58
+ }
59
+
60
+ // good.js - 규칙 준수 (에러 없음)
61
+ const foo = () => 'bar';
62
+
63
+ // 2. ESLint 규칙 추가
64
+ 'no-restricted-syntax': [
65
+ 'error',
66
+ {
67
+ selector: 'FunctionDeclaration',
68
+ message: 'Function declarations are not allowed. Use arrow functions instead.'
69
+ }
70
+ ]
71
+
72
+ // 3. 검증
73
+ // bad.js → ✗ 에러 발생
74
+ // good.js → ✓ 통과
75
+ ```
76
+
77
+ ---
78
+
79
+ ## Tidy First 접근법
80
+
81
+ **핵심 원칙**: 구조적 변경과 동작 변경을 분리. 절대 섞지 말 것.
82
+
83
+ ### 두 가지 변경 유형
84
+
85
+ #### 1. 구조적 변경 (Tidy First)
86
+
87
+ 동작 변경 없이 코드 재구성:
88
+
89
+ - 규칙 재정렬 및 그룹화
90
+ - 주석 개선
91
+ - 중복 규칙 제거
92
+ - 포맷팅 수정
93
+
94
+ **검증**: 동일한 ESLint 동작 유지—기존 프로젝트에서 동일한 결과
95
+
96
+ #### 2. 동작 변경
97
+
98
+ 실제 ESLint 동작 수정:
99
+
100
+ - 새 규칙 추가
101
+ - 규칙 엄격도 변경 (warn → error)
102
+ - 규칙 옵션 수정
103
+ - 플러그인 추가/제거
104
+
105
+ ### 워크플로우 규칙
106
+
107
+ 두 유형의 변경이 모두 필요한 경우:
108
+
109
+ 1. 구조적 변경을 먼저 수행
110
+ 2. 구조적 변경을 별도로 커밋
111
+ 3. 그 다음 동작 변경 수행
112
+ 4. 동작 변경을 별도로 커밋
113
+
114
+ **절대 같은 커밋에 섞지 말 것**
115
+
116
+ **예제:**
117
+
118
+ ```bash
119
+ # 1단계: 구조적 변경 (Tidy)
120
+ git commit -m "refactor: 공백 관련 규칙을 하나의 섹션으로 그룹화"
121
+
122
+ # 2단계: 동작 변경 (Behavior)
123
+ git commit -m "feat: max-len 규칙을 80자로 강제"
124
+ ```
125
+
126
+ ---
127
+
128
+ ## 커밋 규율
129
+
130
+ ### 커밋 조건:
131
+
132
+ 1. ✅ ESLint 설정이 유효함 (구문 오류 없음)
133
+ 2. ✅ 실제 프로젝트에서 테스트 완료
134
+ 3. ✅ 변경이 단일 논리적 작업 단위를 나타냄
135
+ 4. ✅ 커밋 메시지가 명확히 구조적 또는 동작 변경 명시
136
+ 5. ✅ Changeset 생성 (버전 변경 필요 시)
137
+
138
+ ### 커밋 메시지
139
+
140
+ - **구조적**: `refactor: import 규칙을 별도 섹션으로 분리`
141
+ - **동작적**: `feat: 화살표 함수 강제 규칙 추가`
142
+ - **수정**: `fix: no-restricted-syntax 규칙 정규식 오류 수정`
143
+
144
+ 크고 드문 커밋보다 작고 빈번한 커밋 선호
145
+
146
+ ---
147
+
148
+ ## AI 모니터링 체크포인트
149
+
150
+ AI를 주의 깊게 관찰하고 다음을 발견하면 개입:
151
+
152
+ ### 🚨 경고 신호 (즉시 AI 중단)
153
+
154
+ 1. **불필요한 복잡성**: 간단한 규칙을 과도하게 복잡하게 작성
155
+ 2. **요청하지 않은 변경**: 요청하지 않은 규칙 추가/수정
156
+ 3. **주석 삭제**: 기존 한국어 주석 제거
157
+ 4. **참조 번호 제거**: `#숫자` 형식의 참조 제거
158
+ 5. **중복 추가**: 이미 정의된 규칙 재정의
159
+
160
+ ### ✅ 좋은 AI 동작
161
+
162
+ - 정확한 지시 준수
163
+ - 기존 코드 스타일 유지
164
+ - 한국어 주석 작성
165
+ - 참조 번호 보존
166
+ - 불확실할 때 명확화 요청
167
+
168
+ ### 개입 전략
169
+
170
+ 중간 결과를 지속적으로 검토:
171
+
172
+ - 각 AI 응답 후 변경사항 확인
173
+ - AI가 정확히 요청한 것을 했는지 검증
174
+ - 경로를 벗어나면 중단하고 재지시
175
+ - 구체적인 다음 단계 제안
176
+
177
+ ---
178
+
179
+ ## 코드 품질 표준
180
+
181
+ ### 핵심 원칙 (SOLID)
182
+
183
+ - **단일 책임**: 각 규칙은 하나의 코드 스타일만 강제
184
+ - **개방/폐쇄**: 프로젝트별 확장은 허용, 기본 규칙은 수정 최소화
185
+ - **명확한 의도**: 규칙의 목적이 주석으로 명확히 표현됨
186
+ - **최소 의존성**: 필요한 플러그인만 사용
187
+ - **일관성**: 모든 규칙이 동일한 형식과 스타일 유지
188
+
189
+ ### 품질 메트릭
190
+
191
+ - **중복 제거**: DRY (Don't Repeat Yourself) 철저히 적용
192
+ - 같은 규칙을 여러 번 정의하지 않음
193
+ - **의도를 명확히 표현**: 주석이 규칙의 목적을 드러냄
194
+ - **호환성 유지**: React 19/Next.js 15와 호환
195
+ - **최소 설정**: 필요한 규칙만 포함
196
+ - **가장 간단한 해결책**: "작동할 수 있는 가장 간단한 설정은 무엇인가?"
197
+
198
+ ### ESLint 설정 표준
199
+
200
+ - **주석**: 모든 규칙에 한국어 설명 주석
201
+ - **참조 번호**: Wishket 코드 스타일 가이드 참조 번호 유지
202
+ - **그룹화**: 관련 규칙을 카테고리별로 그룹화
203
+ - **일관성**: 동일한 형식과 들여쓰기 사용
204
+ - **테스트**: 실제 프로젝트에서 검증
205
+
206
+ ---
207
+
208
+ ## 리팩토링 가이드라인
209
+
210
+ ### 리팩토링 시기
211
+
212
+ - **Green** 단계에서만 (설정이 유효하고 테스트 통과)
213
+ - 새 규칙 추가 후
214
+ - 중복을 발견했을 때
215
+ - 의도가 불명확할 때
216
+
217
+ ### 리팩토링 방법
218
+
219
+ 1. **한 번에 하나의 변경**: 단일 리팩토링 작업
220
+ 2. **각 단계 후 검증**: ESLint 설정이 여전히 유효한지 확인
221
+ 3. **명확성 우선**: 중복 제거, 주석 개선, 그룹화
222
+
223
+ ### 일반적인 리팩토링
224
+
225
+ - 규칙 재그룹화 (카테고리별)
226
+ - 주석 개선
227
+ - 중복 규칙 제거
228
+ - 규칙 순서 재정렬
229
+ - 매직 값을 상수로 교체
230
+
231
+ ---
232
+
233
+ ## 예제 워크플로우
234
+
235
+ ### 새 ESLint 규칙 추가
236
+
237
+ #### 1단계: 테스트 케이스 작성 (Red)
238
+
239
+ ```javascript
240
+ // test-cases/arrow-functions/bad.js
241
+ function add(a, b) {
242
+ return a + b;
243
+ }
244
+
245
+ // test-cases/arrow-functions/good.js
246
+ const add = (a, b) => a + b;
247
+ ```
248
+
249
+ #### 2단계: 규칙 추가 (Green)
250
+
251
+ ```javascript
252
+ // index.js
253
+ 'no-restricted-syntax': [
254
+ 'error',
255
+ {
256
+ selector: 'FunctionDeclaration',
257
+ message: 'Function declarations are not allowed. Use arrow functions instead.'
258
+ }
259
+ ]
260
+ ```
261
+
262
+ #### 3단계: 테스트 검증
263
+
264
+ 실제 프로젝트에서 ESLint 실행:
265
+ - `bad.js` → ✗ 에러 발생 확인
266
+ - `good.js` → ✓ 통과 확인
267
+
268
+ #### 4단계: 리팩터 (필요시)
269
+
270
+ 주석 추가, 규칙 그룹화 등
271
+
272
+ #### 5단계: 커밋
273
+
274
+ ```bash
275
+ git commit -m "feat: 화살표 함수만 사용하도록 강제하는 규칙 추가"
276
+ ```
277
+
278
+ #### 6단계: Changeset 생성
279
+
280
+ ```bash
281
+ yarn changeset
282
+ # minor 선택
283
+ # "화살표 함수 강제 규칙 추가" 입력
284
+ ```
285
+
286
+ ---
287
+
288
+ ## 프로젝트 규칙과의 통합
289
+
290
+ 이 파일은 AI와 **어떻게** 코드를 작성하는지 정의합니다.
291
+
292
+ 참고 문서:
293
+
294
+ - `core.md` - PLAN/ACT 모드와 커뮤니케이션 규칙
295
+ - `project.md` - ESLint 패키지 구조, 퍼블리싱 워크플로우
296
+ - `critical.md` - 절대 위반하면 안 되는 규칙
297
+
298
+ ---
299
+
300
+ **기억하세요**: AI와 프로그래밍하는 것도 여전히 프로그래밍입니다. 시간당 더 많은 중요한 결정을 내리고, 지루한 결정은 줄입니다. 아키텍처, 디자인, 품질에 집중하고—AI가 타이핑을 처리하게 하세요.
@@ -0,0 +1,164 @@
1
+ # Core Rules
2
+
3
+ ## ⚠️ PREREQUISITE: Check critical.md FIRST!
4
+
5
+ Before reading this file, ensure you've read and understood `critical.md`.
6
+ 특히 한국어 응답 규칙을 반드시 준수하세요.
7
+
8
+ ## Work Modes
9
+
10
+ You have three modes of operation:
11
+
12
+ 1. **PLAN mode** - Define a plan without making changes
13
+ 2. **ACT mode** - Execute the plan and make changes
14
+ 3. **EVAL mode** - Analyze results and propose improvements
15
+
16
+ ### Mode Rules
17
+
18
+ - Start in PLAN mode by default
19
+ - Move to ACT mode when user types `ACT`
20
+ - **After ACT completes, automatically return to PLAN mode** (default behavior)
21
+ - Move to EVAL mode **only when user explicitly requests** by typing `EVAL` (after ACT)
22
+ - EVAL mode analyzes ACT results and proposes improved PLAN
23
+ - After EVAL completes, return to PLAN mode with improvement suggestions
24
+ - User can repeat ACT → EVAL → PLAN cycle until satisfied
25
+ - When in plan mode always output the full updated plan in every response
26
+
27
+ ### Default Flow
28
+
29
+ ```
30
+ PLAN → (user: ACT) → ACT → PLAN (automatic return)
31
+ ```
32
+
33
+ ### Optional Evaluation Flow
34
+
35
+ ```
36
+ PLAN → (user: ACT) → ACT → PLAN → (user: EVAL) → EVAL → Improved PLAN
37
+ ```
38
+
39
+ **Key Point:** EVAL is opt-in, not automatic. User must explicitly request evaluation.
40
+
41
+ ### Mode Indicators
42
+
43
+ - Print `# Mode: PLAN` in plan mode
44
+ - Print `# Mode: ACT` in act mode
45
+ - Print `# Mode: EVAL` in eval mode
46
+
47
+ ---
48
+
49
+ ## Eval Mode
50
+
51
+ ### Important
52
+
53
+ - EVAL mode is **not automatic** after ACT
54
+ - User must **explicitly request** EVAL by typing `EVAL`
55
+ - Default behavior after ACT: Return to PLAN (without evaluation)
56
+ - Use EVAL when you want iterative improvement and refinement
57
+
58
+ ### Trigger
59
+
60
+ - Type `EVAL` after completing ACT
61
+ - Type `EVALUATE` (also accepted)
62
+ - Korean: `평가해` or `개선안 제시해`
63
+
64
+ ### Purpose
65
+
66
+ Self-improvement through iterative refinement
67
+
68
+ ### What EVAL does
69
+
70
+ 1. **Analyze Implementation**
71
+
72
+ - Review what was done in ACT
73
+ - Check adherence to project rules
74
+ - Verify quality standards met
75
+
76
+ 2. **Assess Quality**
77
+
78
+ - ✅ Code quality (SOLID, DRY, clarity)
79
+ - ✅ Test coverage (90%+ goal)
80
+ - ✅ Type safety (no `any`)
81
+ - ✅ Performance (bundle size, re-renders)
82
+ - ✅ Accessibility (a11y compliance)
83
+ - ✅ Security (no vulnerabilities)
84
+ - ✅ Best practices (design system, patterns)
85
+
86
+ 3. **Identify Improvements**
87
+
88
+ - What could be better?
89
+ - Alternative approaches?
90
+ - Missing edge cases?
91
+ - Optimization opportunities?
92
+
93
+ 4. **Propose Improved PLAN**
94
+ - Specific, actionable improvements
95
+ - Explain why each matters
96
+ - Prioritize by impact
97
+ - Wait for user to ACT again
98
+
99
+ ### Output Format
100
+
101
+ ```
102
+ # Mode: EVAL
103
+
104
+ ## 📋 Implementation Analysis
105
+ [What was implemented]
106
+
107
+ ## ✅ Strengths
108
+ - [Good point 1]
109
+ - [Good point 2]
110
+
111
+ ## ⚠️ Improvement Opportunities
112
+ - [Issue 1 + Impact]
113
+ - [Issue 2 + Impact]
114
+
115
+ ## 🎯 Improved PLAN
116
+ 1. [Improvement 1 with reasoning]
117
+ 2. [Improvement 2 with reasoning]
118
+
119
+ **Next:** Type `ACT` to apply, `PLAN` to modify, or `EVAL` after next ACT
120
+ ```
121
+
122
+ ### When to use EVAL
123
+
124
+ - Complex features needing refinement
125
+ - First implementation works but could improve
126
+ - Learning and iterating towards excellence
127
+ - Production-critical code requiring high quality
128
+
129
+ ### When to skip EVAL
130
+
131
+ - Simple, straightforward implementations
132
+ - Already meeting all standards
133
+ - Time-sensitive quick fixes
134
+
135
+ ---
136
+
137
+ ## Communication Rules
138
+
139
+ ### 🚨 CRITICAL: Response Language
140
+
141
+ - **MUST respond in Korean (한국어) - NO EXCEPTIONS**
142
+ - **위반 시 즉시 실패로 간주됨**
143
+
144
+ ### Code State Management
145
+
146
+ - User frequently modifies code directly, so **always read code and refresh information** instead of relying on memory
147
+ - **Start by understanding current code state** for every question
148
+ - Never assume - always verify current state
149
+
150
+ ---
151
+
152
+ ## Development Methodology
153
+
154
+ For detailed development methodology, code quality standards, TDD workflows, and AI collaboration practices, refer to **`augmented-coding.md`**.
155
+
156
+ Key principles:
157
+
158
+ - **TDD for ESLint rules** (test with example code before adding rules)
159
+ - **Tidy First approach** (separate structural and behavioral changes)
160
+ - **Code quality standards** (DRY, clear intent, minimal complexity)
161
+ - **Commit discipline** (small, frequent commits with clear messages)
162
+ - **Changeset workflow** (version management for publishing)
163
+
164
+ ---
@@ -0,0 +1,106 @@
1
+ # CRITICAL RULES - ABSOLUTE REQUIREMENTS
2
+
3
+ **⚠️ THESE RULES MUST NEVER BE VIOLATED UNDER ANY CIRCUMSTANCES ⚠️**
4
+
5
+ ---
6
+
7
+ ## 🚨 MANDATORY: Response Language
8
+
9
+ **[CRITICAL] ALL responses MUST be in Korean (한국어)**
10
+
11
+ ### NO EXCEPTIONS
12
+
13
+ - Even if the user writes in English
14
+ - Even for technical explanations
15
+ - Even when discussing code architecture
16
+
17
+ ### English ONLY allowed in:
18
+
19
+ - Code blocks (actual code)
20
+ - Terminal commands
21
+ - File paths
22
+ - Technical terms when no Korean equivalent exists (but add Korean explanation)
23
+
24
+ ### VIOLATION = IMMEDIATE FAILURE
25
+
26
+ If you respond in English (except allowed cases), you have FAILED.
27
+
28
+ ---
29
+
30
+ ## 🚨 MANDATORY: Current Mode Awareness
31
+
32
+ **[CRITICAL] ALWAYS know and display current mode**
33
+
34
+ ### Mode Indicators (REQUIRED)
35
+
36
+ - Start EVERY response with: `# Mode: [CURRENT_MODE]`
37
+ - Modes: PLAN, ACT, EVAL
38
+ - Default: PLAN
39
+
40
+ ### Mode Transitions
41
+
42
+ - PLAN → ACT: Only when user types "ACT"
43
+ - ACT → PLAN: Automatic after completion
44
+ - PLAN → EVAL: Only when user types "EVAL" or "평가해"
45
+
46
+ ---
47
+
48
+ ## 🚨 MANDATORY: No Mocking
49
+
50
+ **[CRITICAL] NEVER create mock data or fake implementations**
51
+
52
+ ### FORBIDDEN
53
+
54
+ - Mock APIs
55
+ - Fake data
56
+ - Placeholder implementations
57
+ - TODO comments instead of real code
58
+
59
+ ### REQUIRED
60
+
61
+ - Real API integrations
62
+ - Actual working code
63
+ - Complete implementations
64
+
65
+ ---
66
+
67
+ ## ✅ SELF-CHECK BEFORE EVERY RESPONSE
68
+
69
+ **STOP and verify:**
70
+
71
+ 1. ☐ **Is my response in Korean?** (한국어로 응답하는가?)
72
+ 2. ☐ **Did I show the current mode?** (현재 모드를 표시했는가?)
73
+ 3. ☐ **Am I following the user's request exactly?** (사용자 요청을 정확히 따르는가?)
74
+ 4. ☐ **Is my code real, not mocked?** (실제 코드인가, 모킹이 아닌가?)
75
+
76
+ ---
77
+
78
+ ## 🛑 VIOLATION RECOVERY PROTOCOL
79
+
80
+ If you catch yourself violating any CRITICAL rule:
81
+
82
+ 1. **STOP IMMEDIATELY**
83
+ 2. **Acknowledge:** "규칙 위반을 감지했습니다. 수정하겠습니다."
84
+ 3. **Correct the violation**
85
+ 4. **Continue with proper adherence**
86
+
87
+ ---
88
+
89
+ ## 📝 LANGUAGE CHECK
90
+
91
+ **FINAL REMINDER BEFORE RESPONDING:**
92
+
93
+ ```
94
+ if (responseLanguage !== "Korean") {
95
+ STOP();
96
+ translateToKorean();
97
+ respond();
98
+ }
99
+ ```
100
+
101
+ **YOUR NEXT RESPONSE MUST BE IN KOREAN.**
102
+ **다음 응답은 반드시 한국어로 작성하세요.**
103
+
104
+ ---
105
+
106
+ # REMEMBER: 한국어로 응답하기!