ci: 규칙을 자동으로 강제하는 검사 추가
지금까지 "커밋 전 lint/test 통과"는 문서상의 약속일 뿐 강제되지 않았다. - CI(GitHub Actions) 추가 — 세 스택의 lint·test·build 와 backend e2e 를 PR 마다 실행. error-codes-sync 잡은 sync 를 재실행한 뒤 git diff 로 생성 파일 드리프트를 검사한다. 레지스트리만 고치고 sync 를 빠뜨리면 클라이언트 사전이 조용히 어긋나기 때문. - lint 스크립트에 --max-warnings 0 적용. 기존에는 경고가 있어도 통과해 "Warning 0" 규칙이 사실상 무의미했다. 자동 수정은 lint:fix 로 분리. - 문서로만 있던 규칙을 린트로 이관: any/dynamic 금지, console/print 금지, Vue 인라인 스타일·Options API 금지, Dart const 누락·await 누락, HttpException 직접 생성 차단(BusinessException 유도). - backend 에 @/ 경로 alias 설정 (tsconfig paths + jest moduleNameMapper). 공통 규칙이 요구하는 절대경로 alias 가 backend 에만 빠져 있었다. - npm audit 취약점 10건 중 9건 해결. 남은 multer(high)는 platform-express v12 가 필요해 Nest v11 생태계와 충돌하고, 파일 업로드 엔드포인트가 없어 도달 경로가 없다 — security.md 에 재검토 조건 기록. - PR 템플릿 추가. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -2,6 +2,7 @@ import pluginVue from 'eslint-plugin-vue'
|
||||
import vueTsEslintConfig from '@vue/eslint-config-typescript'
|
||||
|
||||
// Flat config — Vue 3 + TypeScript 표준 권장 룰
|
||||
// .claude/skills/vue3/SKILL.md 의 규칙 중 기계적으로 강제 가능한 것을 여기에 담는다.
|
||||
export default [
|
||||
...pluginVue.configs['flat/recommended'],
|
||||
...vueTsEslintConfig(),
|
||||
@@ -9,6 +10,25 @@ export default [
|
||||
rules: {
|
||||
// 컴포넌트 단어 수 강제 해제 (HomePage 등 단일 컴포넌트도 허용)
|
||||
'vue/multi-word-component-names': 'off',
|
||||
|
||||
// Composition API + <script setup> 강제 — Options API 금지
|
||||
'vue/component-api-style': ['error', ['script-setup']],
|
||||
|
||||
// 인라인 스타일 금지 → <style scoped> 사용
|
||||
'vue/no-static-inline-styles': ['error', { allowBinding: false }],
|
||||
|
||||
// 콘솔 출력 금지 (운영 빌드에 디버그 로그가 남지 않도록)
|
||||
'no-console': 'error',
|
||||
|
||||
// 명시적 타입 선언 — any 금지
|
||||
'@typescript-eslint/no-explicit-any': 'error',
|
||||
},
|
||||
},
|
||||
{
|
||||
// 생성 파일은 스크립트가 만든 산출물이므로 포맷 규칙 대상에서 제외
|
||||
files: ['src/**/*.generated.ts'],
|
||||
rules: {
|
||||
'@typescript-eslint/no-explicit-any': 'off',
|
||||
},
|
||||
},
|
||||
{
|
||||
|
||||
@@ -10,7 +10,8 @@
|
||||
"test:unit": "vitest",
|
||||
"build-only": "vite build",
|
||||
"type-check": "vue-tsc --build",
|
||||
"lint": "eslint . --fix",
|
||||
"lint": "eslint . --max-warnings 0",
|
||||
"lint:fix": "eslint . --fix",
|
||||
"format": "oxfmt src/"
|
||||
},
|
||||
"dependencies": {
|
||||
|
||||
Reference in New Issue
Block a user