Skip to content

Commit 047b709

Browse files
authored
[Setting] 2025-02-03 프로젝트 초기 세팅 (#8)
* setting: Issue & PR templates, github workflows * setting: tailwind, eslint, prettier 초기세팅 * setting: Tanstack Router 초기 세팅 * refactor: create @tanstack/router 기반 프로젝트에서 create vite 프로젝트로 변경 * refactor: 패키지 재설치 * setting: Typograghy 추가 * setting: CI 워크플로우 파일 추가 * style: 코드 포맷팅 * test: CI 테스트 * test: github actions CI 테스트 * fix: yml, yaml 파일 prettier 제외 * fix: CI tsc 수정
1 parent 7da433b commit 047b709

File tree

20 files changed

+1232
-1335
lines changed

20 files changed

+1232
-1335
lines changed

.github/workflows/pre-production.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,4 @@ jobs:
2929
3030
- name: Clean up
3131
run: |
32-
git remote remove forked-repo
32+
git remote remove forked-repo

apps/admin/README.md

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
# React + TypeScript + Vite
2+
3+
This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.
4+
5+
Currently, two official plugins are available:
6+
7+
- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react/README.md)
8+
uses [Babel](https://babeljs.io/) for Fast Refresh
9+
- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react-swc) uses
10+
[SWC](https://swc.rs/) for Fast Refresh
11+
12+
## Expanding the ESLint configuration
13+
14+
If you are developing a production application, we recommend updating the configuration to enable
15+
type aware lint rules:
16+
17+
- Configure the top-level `parserOptions` property like this:
18+
19+
```js
20+
export default tseslint.config({
21+
languageOptions: {
22+
// other options...
23+
parserOptions: {
24+
project: ['./tsconfig.node.json', './tsconfig.app.json'],
25+
tsconfigRootDir: import.meta.dirname,
26+
},
27+
},
28+
});
29+
```
30+
31+
- Replace `tseslint.configs.recommended` to `tseslint.configs.recommendedTypeChecked` or
32+
`tseslint.configs.strictTypeChecked`
33+
- Optionally add `...tseslint.configs.stylisticTypeChecked`
34+
- Install [eslint-plugin-react](https://github.com/jsx-eslint/eslint-plugin-react) and update the
35+
config:
36+
37+
```js
38+
// eslint.config.js
39+
import react from 'eslint-plugin-react';
40+
41+
export default tseslint.config({
42+
// Set the react version
43+
settings: { react: { version: '18.3' } },
44+
plugins: {
45+
// Add the react plugin
46+
react,
47+
},
48+
rules: {
49+
// other rules...
50+
// Enable its recommended rules
51+
...react.configs.recommended.rules,
52+
...react.configs['jsx-runtime'].rules,
53+
},
54+
});
55+
```

apps/admin/package.json

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -12,18 +12,20 @@
1212
"lint": "eslint ."
1313
},
1414
"dependencies": {
15-
"@tanstack/react-router": "^1.98.3",
16-
"@tanstack/router-devtools": "^1.98.3",
17-
"react": "^19.0.0",
18-
"react-dom": "^19.0.0"
15+
"@tanstack/react-router": "^1.98.4",
16+
"@tanstack/router-devtools": "^1.98.4",
17+
"react": "^18.3.1",
18+
"react-dom": "^18.3.1"
1919
},
2020
"devDependencies": {
21-
"@tanstack/router-plugin": "^1.98.3",
22-
"@types/react": "^19.0.8",
23-
"@types/react-dom": "^19.0.3",
24-
"@vitejs/plugin-react": "^4.3.2",
25-
"eslint": "^9.19.0",
26-
"typescript": "^5.7.3",
27-
"vite": "^6.0.3"
21+
"@tanstack/router-plugin": "^1.98.6",
22+
"@types/react": "^18.3.18",
23+
"@types/react-dom": "^18.3.5",
24+
"@vitejs/plugin-react-swc": "^3.5.0",
25+
"eslint": "^9.17.0",
26+
"globals": "^15.14.0",
27+
"typescript": "~5.6.2",
28+
"typescript-eslint": "^8.18.2",
29+
"vite": "^6.0.5"
2830
}
2931
}

