Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
6264c1a
setting(DEVING-26): jest, rlt lib μ„€μΉ˜ 및jest μ„€μ •νŒŒμΌ μΆ”κ°€
lee1nna Feb 10, 2025
c9de8ae
setting(DEVING-26): jest.setup.ts 파일 생성 ν›„ rtl jest-dom μΆ”κ°€
lee1nna Feb 10, 2025
033d854
setting(DEVING-26): @types/jest μ„€μΉ˜ 및 jest νƒ€μž…μ •μ˜ μΆ”κ°€
lee1nna Feb 10, 2025
e3ca4d8
setting(DEVING-26): tsconfig 별칭 경둜 μ„€μ •, jest moduleNameMapper μ„€μ • μΆ”κ°€
lee1nna Feb 10, 2025
d18dbe6
setting(DEVING-26): ν…ŒμŠ€νŠΈ μ½”λ“œ μΆ”κ°€
lee1nna Feb 10, 2025
b3b7b68
setting(DEVING-27): postcss.config.mjs -> postcss.config.js 둜 λ³€κ²½
lee1nna Feb 10, 2025
3d2c525
chore(DEVING-27): husky/pre-commit μ‹€ν–‰ κΆŒν•œ λΆ€μ—¬
lee1nna Feb 10, 2025
a4f7797
docs(DEVING-27): PR ν…œν”Œλ¦Ώ λ³€κ²½
lee1nna Feb 10, 2025
3f991c8
fix(DEVING-27): page.tsx lint, prettier 적용
lee1nna Feb 10, 2025
c1276bc
fix(DEVING-26): tailwindcss μ•ˆλ¨ΉνžˆλŠ” ν˜„μƒ μˆ˜μ •
lee1nna Feb 11, 2025
483bfbe
fix(DEVING-26): λΉŒλ“œ μ—λŸ¬ μˆ˜μ •
lee1nna Feb 11, 2025
22ff163
docs(DEVING-26): pr ν…œν”Œλ¦Ώ λ‚΄μš© μˆ˜μ •
lee1nna Feb 11, 2025
7eb4f72
chore(DEVING-26): autoprefixer μ„€μΉ˜
lee1nna Feb 11, 2025
835b27a
Merge pull request #3 from MoimService/feat/setting/jest-rtl/DEVING-26
lee1nna Feb 11, 2025
e18c922
Merge branch 'feat/setting/DEVING-8' into feat/setting/folder-structu…
lee1nna Feb 11, 2025
daa69b6
fix(DEVING-27): package-lock.json merge conflict ν•΄κ²°
lee1nna Feb 11, 2025
ffe8e38
feat[DEVING-31]/eslintμž¬μ„€μ • 및 tsλ‹€μš΄κ·Έλ ˆμ΄λ“œ
clyde-yoonjae Feb 11, 2025
6242610
feat[DEVING-31]/endofline-lf둜 λͺ¨λ“ νŒŒμΌ μˆ˜μ •
clyde-yoonjae Feb 11, 2025
d5b6cff
feat[DEVING-31]/workflow에 라벨과 pr-checkμΆ”κ°€
clyde-yoonjae Feb 11, 2025
b8ab784
chore[DEVING-31]/workflow μ—λŸ¬μˆ˜μ •
clyde-yoonjae Feb 11, 2025
f80da4b
chore[DEVING-31]/workflow-checkerλ¦¬ν¬νŒ… κ°œμ„  및 μ‹€νŒ¨ ν…ŒμŠ€νŠΈ μ‚­μ œ
clyde-yoonjae Feb 11, 2025
f215716
chore(DEVING-14): TailwindCSS μ»€μŠ€ν…€ 색상 μ •μ˜
dbswl701 Feb 11, 2025
e67ca79
chore(DEVING-14): TailwindCSS μ»€μŠ€ν…€ 색상 μ •μ˜
dbswl701 Feb 11, 2025
27b984d
chore: coderabbit μ„ΈνŒ…
dbswl701 Feb 11, 2025
fda085c
chore: coderabbit μ„ΈνŒ…
dbswl701 Feb 11, 2025
ba850b9
chore: coderabbit λͺ¨λ“  λΈŒλžœμΉ˜μ— μ μš©λ˜λ„λ‘ μˆ˜μ •
dbswl701 Feb 11, 2025
476c736
chore(DEVING-30): codecovλ₯Ό μœ„ν•œ 컀버리지 μ˜΅μ…˜ μΆ”κ°€
dbswl701 Feb 11, 2025
40ab350
chore(DEVING-31): pr-check에 codecovμΆ”κ°€
clyde-yoonjae Feb 13, 2025
9152f63
chore(DEVING-27): 폴더ꡬ쑰 섀계 및 각 폴더별 μ—­ν•  README μ •μ˜
lee1nna Feb 13, 2025
036a9fd
fix(DEVING-27): globals.css 파일 경둜 μˆ˜μ •
lee1nna Feb 13, 2025
6cb5c11
Merge pull request #4 from MoimService/feat/setting/codecov-coderabbi…
dbswl701 Feb 13, 2025
baf3461
chore(DEVING-27): service 폴더 λ”°λ‘œ 뢄리
lee1nna Feb 13, 2025
ade5f7d
chore(DEVING-31): pr-labeler μ»¨λ²€μ…˜μˆ˜μ •
clyde-yoonjae Feb 13, 2025
2d7c5ca
Merge pull request #5 from MoimService/feat/setting/eslint-setting/DE…
clyde-yoonjae Feb 13, 2025
b16c25b
Merge branch 'feat/setting/DEVING-8' into feat/setting/tailwind-confi…
dbswl701 Feb 13, 2025
a463269
Merge pull request #6 from MoimService/feat/setting/tailwind-config/D…
dbswl701 Feb 13, 2025
12ed3ab
Merge branch 'feat/setting/DEVING-8' into feat/setting/folder-structu…
lee1nna Feb 13, 2025
dbd594e
Merge pull request #7 from MoimService/feat/setting/folder-structure/…
lee1nna Feb 13, 2025
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
15 changes: 15 additions & 0 deletions .coderabbit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
language: 'ko-KR'
early_access: false
reviews:
profile: 'chill'
request_changes_workflow: false
high_level_summary: true
poem: false
allowed_branches: ['*']
review_status: true
collapse_walkthrough: false
auto_review:
enabled: true
drafts: false
chat:
auto_reply: true
33 changes: 10 additions & 23 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -1,32 +1,19 @@
# 🎯 PR λ‚΄μš©
## πŸ“Β μ£Όμš” μž‘μ—… λ‚΄μš©

