Skip to content

Commit

Permalink
Merge branch 'dev' into feature/create-list
Browse files Browse the repository at this point in the history
  • Loading branch information
Eugene-A-01 authored Feb 3, 2024
2 parents 46d440b + e7e1417 commit 5151072
Show file tree
Hide file tree
Showing 12 changed files with 1,059 additions and 67 deletions.
1 change: 1 addition & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
"prettier" // eslint-config-prettier prettier와 중복된 eslint 규칙 제거
],
"rules": {
"prettier/prettier": ["error", { "endOfLine": "auto" }],
"react/react-in-jsx-scope": "off", // react 17부턴 import 안해도돼서 기능 끔
// 경고표시, 파일 확장자를 .ts나 .tsx 모두 허용함
"react/jsx-filename-extension": ["warn", { "extensions": [".ts", ".tsx"] }],
Expand Down
23 changes: 23 additions & 0 deletions .github/auto_assign.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Set to true to add reviewers to pull requests
addReviewers: true

# Set to true to add assignees to pull requests
addAssignees: author
# addAssignees에서 ‘author’를 선택하면 PR을 open한 user가 assignee로 할당됩니다.

#리뷰어들 아이디 추가
# A list of reviewers to be added to pull requests (GitHub user name)
reviewers:
- Eugene-A-01
- kanglocal
- Nahyun-Kang
- ParkSohyunee
- seoyoung-min

# A list of keywords to be skipped the process that add reviewers if pull requests include it
skipKeywords:
- wip

# A number of reviewers added to the pull request
# Set 0 to add all the reviewers (default: 0)
numberOfReviewers: 0
20 changes: 20 additions & 0 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: FrontEnd CI

on:
pull_request:
branches: [main, dev]
# push:
# branches: [main, dev]
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20.11.0

- run: yarn install
- run: yarn build
30 changes: 30 additions & 0 deletions .github/workflows/Dev-CD.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: FrontEnd Dev CD

on:
push:
branches: [ "dev" ]
workflow_dispatch:

jobs:
deploy:
runs-on: ubuntu-latest
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}

steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20.11.0

- run: yarn install
- run: yarn build

- name: S3 and CloudFront Deploy
uses: Reggionick/s3-deploy@v4
with:
folder: .next
bucket: ${{ secrets.DEV_S3_BUCKET_NAME }}
bucket-region: ${{ secrets.AWS_DEFAULT_REGION }}
dist-id: ${{ secrets.DEV_CLOUDFRONT_ID }}
1 change: 1 addition & 0 deletions .husky/_/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*
36 changes: 36 additions & 0 deletions .husky/_/husky.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
#!/usr/bin/env sh
if [ -z "$husky_skip_init" ]; then
debug () {
if [ "$HUSKY_DEBUG" = "1" ]; then
echo "husky (debug) - $1"
fi
}

readonly hook_name="$(basename -- "$0")"
debug "starting $hook_name..."

if [ "$HUSKY" = "0" ]; then
debug "HUSKY env variable is set to 0, skipping hook"
exit 0
fi

if [ -f ~/.huskyrc ]; then
debug "sourcing ~/.huskyrc"
. ~/.huskyrc
fi

readonly husky_skip_init=1
export husky_skip_init
sh -e "$0" "$@"
exitCode="$?"

if [ $exitCode != 0 ]; then
echo "husky - $hook_name hook exited with code $exitCode (error)"
fi

if [ $exitCode = 127 ]; then
echo "husky - command not found in PATH=$PATH"
fi

exit $exitCode
fi
4 changes: 4 additions & 0 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npx --no-install commitlint --edit "$1"
4 changes: 4 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

yarn lint-staged
8 changes: 8 additions & 0 deletions commitlint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
module.exports = {
extends: ['@commitlint/config-conventional'],
rules: {
'type-empty': [2, 'never'], //타입은 비어있을 수 없다.
'type-enum': [2, 'always', ['Chore', 'Feat', 'Fix', 'Refactor', 'Enhance', 'Design', 'Style']], //타입은 다음만 작성할 수 있다.
'type-case': [2, 'always', 'pascal-case'], //타입의 첫글자는 대문자로 시작해야한다.
},
};
26 changes: 23 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,21 @@
"dev": "next dev",
"build": "next build",
"start": "next start",
"lint": "next lint"
"lint": "next lint",
"prepare": "husky install",
"postinstall": "husky install"
},
"lint-staged": {
"*.{ts,tsx}": [
"eslint",
"prettier --list-different"
],
"**/*": "prettier --write --ignore-unknown"
},
"husky": {
"hooks": {
"pre-commit": "lint-staged"
}
},
"dependencies": {
"@tanstack/react-query": "^5.17.12",
Expand All @@ -24,19 +38,25 @@
},
"devDependencies": {
"@svgr/webpack": "^8.1.0",
"@commitlint/cli": "^18.6.0",
"@commitlint/config-conventional": "^18.6.0",
"@testing-library/jest-dom": "^6.2.0",
"@testing-library/react": "^14.1.2",
"@testing-library/react-hooks": "^8.0.1",
"@testing-library/user-event": "^14.5.2",
"@trivago/prettier-plugin-sort-imports": "^4.3.0",
"@types/jest": "^29.5.11",
"@types/node": "^20",
"@types/react": "^18",
"@types/react-dom": "^18",
"eslint": "^8",
"eslint-config-next": "14.0.4",
"husky": "^8.0.3",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-prettier": "^5.1.3",
"husky": "^8.0.0",
"jest": "^29.7.0",
"prettier": "3.2.2",
"lint-staged": "^15.2.1",
"prettier": "^3.2.4",
"typescript": "^5"
}
}
6 changes: 2 additions & 4 deletions src/app/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
"use client";

import React from "react";
import { ReactNode } from "react";
'use client';
import { ReactNode } from 'react';

export default function TempLayout({ children }: { children: ReactNode }) {
return (
Expand Down
Loading

0 comments on commit 5151072

Please sign in to comment.