Skip to content

Initial setting for playground (mfa) #9

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
37 changes: 37 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,39 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# Dependencies
node_modules
.pnp
.pnp.js

# Local env files
.env
.env.local
.env.development.local
.env.test.local
.env.production.local

# Testing
coverage

# Turbo
.turbo

# Vercel
.vercel

# Build Outputs
.next/
out/
build
dist


# Debug
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# Misc
.vscode
.DS_Store
*.pem
1 change: 1 addition & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pnpm nano-staged
6 changes: 6 additions & 0 deletions .nanostagedrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"*.{ts,tsx,json,jsonc}": [
"biome format --write",
"biome lint"
]
}
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v20.13.0
32 changes: 18 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,28 @@
# functional-javascript-programming

ν•¨μˆ˜ν˜• μžλ°”μŠ€ν¬λ¦½νŠΈ ν”„λ‘œκ·Έλž˜λ°

![image](https://github.com/user-attachments/assets/d31776df-7a65-4064-8a08-3d256aa3aab7)

# μ‹œκ°„ 및 μž₯μ†Œ

- μ‹œκ°„: λ§€μ£Ό μΌμš”μΌ 16μ‹œ
- μž₯μ†Œ: λ””μŠ€μ½”λ“œ

# 방식

- μ£Ό 1회 온라인 ν™˜κ²½μΈ λ””μŠ€μ½”λ“œμ—μ„œ μ§„ν–‰ν•©λ‹ˆλ‹€.
- μ΅œλŒ€ν•œ ν•΄λ‹Ή 책을 기반으둜 μ½”λ“œλ₯Ό 많이 μ§œλ³΄λŠ” 것을 λͺ©ν‘œλ‘œ ν•©λ‹ˆλ‹€.
- μŠ€ν„°λ”” μ§„ν–‰ 전에 μ£Ό 차별 챕터λ₯Ό 읽고 μ •λ¦¬ν•©λ‹ˆλ‹€. 마크 λ‹€μš΄ 기반으둜 정리λ₯Ό ν•˜κ³  ν˜•μ‹μ€ μžμœ μž…λ‹ˆλ‹€. λ…Όμ˜ν•˜κ³  싢은 사항이 μžˆλ‹€λ©΄ ν¬ν•¨ν•©λ‹ˆλ‹€.
- 정리가 μ™„λ£Œλ˜λ©΄ μŠ€ν„°λ”” μ „κΉŒμ§€ Github 레포의 ν•΄λ‹Ήλ˜λŠ” 주차의 폴더에 μ—…λ‘œλ“œλ₯Ό ν•©λ‹ˆλ‹€. ([μ°Έκ³ ](https://github.com/FEBookStudy/Grokking-Simplicity))
- 파일 이름 ν˜•μ‹: 이름.md
- 컀밋 ν˜•μ‹: `docs: μ—…λ°μ΄νŠΈ λ‚΄μš©`
- 파일 이름 ν˜•μ‹: 이름.md
- 컀밋 ν˜•μ‹: `docs: μ—…λ°μ΄νŠΈ λ‚΄μš©`
- 온라인으둜 μŠ€ν„°λ”” μ§„ν–‰ 전에 λ°œν‘œμž 1λͺ…을 λ¬΄μž‘μœ„λ‘œ μ„ μ •ν•΄ λ°œν‘œλ₯Ό μ§„ν–‰ν•©λ‹ˆλ‹€.
- λ°œν‘œ 후에 κΆκΈˆν•œ 점, λ…Όμ˜κ°€ ν•„μš”ν•œ 점을 μ΄μ•ΌκΈ°ν•©λ‹ˆλ‹€.
- ν•΄λ‹Ή λ‚΄μš©μ€ 질문, λ…Όμ˜λ³„ [Issue](https://github.com/FEBookStudy/Grokking-Simplicity/issues)λ₯Ό 생성해 κΈ°λ‘ν•©λ‹ˆλ‹€.
- ν•΄λ‹Ή λ‚΄μš©μ€ 질문, λ…Όμ˜λ³„ [Issue](https://github.com/FEBookStudy/Grokking-Simplicity/issues)λ₯Ό 생성해 κΈ°λ‘ν•©λ‹ˆλ‹€.

# λ°œν‘œ 방식

- μ£Όμ°¨ 별 λΈŒλžœμΉ˜μ— μ •λ¦¬ν•œ λ‚΄μš©μ„ commitν•©λ‹ˆλ‹€. (`week-1` λΈŒλžœμΉ˜μ— `/docs/1μ£Όμ°¨/이름.md`)
- λ°œν‘œ 당일에 `main` 브랜치둜 PR을 ν•©λ‹ˆλ‹€.
- CODEOWNERS와 νŒ€ μ„€μ •μœΌλ‘œ reviewerκ°€ 1λͺ… μžλ™ μ„ μ •λ©λ‹ˆλ‹€. (Load balance)
Expand All @@ -27,17 +31,17 @@

# μŠ€ν„°λ”” 상세 μΌμ •ν‘œ

| **μ£Όμ°¨** | **λ‚ μ§œ** | **ν•™μŠ΅ λ‚΄μš©** |
|---------|-------------|--------------------------------------------|
| **0μ£Όμ°¨** | 11/25 (20μ‹œ) | OT 및 μŠ€ν„°λ”” 방식 상세 λ…Όμ˜ |
| **1μ£Όμ°¨** | 12/8 | 1μž₯ ν•¨μˆ˜ν˜• μžλ°”μŠ€ν¬λ¦½νŠΈ μ†Œκ°œ |
| **2μ£Όμ°¨** | 12/15 | 2μž₯ ν•¨μˆ˜ν˜• μžλ°”μŠ€ν¬λ¦½νŠΈλ₯Ό μœ„ν•œ 문법 λ‹€μ‹œ 보기 |
| **3μ£Όμ°¨** | 12/22 | 3μž₯ Underscore.jsλ₯Ό 직접 λ§Œλ“€λ©° ν•¨μˆ˜ν˜• μžλ°”μŠ€ν¬λ¦½νŠΈμ˜ λΌˆλŒ€ 읡히기 |
| **4μ£Όμ°¨** | 12/29 | 4μž₯ ν•¨μˆ˜ μ‘°λ¦½ν•˜κΈ° |
| **5μ£Όμ°¨** | 1/5 | 5μž₯ Partial.js와 ν•¨μˆ˜ 쑰립 |
| **6μ£Όμ°¨** | 1/12 | 6μž₯ 값에 λŒ€ν•΄ & 7μž₯ μ‹€μ „μ—μ„œ ν•¨μˆ˜ν˜• μžλ°”μŠ€ν¬λ¦½νŠΈ 더 많이 μ‚¬μš©ν•˜κΈ° |
| **7μ£Όμ°¨** | 1/19 | 8μž₯ ν•¨μˆ˜ν˜•μœΌλ‘œ λ§Œλ“œλŠ” ν•  일 μ•± & 9μž₯ λ©”λͺ¨μ΄μ œμ΄μ…˜ & 회고 |

| **μ£Όμ°¨** | **λ‚ μ§œ** | **ν•™μŠ΅ λ‚΄μš©** |
| --------- | ------------ | ----------------------------------------------------------------- |
| **0μ£Όμ°¨** | 11/25 (20μ‹œ) | OT 및 μŠ€ν„°λ”” 방식 상세 λ…Όμ˜ |
| **1μ£Όμ°¨** | 12/8 | 1μž₯ ν•¨μˆ˜ν˜• μžλ°”μŠ€ν¬λ¦½νŠΈ μ†Œκ°œ |
| **2μ£Όμ°¨** | 12/15 | 2μž₯ ν•¨μˆ˜ν˜• μžλ°”μŠ€ν¬λ¦½νŠΈλ₯Ό μœ„ν•œ 문법 λ‹€μ‹œ 보기 |
| **3μ£Όμ°¨** | 12/22 | 3μž₯ Underscore.jsλ₯Ό 직접 λ§Œλ“€λ©° ν•¨μˆ˜ν˜• μžλ°”μŠ€ν¬λ¦½νŠΈμ˜ λΌˆλŒ€ 읡히기 |
| **4μ£Όμ°¨** | 12/29 | 4μž₯ ν•¨μˆ˜ μ‘°λ¦½ν•˜κΈ° |
| **5μ£Όμ°¨** | 1/5 | 5μž₯ Partial.js와 ν•¨μˆ˜ 쑰립 |
| **6μ£Όμ°¨** | 1/12 | 6μž₯ 값에 λŒ€ν•΄ & 7μž₯ μ‹€μ „μ—μ„œ ν•¨μˆ˜ν˜• μžλ°”μŠ€ν¬λ¦½νŠΈ 더 많이 μ‚¬μš©ν•˜κΈ° |
| **7μ£Όμ°¨** | 1/19 | 8μž₯ ν•¨μˆ˜ν˜•μœΌλ‘œ λ§Œλ“œλŠ” ν•  일 μ•± & 9μž₯ λ©”λͺ¨μ΄μ œμ΄μ…˜ & 회고 |

# ν•¨μˆ˜ν˜• μžλ°”μŠ€ν¬λ¦½νŠΈ μ„œμ  κΉƒν—ˆλΈŒ μ°Έκ³ 

https://github.com/indongyoo/functional-javascript
42 changes: 42 additions & 0 deletions biome.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
{
"$schema": "https://biomejs.dev/schemas/1.7.0/schema.json",
"organizeImports": {
"enabled": true
},
"linter": {
"enabled": true,
"ignore": ["node_modules", "dist", ".next"],
"rules": {
"recommended": true,
"style": {
"useBlockStatements": "error"
}
}
},
"formatter": {
"enabled": true,
"indentWidth": 2,
"indentStyle": "space",
"lineWidth": 100,
"ignore": ["node_modules", "dist", ".next"]
},
"json": {
"parser": {
"allowTrailingCommas": true
},
"formatter": {
"enabled": true
}
},
"javascript": {
"formatter": {
"enabled": true,
"quoteStyle": "single",
"jsxQuoteStyle": "double",
"trailingComma": "all",
"semicolons": "asNeeded",
"arrowParentheses": "always",
"quoteProperties": "asNeeded"
}
}
}
3 changes: 3 additions & 0 deletions cspell.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"words": ["functional-javascript-programming", "hyobum"]
}
26 changes: 26 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"name": "functional-javascript-programming",
"private": true,
"scripts": {
"clean:branch": "git fetch --prune && git branch | grep -v '^*' | xargs git branch -D",
"clean:cache": "turbo clean",
"build:all": "turbo build",
"start": "turbo start",
"lint": "turbo lint",
"format": "turbo format",
"prepare": "husky",
"preinstall": "corepack enable"
},
"devDependencies": {
"@biomejs/biome": "1.7.3",
"husky": "^9.0.11",
"nano-staged": "^0.8.0",
"turbo": "^2.0.7",
"typescript": "^5.4.5",
"@types/node": "20.13.0"
},
"packageManager": "pnpm@9.1.0",
"engines": {
"node": "20.13.0"
}
}
51 changes: 1 addition & 50 deletions playground/README.md
Original file line number Diff line number Diff line change
@@ -1,50 +1 @@
# React + TypeScript + Vite

This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.

Currently, two official plugins are available:

- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react/README.md) uses [Babel](https://babeljs.io/) for Fast Refresh
- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh

## Expanding the ESLint configuration

If you are developing a production application, we recommend updating the configuration to enable type aware lint rules:

- Configure the top-level `parserOptions` property like this:

```js
export default tseslint.config({
languageOptions: {
// other options...
parserOptions: {
project: ['./tsconfig.node.json', './tsconfig.app.json'],
tsconfigRootDir: import.meta.dirname,
},
},
})
```

- Replace `tseslint.configs.recommended` to `tseslint.configs.recommendedTypeChecked` or `tseslint.configs.strictTypeChecked`
- Optionally add `...tseslint.configs.stylisticTypeChecked`
- Install [eslint-plugin-react](https://github.com/jsx-eslint/eslint-plugin-react) and update the config:

```js
// eslint.config.js
import react from 'eslint-plugin-react'

export default tseslint.config({
// Set the react version
settings: { react: { version: '18.3' } },
plugins: {
// Add the react plugin
react,
},
rules: {
// other rules...
// Enable its recommended rules
...react.configs.recommended.rules,
...react.configs['jsx-runtime'].rules,
},
})
```
# functional-javascript-programming playground
File renamed without changes.
50 changes: 50 additions & 0 deletions playground/apps/home/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# React + TypeScript + Vite

This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.

Currently, two official plugins are available:

- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react/README.md) uses [Babel](https://babeljs.io/) for Fast Refresh
- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh

## Expanding the ESLint configuration

If you are developing a production application, we recommend updating the configuration to enable type aware lint rules:

- Configure the top-level `parserOptions` property like this:

```js
export default tseslint.config({
languageOptions: {
// other options...
parserOptions: {
project: ["./tsconfig.node.json", "./tsconfig.app.json"],
tsconfigRootDir: import.meta.dirname,
},
},
});
```

- Replace `tseslint.configs.recommended` to `tseslint.configs.recommendedTypeChecked` or `tseslint.configs.strictTypeChecked`
- Optionally add `...tseslint.configs.stylisticTypeChecked`
- Install [eslint-plugin-react](https://github.com/jsx-eslint/eslint-plugin-react) and update the config:

```js
// eslint.config.js
import react from "eslint-plugin-react";

export default tseslint.config({
// Set the react version
settings: { react: { version: "18.3" } },
plugins: {
// Add the react plugin
react,
},
rules: {
// other rules...
// Enable its recommended rules
...react.configs.recommended.rules,
...react.configs["jsx-runtime"].rules,
},
});
```
28 changes: 28 additions & 0 deletions playground/apps/home/eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import js from "@eslint/js";
import globals from "globals";
import reactHooks from "eslint-plugin-react-hooks";
import reactRefresh from "eslint-plugin-react-refresh";
import tseslint from "typescript-eslint";

export default tseslint.config(
{ ignores: ["dist"] },
{
extends: [js.configs.recommended, ...tseslint.configs.recommended],
files: ["**/*.{ts,tsx}"],
languageOptions: {
ecmaVersion: 2020,
globals: globals.browser,
},
plugins: {
"react-hooks": reactHooks,
"react-refresh": reactRefresh,
},
rules: {
...reactHooks.configs.recommended.rules,
"react-refresh/only-export-components": [
"warn",
{ allowConstantExport: true },
],
},
}
);
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!doctype html>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
Expand Down
36 changes: 36 additions & 0 deletions playground/apps/home/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{
"name": "home",
"private": true,
"version": "0.0.0",
"type": "module",
"scripts": {
"lint": "biome lint ./src",
"format": "biome format ./src --write",
"dev": "vite",
"build": "tsc -b && vite build",
"preview": "vite preview"
},
"dependencies": {
"@functional-javascript-programming/utils": "workspace:*",
"axios": "^1.7.9",
"js-cookie": "^3.0.5",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react-router-dom": "^7.0.2"
},
"devDependencies": {
"@eslint/js": "^9.15.0",
"@originjs/vite-plugin-federation": "^1.3.6",
"@types/js-cookie": "^3.0.6",
"@types/react": "^18.3.12",
"@types/react-dom": "^18.3.1",
"@vitejs/plugin-react-swc": "^3.5.0",
"eslint": "^9.15.0",
"eslint-plugin-react-hooks": "^5.0.0",
"eslint-plugin-react-refresh": "^0.4.14",
"globals": "^15.12.0",
"typescript": "~5.6.2",
"typescript-eslint": "^8.15.0",
"vite": "^6.0.1"
}
}
File renamed without changes
16 changes: 7 additions & 9 deletions playground/src/App.css β†’ playground/apps/home/src/App.css
Original file line number Diff line number Diff line change
@@ -1,10 +1,3 @@
#root {
max-width: 1280px;
margin: 0 auto;
padding: 2rem;
text-align: center;
}

.logo {
height: 6em;
padding: 1.5em;
Expand Down Expand Up @@ -34,9 +27,14 @@
}

.card {
padding: 2em;
width: 400px;
display: flex;
align-items: center;
justify-content: flex-end;
margin: 0 auto;
padding: 0;
}

.read-the-docs {
color: #888;
color: var(--blue-300);
}
Loading