ex) 본인이 μž‘μ„±ν•œ λ‚΄μš©μ— λŒ€ν•œ 상세 μ„€λͺ…

## μž‘μ—… λ‚΄μš©
<!-- μž‘μ—… λ‚΄μš©μ„ μƒμ„Ένžˆ μ„€λͺ…ν•΄μ£Όμ„Έμš” -->
## πŸ“ΊΒ μŠ€ν¬λ¦°μƒ·

(선택사항)

## μŠ€ν¬λ¦°μƒ·
## πŸ”— μ°Έκ³  사항

ex) μ˜λ…Όν•  점, 리뷰어가 μ•Œ ν•„μš”κ°€ μžˆλŠ” μΆ”κ°€ μ •λ³΄λ‚˜ λ¬Έμ„œ, μ°Έκ³  링크λ₯Ό 포함.

### μž‘μ—… κ²°κ³Όλ¬Ό
<!-- μ‹€μ œ κ΅¬ν˜„ 화면을 μΊ‘μ³ν•΄μ£Όμ„Έμš” -->
## πŸ’¬Β λ¦¬λ·° μš”κ΅¬μ‚¬ν•­

ex) μ€‘μ μ μœΌλ‘œ λ¦¬λ·°ν•΄μ€¬μœΌλ©΄ ν•˜λŠ” λΆ€λΆ„

### κ΄€λ ¨ 이슈
<!-- JIRA 이슈의 μŠ€ν¬λ¦°μƒ·μ„ μ²¨λΆ€ν•΄μ£Όμ„Έμš” -->
## πŸ“ƒΒ κ΄€λ ¨ 이슈


## βœ… PR 포인트


### 리뷰어 참고사항
<!-- 리뷰어가 μ°Έκ³ ν•΄μ•Ό ν•  λ‚΄μš©μ„ μž‘μ„±ν•΄μ£Όμ„Έμš” -->
-

### 쀑점 리뷰 μš”μ†Œ
<!-- μ€‘μ μ μœΌλ‘œ 리뷰받고 싢은 뢀뢄을 μž‘μ„±ν•΄μ£Όμ„Έμš” -->
-

## πŸ” κ΄€λ ¨ 이슈
<!-- μ—°κ²°λœ 이슈 번호λ₯Ό μž‘μ„±ν•΄μ£Όμ„Έμš” -->
close #
ex) #이슈 번호
90 changes: 90 additions & 0 deletions .github/workflows/pr-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
name: PR Check

permissions:
contents: read
pull-requests: write

on:
pull_request:
types: [opened, synchronize, reopened]

jobs:
check:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue

