-
Notifications
You must be signed in to change notification settings - Fork 4
feat : ci workflow #332
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat : ci workflow #332
Changes from 18 commits
6e3ce4a
df96024
8a43d97
54b557f
0ab9ad0
7eb263a
c6b520f
7f173ed
97dbc6d
01d4129
d2a8875
8be1041
a4535f3
5f120b0
9262591
cea0e13
ae95133
4e675e8
5cd290f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,134 @@ | ||
| /** | ||
| * ESLint 설정 파일 | ||
| * Next.js + TypeScript 프로젝트용 | ||
| * | ||
| * 주요 설정: | ||
| * - TypeScript 파서 사용 | ||
| * - Next.js 및 TypeScript 권장 규칙 적용 | ||
| * - Prettier와의 충돌 방지 | ||
| */ | ||
| module.exports = { | ||
| root: true, | ||
| parser: "@typescript-eslint/parser", | ||
| parserOptions: { | ||
| ecmaVersion: "latest", | ||
| sourceType: "module", | ||
| project: "./tsconfig.json", | ||
| }, | ||
| env: { | ||
| browser: true, | ||
| es2021: true, | ||
| node: true, | ||
| }, | ||
| plugins: ["@typescript-eslint"], | ||
| extends: [ | ||
| // Next.js 기본 설정 | ||
| "next", | ||
| // Next.js TypeScript 설정 (plugin:@typescript-eslint/recommended 기반) | ||
| "next/typescript", | ||
| // TypeScript ESLint 권장 규칙 | ||
| "plugin:@typescript-eslint/recommended", | ||
| // Prettier와 충돌하는 규칙 비활성화 (항상 마지막에 위치해야 함) | ||
| "prettier", | ||
| ], | ||
| overrides: [ | ||
| { | ||
| // 설정 파일들은 TypeScript 프로젝트에 포함되지 않으므로 project 옵션 비활성화 | ||
| env: { | ||
| node: true, | ||
| }, | ||
| files: [".eslintrc.{js,cjs}", "*.config.{js,mjs,ts}"], | ||
| parserOptions: { | ||
| sourceType: "script", | ||
| project: null, | ||
| }, | ||
| }, | ||
| ], | ||
| rules: { | ||
| // ========================================== | ||
| // React 관련 규칙 | ||
| // ========================================== | ||
|
|
||
| // JSX 사용 시 React import 불필요 (React 17+) | ||
| "react/react-in-jsx-scope": "off", | ||
|
|
||
| // JSX 허용 파일 확장자 | ||
| "react/jsx-filename-extension": [1, { extensions: [".js", ".jsx", ".tsx"] }], | ||
|
|
||
| // defaultProps 필수 여부 비활성화 | ||
| "react/require-default-props": "off", | ||
|
|
||
| // 함수 컴포넌트는 화살표 함수로 정의 | ||
| "react/function-component-definition": [1, { namedComponents: "arrow-function" }], | ||
|
|
||
| // ========================================== | ||
| // Import 관련 규칙 | ||
| // ========================================== | ||
|
|
||
| // import 순서는 Prettier 플러그인에서 처리 | ||
| "import/order": "off", | ||
|
|
||
| // import 시 파일 확장자 생략 (warning으로 설정) | ||
| "import/extensions": "off", | ||
|
|
||
| // 단일 export 시 default export 권장 (warning) | ||
| "import/prefer-default-export": "off", | ||
|
|
||
| // ========================================== | ||
| // 일반 JavaScript 규칙 | ||
| // ========================================== | ||
|
|
||
| // console.log 허용 (개발 편의) | ||
| "no-console": "off", | ||
|
|
||
| // alert 허용 | ||
| "no-alert": "off", | ||
|
|
||
| // 정의 전 사용 허용 (TypeScript에서 처리) | ||
| "no-use-before-define": "off", | ||
|
|
||
| // 미사용 변수 - 기본 규칙 비활성화 (TypeScript 규칙과 충돌 방지) | ||
| "no-unused-vars": "off", | ||
|
|
||
| // ========================================== | ||
| // TypeScript 관련 규칙 | ||
| // ========================================== | ||
|
|
||
| // 미사용 변수 경고 (TypeScript용 - 기본 규칙 대신 사용) | ||
| "@typescript-eslint/no-unused-vars": "warn", | ||
|
|
||
| // any 타입 사용 경고 (error -> warn) | ||
| "@typescript-eslint/no-explicit-any": "warn", | ||
|
|
||
| // any 타입 관련 규칙 (경고로 설정) | ||
| "@typescript-eslint/no-unsafe-assignment": "warn", | ||
| "@typescript-eslint/no-unsafe-member-access": "warn", | ||
| "@typescript-eslint/no-unsafe-return": "warn", | ||
| "@typescript-eslint/no-unsafe-call": "warn", | ||
| "@typescript-eslint/no-unsafe-argument": "warn", | ||
|
|
||
| // ========================================== | ||
| // 접근성 (a11y) 관련 규칙 | ||
| // ========================================== | ||
|
|
||
| // label과 control 연결 규칙 비활성화 | ||
| "jsx-a11y/label-has-associated-control": "off", | ||
|
|
||
| // 클릭 이벤트에 키보드 이벤트 필요 (경고) | ||
| "jsx-a11y/click-events-have-key-events": "warn", | ||
|
|
||
| // 정적 요소에 이벤트 핸들러 (경고) | ||
| "jsx-a11y/no-static-element-interactions": "warn", | ||
| }, | ||
| settings: { | ||
| "import/parsers": { | ||
| "@typescript-eslint/parser": [".ts", ".tsx"], | ||
| }, | ||
| "import/resolver": { | ||
| typescript: { | ||
| alwaysTryTypes: true, | ||
| project: "./tsconfig.json", | ||
| }, | ||
| }, | ||
| }, | ||
| }; | ||
This file was deleted.
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,10 @@ | ||||||||||||||||||||||||||||||||||||||||||||||
| #!/usr/bin/env sh | ||||||||||||||||||||||||||||||||||||||||||||||
| . "$(dirname -- "$0")/_/husky.sh" | ||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||
| echo "🔍 Running lint check before push..." | ||||||||||||||||||||||||||||||||||||||||||||||
| npm run lint | ||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||
| echo "🔍 Running type check before push..." | ||||||||||||||||||||||||||||||||||||||||||||||
| npm run typecheck | ||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||
| echo "✅ All checks passed!" | ||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||
| #!/usr/bin/env sh | |
| . "$(dirname -- "$0")/_/husky.sh" | |
| echo "🔍 Running lint check before push..." | |
| npm run lint | |
| echo "🔍 Running type check before push..." | |
| npm run typecheck | |
| echo "✅ All checks passed!" | |
| #!/usr/bin/env sh | |
| . "$(dirname -- "$0")/_/husky.sh" | |
| set -e | |
| echo "🔍 Running lint check before push..." | |
| npm run lint | |
| echo "🔍 Running type check before push..." | |
| npm run typecheck | |
| echo "✅ All checks passed!" |
🤖 Prompt for AI Agents
In .husky/pre-push around lines 1-10, the script continues even if npm run lint
or npm run typecheck fail and still prints "All checks passed!"; add an
immediate-exit setting (e.g., enable set -e and optionally set -o pipefail) at
the top so the hook aborts on any non-zero exit status, keep the existing
commands as-is (they will cause the script to exit on failure) and leave the
final success echo only reachable when both commands succeed.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,38 @@ | ||
| # Dependencies | ||
| node_modules | ||
|
|
||
| # Build outputs | ||
| .next | ||
| out | ||
| build | ||
| dist | ||
|
|
||
| # Generated files | ||
| *.min.js | ||
| *.min.css | ||
| next-env.d.ts | ||
|
|
||
| # Lock files | ||
| package-lock.json | ||
| yarn.lock | ||
| pnpm-lock.yaml | ||
|
|
||
| # Cache | ||
| .cache | ||
| .turbo | ||
|
|
||
| # Coverage | ||
| coverage | ||
|
|
||
| # Sentry | ||
| .sentryclirc | ||
|
|
||
| # Vercel | ||
| .vercel | ||
|
|
||
| # Environment | ||
| .env* | ||
|
|
||
| # IDE | ||
| .idea | ||
| .vscode |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,11 +1,6 @@ | ||
| module.exports = { | ||
| extends: ['@commitlint/config-conventional'], | ||
| extends: ["@commitlint/config-conventional"], | ||
| rules: { | ||
| 'type-enum': [ | ||
| 2, | ||
| 'always', | ||
| ['feat', 'fix', 'refactor', 'style', 'test', 'docs', 'chore'], | ||
| ], | ||
| "type-enum": [2, "always", ["feat", "fix", "refactor", "style", "test", "docs", "chore"]], | ||
| }, | ||
| }; | ||
|
|
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -18,4 +18,4 @@ | |
| "hooks": "@/hooks" | ||
| }, | ||
| "iconLibrary": "lucide" | ||
| } | ||
| } | ||
Uh oh!
There was an error while loading. Please reload this page.