Skip to content

Commit 225bef6

Browse files
authored
Merge pull request #2 from Team-INSERT/feat/setting
feat : 프로젝트 세팅
2 parents 4adb4f2 + 34c109c commit 225bef6

31 files changed

+2478
-395
lines changed

.babelrc.js

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
module.exports = {
2+
presets: ["next/babel"],
3+
plugins: [
4+
[
5+
"@stylexjs/babel-plugin",
6+
{
7+
dev: process.env.NODE_ENV === "development",
8+
runtimeInjection: false,
9+
genConditionalClasses: true,
10+
treeshakeCompensation: true,
11+
unstable_moduleResolution: {
12+
type: "commonJS",
13+
rootDir: __dirname,
14+
},
15+
},
16+
],
17+
],
18+
};

.editorconfig

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
root = true
2+
3+
[*.tsx]
4+
indent_style = space

.eslintignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
jest.config.js
2+
jest.setup.js
3+
next.config.js
4+
commitlint.config.js

.eslintrc.js

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
module.exports = {
2+
root: true,
3+
parser: "@typescript-eslint/parser",
4+
plugins: ["@typescript-eslint", "prettier"],
5+
parserOptions: {
6+
project: "./tsconfig.json",
7+
},
8+
env: {
9+
node: true,
10+
},
11+
extends: [
12+
"next/core-web-vitals",
13+
"plugin:@typescript-eslint/recommended",
14+
"airbnb",
15+
"airbnb-typescript",
16+
"plugin:prettier/recommended",
17+
],
18+
rules: {
19+
"import/extensions": [
20+
"error",
21+
"ignorePackages",
22+
{
23+
js: "never",
24+
jsx: "never",
25+
ts: "never",
26+
tsx: "never",
27+
},
28+
],
29+
// 'React' must be in scope when using JSX 에러 지우기(Next.js)
30+
"react/react-in-jsx-scope": "off",
31+
"react/jsx-no-useless-fragment": 0,
32+
"react/button-has-type": 0,
33+
// ts파일에서 tsx구문 허용(Next.js)
34+
"@typescript-eslint/no-use-before-define": "off",
35+
"react/jsx-filename-extension": [1, { extensions: [".ts", ".tsx"] }], // should add ".ts" if typescript project
36+
"no-unused-vars": "off",
37+
"no-param-reassign": "off",
38+
"react/function-component-definition": [
39+
2,
40+
{ namedComponents: ["arrow-function", "function-declaration"] },
41+
],
42+
"@typescript-eslint/no-unused-vars": "warn",
43+
"jsx-a11y/click-events-have-key-events": 0,
44+
"jsx-a11y/no-static-element-interactions": 0,
45+
"import/no-cycle": 0,
46+
"react/require-default-props": 0,
47+
"react/jsx-props-no-spreading": 0,
48+
"no-empty-interface": 0,
49+
"import/prefer-default-export": "off",
50+
"jsx-a11y/label-has-associated-control": [
51+
2,
52+
{
53+
labelAttributes: ["htmlFor"],
54+
},
55+
],
56+
"react/no-array-index-key": 0,
57+
"consistent-return": 0,
58+
"react-hooks/exhaustive-deps": "off",
59+
},
60+
};

.github/CODE_OF_CONDUCT.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
Contributor Covenant Code of Conduct
2+
Our Pledge
3+
4+
In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.
5+
Our Standards
6+
7+
Examples of behavior that contributes to creating a positive environment include:
8+
9+
Using welcoming and inclusive language
10+
Being respectful of differing viewpoints and experiences
11+
Gracefully accepting constructive criticism
12+
Focusing on what is best for the community
13+
Showing empathy towards other community members
14+
15+
Examples of unacceptable behavior by participants include:
16+
17+
The use of sexualized language or imagery and unwelcome sexual attention or advances
18+
Trolling, insulting/derogatory comments, and personal or political attacks
19+
Public or private harassment
20+
Publishing others' private information, such as a physical or electronic address, without explicit permission
21+
Other conduct which could reasonably be considered inappropriate in a professional setting
22+
23+
Our Responsibilities
24+
25+
Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.
26+
27+
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.
28+
Scope
29+
30+
This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.
31+
Enforcement
32+
33+
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at team-insert@gmail.com. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
34+
35+
Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.
36+
Attribution
37+
38+
This Code of Conduct is adapted from the Contributor Covenant, version 1.4, available at http://contributor-covenant.org/version/1/4