GitHub Actions 버전 μ—…λ°μ΄νŠΈκ°€ ν•„μš”ν•©λ‹ˆλ‹€.

μ—¬λŸ¬ GitHub Actions의 버전이 μ˜€λž˜λ˜μ—ˆμŠ΅λ‹ˆλ‹€. μ΅œμ‹  λ²„μ „μœΌλ‘œ μ—…λ°μ΄νŠΈκ°€ ν•„μš”ν•©λ‹ˆλ‹€.

λ‹€μŒκ³Ό 같이 μˆ˜μ •ν•΄μ£Όμ„Έμš”:

-      - uses: actions/checkout@v3
+      - uses: actions/checkout@v4
-        uses: actions/setup-node@v3
+        uses: actions/setup-node@v4
-        uses: codecov/codecov-action@v3
+        uses: codecov/codecov-action@v4
-        uses: actions/github-script@v6
+        uses: actions/github-script@v7

Also applies to: 19-19, 49-49, 60-60

🧰 Tools
πŸͺ› actionlint (1.7.4)

16-16: the runner of "actions/checkout@v3" action is too old to run on GitHub Actions. update the action's version to fix this issue

(action)


- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: '18'
cache: 'npm'

- name: Install dependencies
id: install
run: npm ci

- name: Lint check
id: lint
continue-on-error: true
run: npm run lint:fix

- name: Format check
id: format
continue-on-error: true
run: npm run format

- name: Type check
id: typecheck
continue-on-error: true
run: npx tsc --noEmit

- name: Run tests
id: test
continue-on-error: true
run: npm run test

- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}

- name: Build check
id: build
continue-on-error: true
run: npm run build

- name: Report Status
if: always()
uses: actions/github-script@v6
with:
script: |
const steps = {
lint: '${{ steps.lint.outcome }}',
format: '${{ steps.format.outcome }}',
typecheck: '${{ steps.typecheck.outcome }}',
test: '${{ steps.test.outcome }}',
build: '${{ steps.build.outcome }}'
};

const emoji = (status) => status === 'success' ? 'βœ…' : '❌';

const body = `## CI Status Report\n\n` +
`### 검사 κ²°κ³Ό\n` +
`- Lint: ${emoji(steps.lint)} ${steps.lint}\n` +
`- Format: ${emoji(steps.format)} ${steps.format}\n` +
`- Type Check: ${emoji(steps.typecheck)} ${steps.typecheck}\n` +
`- Tests: ${emoji(steps.test)} ${steps.test}\n` +
`- Build: ${emoji(steps.build)} ${steps.build}\n\n` +
`${Object.values(steps).every(s => s === 'success') ? 'βœ… λͺ¨λ“  검사가 ν†΅κ³Όλ˜μ—ˆμŠ΅λ‹ˆλ‹€.' : '❌ 일뢀 검사가 μ‹€νŒ¨ν–ˆμŠ΅λ‹ˆλ‹€.'}`;

await github.rest.issues.createComment({
...context.repo,
issue_number: context.issue.number,
body: body
});

if (Object.values(steps).some(s => s === 'failure')) {
core.setFailed('Some checks failed');
}
73 changes: 73 additions & 0 deletions .github/workflows/pr-labeler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
name: PR Labeler

permissions:
contents: read
pull-requests: write

on:
pull_request:
types: [opened, edited]

jobs:
label:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue

GitHub Actions 버전 μ—…λ°μ΄νŠΈκ°€ ν•„μš”ν•©λ‹ˆλ‹€.

ν˜„μž¬ μ‚¬μš© 쀑인 GitHub Actions 버전이 μ˜€λž˜λ˜μ—ˆμŠ΅λ‹ˆλ‹€. μ΅œμ‹  λ²„μ „μœΌλ‘œ μ—…λ°μ΄νŠΈκ°€ ν•„μš”ν•©λ‹ˆλ‹€.

λ‹€μŒκ³Ό 같이 μˆ˜μ •ν•΄μ£Όμ„Έμš”:

-      - uses: actions/checkout@v3
+      - uses: actions/checkout@v4
-        uses: actions/github-script@v6
+        uses: actions/github-script@v7

Also applies to: 18-18

🧰 Tools
πŸͺ› actionlint (1.7.4)

15-15: the runner of "actions/checkout@v3" action is too old to run on GitHub Actions. update the action's version to fix this issue

(action)