apps/admin/src/routes/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ export const Route = createFileRoute('/')({
77
function HomeComponent() {
88
return (
99
<div className='p-2'>
10-
<h3 className='text-[10rem]'>Welcome Home!</h3>
10+
<h3 className='font-bold-32'>Welcome Home!</h3>
1111
</div>
1212
);
1313
}

apps/admin/src/styles/globals.css

Lines changed: 32 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,37 @@
5353
/* TYPOGRAPHY STYLES */
5454
/* ========================= */
5555
@layer components {
56-
.font-body1_b_11 {
57-
@apply font-pretendard text-[11px] font-bold leading-[145%];
56+
/* Bold font styles */
57+
.font-bold-32 {
58+
@apply font-pretendard text-[32px] font-bold leading-[150%];
59+
}
60+
.font-bold-24 {
61+
@apply font-pretendard text-[24px] font-bold leading-[150%];
62+
}
63+
.font-bold-20 {
64+
@apply font-pretendard text-[20px] font-bold leading-[150%];
65+
}
66+
.font-bold-18 {
67+
@apply font-pretendard text-[18px] font-bold leading-[150%];
68+
}
69+
.font-bold-14 {
70+
@apply font-pretendard text-[14px] font-bold leading-[150%];
71+
}
72+
73+
/* Medium font styles */
74+
.font-medium-24 {
75+
@apply font-pretendard text-[24px] font-medium leading-[150%];
76+
}
77+
.font-medium-18 {
78+
@apply font-pretendard text-[18px] font-medium leading-[150%];
79+
}
80+
.font-medium-16 {
81+
@apply font-pretendard text-[16px] font-medium leading-[150%];
82+
}
83+
.font-medium-14 {
84+
@apply font-pretendard text-[14px] font-medium leading-[150%];
85+
}
86+
.font-medium-12 {
87+
@apply font-pretendard text-[12px] font-medium leading-[150%];
5888
}
5989
}

apps/admin/tsconfig.app.json

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
{
2+
"compilerOptions": {
3+
"composite": true,
4+
"incremental": true,
5+
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo",
6+
"target": "ES2020",
7+
"useDefineForClassFields": true,
8+
"lib": ["ES2020", "DOM", "DOM.Iterable"],
9+
"module": "ESNext",
10+
"skipLibCheck": true,
11+
12+
/* Bundler mode */
13+
"moduleResolution": "bundler",
14+
"allowImportingTsExtensions": true,
15+
"isolatedModules": true,
16+
"moduleDetection": "force",
17+
"noEmit": true,
18+
"jsx": "react-jsx",
19+
20+
/* Linting */
21+
"strict": true,
22+
"noUnusedLocals": true,
23+
"noUnusedParameters": true,
24+
"noFallthroughCasesInSwitch": true
25+
},
26+
"include": ["src"]
27+
}

apps/admin/tsconfig.json

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,4 @@
11
{
2-
"compilerOptions": {
3-
"strict": true,
4-
"esModuleInterop": true,
5-
"jsx": "react-jsx",
6-
"target": "ESNext",
7-
"module": "ESNext",
8-
"moduleResolution": "Bundler",
9-
"skipLibCheck": true
10-
}
2+
"files": [],
3+
"references": [{ "path": "./tsconfig.app.json" }, { "path": "./tsconfig.node.json" }]
114
}

apps/admin/tsconfig.node.json

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{
2+
"compilerOptions": {
3+
"composite": true,
4+
"incremental": true,
5+
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.node.tsbuildinfo",
6+
"target": "ES2022",
7+
"lib": ["ES2023"],
8+
"module": "ESNext",
9+
"skipLibCheck": true,
10+
11+
/* Bundler mode */
12+
"moduleResolution": "bundler",
13+
"allowImportingTsExtensions": true,
14+
"isolatedModules": true,
15+
"moduleDetection": "force",
16+
"noEmit": true,
17+
18+
/* Linting */
19+
"strict": true,
20+
"noUnusedLocals": true,
21+
"noUnusedParameters": true,
22+
"noFallthroughCasesInSwitch": true
23+
},
24+
"include": ["vite.config.ts"]
25+
}

apps/admin/vite.config.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
11
import { defineConfig } from 'vite';
2-
import react from '@vitejs/plugin-react';
2+
import react from '@vitejs/plugin-react-swc';
33
import { TanStackRouterVite } from '@tanstack/router-plugin/vite';
44

55
// https://vitejs.dev/config/
66
export default defineConfig({
7+
build: {
8+
outDir: 'dist',
9+
},
710
plugins: [TanStackRouterVite({}), react()],
811
});

apps/service/tsconfig.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"compilerOptions": {
3+
"composite": true,
34
"target": "ES2017",
45
"lib": ["dom", "dom.iterable", "esnext"],
56
"allowJs": true,

0 commit comments

Comments
 (0)