Skip to content
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

Initial Commit #1

Merged
merged 4 commits into from
Jul 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
3 changes: 3 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
*.js
*.cjs
*.mjs
49 changes: 49 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@


module.exports = {
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaVersion: 2020,
sourceType: 'module',
ecmaFeatures: {
jsx: true,
},
project: './tsconfig.json',
},
extends: [
'eslint:recommended',
"plugin:@tanstack/eslint-plugin-query/recommended",
'plugin:react/recommended',
'plugin:react-hooks/recommended',
'plugin:@typescript-eslint/recommended',
'airbnb',
'airbnb/hooks',
'airbnb-typescript',
'plugin:jsx-a11y/recommended',
'next/core-web-vitals',
'prettier',
],
plugins: [
'react',
'react-hooks',
'@typescript-eslint',
'jsx-a11y',
'import',
'prettier',
],
rules: {
'prettier/prettier': 'error',
'react/react-in-jsx-scope': 'off', // Next.js doesn't require React to be in scope
'react/prop-types': 'off',
'no-console':'error',
"react/jsx-props-no-spreading":'off'
},
settings: {
react: {
version: 'detect',
},
'import/resolver': {
typescript: {},
},
},
};
22 changes: 22 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
## :bookmark: Issue Ticket
<!-- Issue Ticket이 있을 경우, 해당 링크를 연결해주세요 -->
[Ticket](https://trello.com/)

## :writing_hand: Description
<!-- 어떤 내용의 PR인지 간단하게 작성해주세요. (ex. 메인 페이지 레이아웃 작업) -->

## :white_check_mark: Checklist
### PR
<!-- 작성중인 PR인 경우, Draft 모드로 생성해주세요. -->
- [ ] Branch Convention 확인
> `epic/` 에픽, `feat/` 피쳐, `fix/` 버그 수정, `refactor/` 개선
- [ ] Base Branch 확인
- [ ] 적절한 Label 지정
- [ ] Assignee 및 Reviewer 지정

### Test
- [ ] 로컬 작동 확인

### Additional Notes
<!-- 추가 사항이 있을 경우, Todo list를 작성해주세요. -->
- [ ] (없음)
44 changes: 44 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Continuous Integration

on:
workflow_dispatch:
pull_request:
types: [opened, synchronize]
branches:
- main
- master
- develop
- feat/*
- hotfix/*
- epic/*
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

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

- name: Cache dependencies
id: cache
uses: actions/cache@v3
with:
path: '**/node_modules'
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-

- name: Install Dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: npm ci

- name: Build test
run: npm run build



56 changes: 56 additions & 0 deletions .github/workflows/setup-label.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: Setup Labels

on:
workflow_dispatch:

jobs:
setup-labels:
runs-on: ubuntu-latest
steps:
- name: Setup Default Labels
uses: actions/github-script@v5
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const labels = [
{ name: "Priority: High 🔥", description: '우선순위 높음', color: "F9D0C4" },
{ name: "Priority: Low 🐢", description: '우선순위 낮음', color: "C2E0C6" },
{ name: "Priority: Medium :bookmark:", description: '우선순위 보통', color: "FEF2C0" },
{ name: "Type: Doc :memo:", description: '문서 추가 / 수정', color: "0075ca" },
{ name: "Type: Bug :bug:", description: '버그', color: "d73a4a" },
{ name: "Type: Epic :rocket:", description: '큰 단위의 브랜치', color: "051C35" },
{ name: "Type: Feature :sparkles:", description: '신규 기능', color: "AB5D19" },
{ name: "Type: Improve UX :arrow_up:", description: 'UX 개선', color: "2CE151" },
{ name: "Type: Merge :truck:", description: '머지', color: "4A7A8F" },
{ name: "Type: Refactor :recycle:", description: '리팩토링', color: "027B6B" },
];

// 존재하는 모든 레이블 나열
const listResponse = await github.rest.issues.listLabelsForRepo({
owner: context.repo.owner,
repo: context.repo.repo,
});

// 나열된 각 레이블에 대해 삭제 요청
for (const label of listResponse.data) {
await github.rest.issues.deleteLabel({
owner: context.repo.owner,
repo: context.repo.repo,
name: label.name,
});

console.log(`Label '${label.name}' deleted.`);
}

// 새로운 레이블 생성
for (const label of labels) {
const response = await github.rest.issues.createLabel({
owner: context.repo.owner,
repo: context.repo.repo,
name: label.name,
color: label.color,
description: label.description,
});

console.log(`Label ${label.name} processed`, response.status);
}
104 changes: 104 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*
.pnpm-debug.log*

# Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage
*.lcov

# nyc test coverage
.nyc_output

# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules/
jspm_packages/

# Snowpack dependency directory (https://snowpack.dev/)
web_modules/

# TypeScript cache
*.tsbuildinfo

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Optional stylelint cache
.stylelintcache

# Microbundle cache
.rpt2_cache/
.rts2_cache_cjs/
.rts2_cache_es/
.rts2_cache_umd/

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variable files
.env
.env.development.local
.env.test.local
.env.production.local
.env.local


# Next.js build output
.next
out


# Gatsby files
.cache/
# Comment in the public line in if your project uses Gatsby and not Next.js
# https://nextjs.org/blog/next-9-1#public-directory-support
# public




# yarn v2
.yarn/cache
.yarn/unplugged
.yarn/build-state.yml
.yarn/install-state.gz
.pnp.*

.DS_Store
13 changes: 13 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
npm run lint

echo ":truck: finished linting."

current_branch=$(git branch --show-current)

restricted_branches="^(main|master|develop|epic/.+)$"

if [[ $current_branch =~ $restricted_branches ]]; then
echo ":construction: You are on a restricted branch: $current_branch."
echo "Commits to this branch are not allowed via pre-commit hook."
exit 1
fi
10 changes: 10 additions & 0 deletions .husky/pre-push
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
current_branch=$(git branch --show-current)

restricted_branches="^(main|master|develop|epic/.+)$"


if [[ $current_branch =~ $restricted_branches ]]; then
echo ":construction: You are on a restricted branch: $current_branch."
echo "Commits to this branch are not allowed via pre-commit hook."
exit 1
fi
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
engine-strict=true
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v20.14.0
15 changes: 15 additions & 0 deletions .prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
module.exports = {
printWidth: 200,
endOfLine: 'auto',
tabWidth: 2,
useTabs: false,
semi: true,
singleQuote: true,
quoteProps: 'as-needed',
trailingComma: 'all',
bracketSpacing: true,
jsxSingleQuote: true,
jsxBracketSameLine: false,
arrowParens: 'always',
parser: 'typescript',
}
Loading
Loading