- name: Label PR based on commit messages
uses: actions/github-script@v6
with:
script: |
try {
const { data: commits } = await github.rest.pulls.listCommits({
...context.repo,
pull_number: context.issue.number
});

const labels = new Set();
commits.forEach(commit => {
const msg = commit.commit.message;
// Using regex to match your commit convention: type(issue) message
const typeMatch = msg.match(/^(feat|fix|style|refactor|test|docs|chore|setting)\(/i);

if (typeMatch) {
const type = typeMatch[1].toLowerCase();
switch (type) {
case 'feat':
labels.add('✨ feat');
break;
case 'fix':
labels.add('πŸ› fix');
break;
case 'style':
labels.add('πŸ’„ style');
break;
case 'refactor':
labels.add('♻️ refactor');
break;
case 'test':
labels.add('βœ… test');
break;
case 'docs':
labels.add('πŸ“ docs');
break;
case 'chore':
labels.add('πŸ”§ chore');
break;
case 'setting':
labels.add('βš™οΈ setting');
break;
}
}
});

if (labels.size > 0) {
await github.rest.issues.addLabels({
...context.repo,
issue_number: context.issue.number,
labels: Array.from(labels)
});
}
} catch (error) {
core.setFailed(`Action failed with error: ${error}`);
}
Empty file modified .husky/pre-commit
100644 β†’ 100755
Empty file.
5 changes: 4 additions & 1 deletion .prettierrc
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@
"bracketSpacing": true,
"arrowParens": "always",
"endOfLine": "lf",
"plugins": ["prettier-plugin-tailwindcss"],
"plugins": [
"prettier-plugin-tailwindcss",
"@trivago/prettier-plugin-sort-imports"
],
"importOrder": [
"^@utils/(.*)$",
"^@apis/(.*)$",
Expand Down
5 changes: 5 additions & 0 deletions __tests__/add.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import add from '@/util/add';

test('2+3=5', () => {
expect(add(2, 3)).toBe(5);
});
33 changes: 14 additions & 19 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,17 @@ const compat = new FlatCompat({
recommendedConfig: {},
});

/** @type {import('eslint').Linter.Config[]} */
const eslintConfig = [
{
ignores: ['node_modules/', 'dist/', 'public/'],
ignores: [
'node_modules/',
'dist/',
'public/',
'.next/',
'**/*.js',
'next-env.d.ts',
],
},
...compat.extends(
'eslint:recommended',
Expand All @@ -36,9 +44,7 @@ const eslintConfig = [
parserOptions: {
ecmaVersion: 2023,
sourceType: 'module',
ecmaFeatures: {
jsx: true,
},
ecmaFeatures: { jsx: true },
project: './tsconfig.json',
},
},
Expand All @@ -57,33 +63,22 @@ const eslintConfig = [
],
'@typescript-eslint/no-unused-vars': [
'warn',
{
args: 'after-used',
varsIgnorePattern: '^_',
},
{ args: 'after-used', varsIgnorePattern: '^_' },
],
'jsx-a11y/label-has-associated-control': [
'error',
{
required: { some: ['nesting', 'id'] },
},
{ required: { some: ['nesting', 'id'] } },
],
'no-console': 'warn',
'react-hooks/rules-of-hooks': 'error',
'react-hooks/exhaustive-deps': 'warn',
'react/jsx-no-useless-fragment': 'warn',
},
settings: {
react: {
version: 'detect',
},
},
settings: { react: { version: 'detect' } },
},
{
files: ['*.tsx', '*.jsx'],
rules: {
'@typescript-eslint/no-use-before-define': 'off',
},
rules: { '@typescript-eslint/no-use-before-define': 'off' },
},
];

Expand Down
25 changes: 25 additions & 0 deletions jest.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
// jest.config.ts
import type { Config } from 'jest';
import nextJest from 'next/jest.js';

const createJestConfig = nextJest({
// Provide the path to your Next.js app to load next.config.js and .env files in your test environment
dir: './',
});

// Add any custom config to be passed to Jest
const config: Config = {
coverageProvider: 'v8',
testEnvironment: 'jsdom',
setupFilesAfterEnv: ['<rootDir>/jest.setup.ts'],
moduleNameMapper: {
'^@/app/(.*)$': '<rootDir>/app/$1',
'^@/components/(.*)$': '<rootDir>/components/$1',
'^@/hooks/(.*)$': '<rootDir>/hooks/$1',
'^@/lib/(.*)$': '<rootDir>/lib/$1',
'^@/util/(.*)$': '<rootDir>/util/$1',
},
};

// createJestConfig is exported this way to ensure that next/jest can load the Next.js config which is async
export default createJestConfig(config);
7 changes: 7 additions & 0 deletions jest.setup.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import '@testing-library/jest-dom';

jest.spyOn(console, 'error').mockImplementation((message) => {
if (message.includes('fetchPriority')) {
return;
}
});
Loading