Skip to content

Commit

Permalink
Merge branch 'develop' into feature/#21
Browse files Browse the repository at this point in the history
  • Loading branch information
today-is-first authored Nov 19, 2024
2 parents 411bd3c + ff1c95d commit 4d80e4c
Show file tree
Hide file tree
Showing 73 changed files with 1,023 additions and 444 deletions.
160 changes: 81 additions & 79 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,83 +1,85 @@
module.exports = {
root: true,
parser: '@typescript-eslint/parser',
plugins: ['@typescript-eslint'],
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'prettier', // prettier와 통합하여 코드 스타일 적용
root: true,
parser: '@typescript-eslint/parser',
plugins: ['@typescript-eslint'],
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'prettier', // prettier와 통합하여 코드 스타일 적용
],
rules: {
// 일반 함수 사용
'prefer-arrow-callback': 'off',
'func-names': ['error', 'never'],

// PascalCase 규칙 강제
'@typescript-eslint/naming-convention': [
'error',
{
selector: 'default',
format: ['camelCase'],
},
{
selector: 'variable',
format: ['camelCase', 'UPPER_CASE'],
leadingUnderscore: 'allow',
},
{
selector: 'typeLike', // 클래스, 인터페이스, 타입, 컴포넌트
format: ['PascalCase'],
},
{
selector: 'interface',
format: ['PascalCase'],
prefix: ['I'], // 인터페이스 이름에 I를 접두사로 사용
},
],
rules: {
// 일반 함수 사용
'prefer-arrow-callback': 'off',
'func-names': ['error', 'never'],

// PascalCase 규칙 강제
'@typescript-eslint/naming-convention': [
'error',
{
selector: 'default',
format: ['camelCase'],
},
{
selector: 'variable',
format: ['camelCase', 'UPPER_CASE'],
leadingUnderscore: 'allow',
},
{
selector: 'typeLike', // 클래스, 인터페이스, 타입, 컴포넌트
format: ['PascalCase'],
},
{
selector: 'interface',
format: ['PascalCase'],
prefix: ['I'], // 인터페이스 이름에 I를 접두사로 사용
},
],

// 함수명은 동사+명사 조합으로 작성, 카멜케이스 강제
'camelcase': ['error', { properties: 'never', ignoreDestructuring: false }],
'func-names': 'off', // 함수명 강제 규칙, 예: handleEvent

// Named Exports 강제
'import/prefer-default-export': 'off',

// const 기본 사용, let은 변경 시만 사용
'prefer-const': 'error',
'no-var': 'error',

// 고차 함수 사용 지향
'array-callback-return': 'error',
'no-unused-expressions': ['error', { allowShortCircuit: true }],
'no-restricted-syntax': [
'error',
{
selector: 'ForInStatement',
message: 'for...in loops are not allowed. Use Object.keys or other utilities.',
},
{
selector: 'ForOfStatement',
message: 'for...of loops are not allowed. Use array methods instead.',
},
],

// Boolean 타입 접두사 is 사용
'@typescript-eslint/explicit-function-return-type': [
'error',
{
allowExpressions: true,
allowTypedFunctionExpressions: true,
},
],

// Enum 사용 지향
'@typescript-eslint/no-shadow': ['error', { ignoreTypeValueShadow: true }],
'no-shadow': 'off',
},
settings: {
'import/resolver': {
typescript: {},

// 함수명은 동사+명사 조합으로 작성, 카멜케이스 강제
camelcase: ['error', { properties: 'never', ignoreDestructuring: false }],
'func-names': 'off', // 함수명 강제 규칙, 예: handleEvent

// Named Exports 강제
'import/prefer-default-export': 'off',

// const 기본 사용, let은 변경 시만 사용
'prefer-const': 'error',
'no-var': 'error',

// 고차 함수 사용 지향
'array-callback-return': 'error',
'no-unused-expressions': ['error', { allowShortCircuit: true }],
'no-restricted-syntax': [
'error',
{
selector: 'ForInStatement',
message: 'for...in loops are not allowed. Use Object.keys or other utilities.',
},
{
selector: 'ForOfStatement',
message: 'for...of loops are not allowed. Use array methods instead.',
},
],

// Boolean 타입 접두사 is 사용
'@typescript-eslint/explicit-function-return-type': [
'error',
{
allowExpressions: true,
allowTypedFunctionExpressions: true,
},
],

// Enum 사용 지향
'@typescript-eslint/no-shadow': ['error', { ignoreTypeValueShadow: true }],
'no-shadow': 'off',

'@typescript-eslint/no-unused-vars': 'off',
'react-hooks/exhaustive-deps': 'warn',
},
settings: {
'import/resolver': {
typescript: {},
},
};
},
};
70 changes: 70 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
name: CI

on:
pull_request:
branches:
- develop
- feature/*
push:
branches:
- develop
- feature/*

jobs:
frontend:
name: Frontend CI
runs-on: ubuntu-latest
steps:
- name: 코드 체크아웃
uses: actions/checkout@v3

- name: Node.js 설정
uses: actions/setup-node@v3
with:
node-version: 18
cache: 'yarn'

- name: 의존성 설치
run: yarn install
working-directory: packages/frontend

- name: Lint 검사
run: yarn lint
working-directory: packages/frontend

- name: Prettier 체크 및 수정
run: yarn prettier --write .
working-directory: packages/frontend

- name: 빌드
run: yarn build
working-directory: packages/frontend

backend:
name: Backend CI
runs-on: ubuntu-latest
steps:
- name: 코드 체크아웃
uses: actions/checkout@v3

- name: Node.js 설정
uses: actions/setup-node@v3
with:
node-version: 18
cache: 'yarn'

- name: 의존성 설치
run: yarn install
working-directory: packages/backend/gameserver

- name: Lint 검사
run: yarn lint
working-directory: packages/backend/gameserver

- name: Prettier 체크 및 수정
run: yarn prettier --write .
working-directory: packages/backend/gameserver

- name: 빌드
run: yarn build
working-directory: packages/backend/gameserver
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,4 @@
!.yarn/sdks
!.yarn/versions

/dist
.env
.env
32 changes: 21 additions & 11 deletions .pnp.cjs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed .yarn/cache/fsevents-patch-6b67494872-10c0.zip
Binary file not shown.
1 change: 1 addition & 0 deletions packages/backend/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
dist/
1 change: 1 addition & 0 deletions packages/backend/gameserver/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,6 @@ module.exports = {
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/explicit-module-boundary-types': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-unused-vars': 'off',
},
};
6 changes: 0 additions & 6 deletions packages/backend/gameserver/dist/app.controller.d.ts

This file was deleted.

Loading

0 comments on commit 4d80e4c

Please sign in to comment.