.github/CONTRIBUTING.md

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
# 부마위키에 기여하기
2+
3+
우리는 커뮤니티의 모든 사람의 기여를 환영합니다.<br/>
4+
이 레포지토리는 다양한 나라의 언어로 이루어지며, 한국어를 중심으로 이루어집니다.
5+
6+
> BSM의 모든 기여자는 우리의 행동 강령을 준수해야 합니다.
7+
> <br/>어떤 행동이 허용되고 허용되지 않는지 이해하려면 [전체 내용](./CODE_OF_CONDUCT.md)를 읽어보시기 바랍니다 .
8+
9+
## 1. 이슈
10+
11+
다음을 통해 BSM에 기여할 수 있습니다 :
12+
13+
- [버그 신고하기](https://github.com/Team-INSERT/bssm-frontend/issues/new/choose)
14+
- [새로운 기능 요청](https://github.com/Team-INSERT/bssm-frontend/issues/issues/new/choose)
15+
- [이미 있는 이슈를 보고](https://github.com/Team-INSERT/bssm-frontend/issues/issues) 수정해야 할 사항을 확인하세요.
16+
17+
## 2. Pull Requests
18+
19+
> [PR 시작하기](https://github.com/Team-INSERT/bssm-frontend/compare) <br/>
20+
21+
나만의 PR을 올릴 수 있습니다. PR 제목은 다음 형식과 일치해야 합니다.
22+
23+
```
24+
<commit keyword>(template scope): <description>
25+
26+
ex) feat(calendar): 바 형식으로 조회하는 기능 추가
27+
```
28+
29+
> 우리는 모든 PR을 메인에 병합하기 때문에 기록의 커밋 수나 스타일에 신경 쓰지 않습니다.<br/>
30+
> 편안하다고 느끼는 스타일로 자유롭게 커밋해주세요.
31+
32+
### commit keyword
33+
34+
**유형은 다음 중 하나여야 합니다:**
35+
36+
src 내 메인 로직을 포함하는 코드를 수정한 경우 :
37+
38+
- feat - 새로운 기능 추가
39+
- fix - 새로운 기능을 추가하지 않은 수정사항
40+
41+
src 내 메인 로직을 포함하는 코드를 수정하지 않은 경우 :
42+
43+
- test - 테스트 코드를 작성하거나 변경한 경우
44+
45+
그 외 :
46+
47+
- chore - 기타 모든 것 ( 주석 추가 등등... )
48+
49+
### 3. etc
50+
51+
코드를 작성할 때 부마위키가 추구하는 구조 자체를 건드리는 것은 유쾌하지 않습니다.
52+
만약 더욱 가독성이 좋은 디렉터리 구조를 발견하셨다면 이슈로 제보해주세요.

.github/ISSUE_TEMPLATE/bug.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: "Bug"
2+
description: "🤬"
3+
labels: 버그
4+
body:
5+
- type: textarea
6+
attributes:
7+
label: Describe
8+
description: |
9+
버그에 대해서 설명해주세요!
10+
placeholder: |
11+
헤더가 깨지는 버그가 발생해요
12+
13+
- type: textarea
14+
attributes:
15+
label: Additional
16+
description: |
17+
추가로 해주실 말씀이 있나요?
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: "Feature"
2+
description: "추가할 일이 있으신가요? 📗"
3+
body:
4+
- type: textarea
5+
attributes:
6+
label: Describe
7+
description: |
8+
추가할 일에 관한 설명
9+
placeholder: |
10+
요구사항을 작성해주세요
11+
12+
- type: textarea
13+
attributes:
14+
label: Work
15+
description: |
16+
[작업내용] 무슨 작업을 하셨나요?
17+
placeholder: |
18+
~~이런 작업을 했습니다.
19+
20+
- type: textarea
21+
attributes:
22+
label: Additional
23+
description: |
24+
추가로 해주실 말씀이 있나요?

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
## Issue Number
2+
3+
## What
4+
5+
## Why
6+
7+
## How
8+
9+
## ScreenShot

.github/workflows/lint.yaml

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
name: lint
2+
3+
on:
4+
pull_request:
5+
branches: [main]
6+
7+
jobs:
8+
build:
9+
runs-on: ubuntu-latest
10+
11+
strategy:
12+
matrix:
13+
node-version: [18.x]
14+
env:
15+
# NEXT_PUBLIC_BASE_URL: ${{ secrets.NEXT_PUBLIC_BASE_URL }}
16+
# NEXT_PUBLIC_FILE_SERVER_URL: ${{ secrets.NEXT_PUBLIC_FILE_SERVER_URL }}
17+
# NEXT_PUBLIC_TEST_DOMAIN_KEYWORD: ${{ secrets.NEXT_PUBLIC_TEST_DOMAIN_KEYWORD }}
18+
# NEXT_PUBLIC_MAIN_DOMAIN_KEYWORD: ${{ secrets.NEXT_PUBLIC_MAIN_DOMAIN_KEYWORD }}
19+
# NEXT_PUBLIC_DOMAIN: ${{ secrets.NEXT_PUBLIC_DOMAIN }}
20+
# NEXT_PUBLIC_TEST_DOMAIN: ${{ secrets.NEXT_PUBLIC_TEST_DOMAIN }}
21+
# NEXT_PUBLIC_AUTH_DOMAIN: ${{ secrets.NEXT_PUBLIC_AUTH_DOMAIN }}
22+
# NEXT_PUBLIC_OAUTH_URL: ${{ secrets.NEXT_PUBLIC_OAUTH_URL }}
23+
# NEXT_PUBLIC_GA_TRACKING_ID: ${{ secrets.NEXT_PUBLIC_GA_TRACKING_ID }}
24+
# NEXT_PUBLIC_BANNER_BASE_PATH: ${{ secrets.NEXT_PUBLIC_BANNER_BASE_PATH }}
25+
# NEXT_PUBLIC_DEFAULT_BACKGROUND_IMAGE_URL: ${{ secrets.NEXT_PUBLIC_DEFAULT_BACKGROUND_IMAGE_URL }}
26+
# NEXT_PUBLIC_DEFAULT_USER_IMAGE: ${{ secrets.NEXT_PUBLIC_DEFAULT_USER_IMAGE }}
27+
# NEXT_PUBLIC_USER_IMAGE_URL: ${{ secrets.NEXT_PUBLIC_USER_IMAGE_URL }}
28+
29+
steps:
30+
- uses: actions/checkout@v3
31+
- name: Use Node.js ${{ matrix.node-version }}
32+
uses: actions/setup-node@v3
33+
with:
34+
node-version: ${{ matrix.node-version }}
35+
cache: pnpm install
36+
37+
- name: create env file
38+
run: |
39+
touch .env
40+
41+
- run: pnpm
42+
- run: pnpm build
43+
- run: pnpm lint
44+
# echo NEXT_PUBLIC_BASE_URL=${{ secrets.NEXT_PUBLIC_BASE_URL }} >> .env
45+
# echo NEXT_PUBLIC_BASE_URL=${{ secrets.NEXT_PUBLIC_BASE_URL }} >> .env
46+
# echo NEXT_PUBLIC_FILE_SERVER_URL=${{ secrets.NEXT_PUBLIC_FILE_SERVER_URL }} >> .env
47+
# echo NEXT_PUBLIC_TEST_DOMAIN_KEYWORD=${{ secrets.NEXT_PUBLIC_TEST_DOMAIN_KEYWORD }} >> .env
48+
# echo NEXT_PUBLIC_MAIN_DOMAIN_KEYWORD=${{ secrets.NEXT_PUBLIC_MAIN_DOMAIN_KEYWORD }} >> .env
49+
# echo NEXT_PUBLIC_DOMAIN=${{ secrets.NEXT_PUBLIC_DOMAIN }} >> .env
50+
# echo NEXT_PUBLIC_TEST_DOMAIN=${{ secrets.NEXT_PUBLIC_TEST_DOMAIN }} >> .env
51+
# echo NEXT_PUBLIC_AUTH_DOMAIN=${{ secrets.NEXT_PUBLIC_AUTH_DOMAIN }} >> .env
52+
# echo NEXT_PUBLIC_OAUTH_URL=${{ secrets.NEXT_PUBLIC_OAUTH_URL }} >> .env
53+
# echo NEXT_PUBLIC_GA_TRACKING_ID=${{ secrets.NEXT_PUBLIC_GA_TRACKING_ID }} >> .env
54+
# echo NEXT_PUBLIC_BANNER_BASE_PATH=${{ secrets.NEXT_PUBLIC_BANNER_BASE_PATH }} >> .env
55+
# echo NEXT_PUBLIC_DEFAULT_BACKGROUND_IMAGE_URL=${{ secrets.NEXT_PUBLIC_DEFAULT_BACKGROUND_IMAGE_URL }} >> .env
56+
# echo NEXT_PUBLIC_DEFAULT_USER_IMAGE=${{ secrets.NEXT_PUBLIC_DEFAULT_USER_IMAGE }} >> .env
57+
# echo NEXT_PUBLIC_USER_IMAGE_URL=${{ secrets.NEXT_PUBLIC_USER_IMAGE_URL }} >> .env

0 commit comments

Comments
 (0)