-
Notifications
You must be signed in to change notification settings - Fork 5
[FE] setting: 프론트엔드 개발 환경 초기 세팅 #23
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
Merged
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
1abb7f5
[FE] setting: vite 기본 세팅 (#17)
chysis 9c5edac
[FE] setting: ESLint, Prettier 세팅 (#17)
chysis 23bad4a
[FE] setting: Zustand 설치 (#17)
chysis 3b96c61
[FE] setting: styled-components 및 babel, stylelint 세팅 (#17)
chysis 71438bd
[FE] setting: TanStack Query 세팅 (#17)
chysis 106097a
[FE] setting: RTL, jest 세팅 (#17)
chysis 2d08466
[FE] setting: 폴더 생성을 위한 빈 파일 추가 (#17)
chysis File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| { | ||
| "presets": [ | ||
| ["@babel/preset-env", {"targets": {"node": "current"}}], | ||
| ["@babel/preset-react", {"runtime": "automatic"}], | ||
| "@babel/preset-typescript" | ||
| ], | ||
| "plugins": ["babel-plugin-styled-components"] | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,61 @@ | ||
| const path = require('path'); | ||
|
|
||
| module.exports = { | ||
| root: true, | ||
| env: { browser: true, es2020: true }, | ||
| extends: [ | ||
| 'eslint:recommended', | ||
| 'plugin:@typescript-eslint/recommended', | ||
| 'plugin:react-hooks/recommended', | ||
| 'plugin:import/recommended', | ||
| 'plugin:react/recommended', | ||
| 'prettier', | ||
| ], | ||
| ignorePatterns: [ | ||
| 'dist', | ||
| '.eslintrc.cjs', | ||
| 'vite.config.ts', | ||
| 'tsconfig.json', | ||
| 'tsconfig.app.json', | ||
| 'tsconfig.node.json', | ||
| ], | ||
| parser: '@typescript-eslint/parser', | ||
| plugins: ['react-refresh'], | ||
| rules: { | ||
| 'react/react-in-jsx-scope': 'off', | ||
| 'react/no-unknown-property': ['error', { ignore: ['css'] }], | ||
| 'import/order': [ | ||
| 'error', | ||
| { | ||
| 'newlines-between': 'always', | ||
| groups: [['builtin', 'external'], 'internal', 'parent', 'sibling', 'index'], | ||
| pathGroups: [ | ||
| { | ||
| pattern: 'next', | ||
| group: 'builtin', | ||
| }, | ||
| { | ||
| pattern: 'react', | ||
| group: 'builtin', | ||
| }, | ||
| { | ||
| pattern: './src/**', | ||
| group: 'internal', | ||
| }, | ||
| ], | ||
| alphabetize: { | ||
| order: 'asc', | ||
| caseInsensitive: true, | ||
| }, | ||
| }, | ||
| ], | ||
| }, | ||
| settings: { | ||
| 'import/resolver': { | ||
| alias: { | ||
| map: [['@', path.resolve(__dirname, './src')]], | ||
| extensions: ['.js', '.jsx', '.ts', '.tsx'], | ||
| }, | ||
| }, | ||
| }, | ||
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| # Logs | ||
| logs | ||
| *.log | ||
| npm-debug.log* | ||
| yarn-debug.log* | ||
| yarn-error.log* | ||
| pnpm-debug.log* | ||
| lerna-debug.log* | ||
|
|
||
| node_modules | ||
| dist | ||
| dist-ssr | ||
| *.local | ||
|
|
||
| # Editor directories and files | ||
| .vscode/* | ||
| !.vscode/extensions.json | ||
| .idea | ||
| .DS_Store | ||
| *.suo | ||
| *.ntvs* | ||
| *.njsproj | ||
| *.sln | ||
| *.sw? |
Empty file.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| { | ||
| "endOfLine": "auto", | ||
| "singleQuote": true, | ||
| "semi": true, | ||
| "tabWidth": 2, | ||
| "trailingComma": "all", | ||
| "printWidth": 120, | ||
| "bracketSpacing": true, | ||
| "arrowParens": "always", | ||
| "prefer-const": true | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| { | ||
| "extends": ["stylelint-config-standard", "stylelint-config-clean-order"], | ||
| "customSyntax": "postcss-styled-syntax" | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| AsyncGate Frontend |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| <!DOCTYPE html> | ||
| <html lang="en"> | ||
| <head> | ||
| <meta charset="UTF-8" /> | ||
| <meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
| <title>AsyncGate</title> | ||
| </head> | ||
| <body> | ||
| <div id="root"></div> | ||
| <script type="module" src="/src/main.tsx"></script> | ||
| </body> | ||
| </html> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| export default { | ||
| testEnvironment: 'jsdom', | ||
| transform: { | ||
| '^.+\\.(js|jsx|ts|tsx)$': 'babel-jest', | ||
| }, | ||
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,63 @@ | ||
| { | ||
| "name": "frontend", | ||
| "private": true, | ||
| "version": "0.0.0", | ||
| "type": "module", | ||
| "main": "index.js", | ||
| "license": "MIT", | ||
| "scripts": { | ||
| "dev": "vite", | ||
| "build": "tsc -b && vite build", | ||
| "lint": "eslint . --fix", | ||
| "preview": "vite preview", | ||
| "lint:css": "stylelint ./src/**/*.ts", | ||
| "test": "jest" | ||
| }, | ||
| "dependencies": { | ||
| "@tanstack/react-query": "^5.66.0", | ||
| "@tanstack/react-query-devtools": "^5.66.0", | ||
| "react": "^18.3.1", | ||
| "react-dom": "^18.3.1", | ||
| "react-router-dom": "^7.1.5", | ||
| "styled-components": "^6.1.14", | ||
| "zustand": "^5.0.3" | ||
| }, | ||
| "devDependencies": { | ||
| "@babel/core": "^7.26.7", | ||
| "@babel/preset-env": "^7.26.7", | ||
| "@babel/preset-react": "^7.26.3", | ||
| "@babel/preset-typescript": "^7.26.0", | ||
| "@eslint/js": "^9.17.0", | ||
| "@testing-library/dom": "^10.4.0", | ||
| "@testing-library/jest-dom": "^6.6.3", | ||
| "@testing-library/react": "^16.2.0", | ||
| "@testing-library/user-event": "^14.6.1", | ||
| "@types/jest": "^29.5.14", | ||
| "@types/react": "^18.3.18", | ||
| "@types/react-dom": "^18.3.5", | ||
| "@typescript-eslint/eslint-plugin": "^8.22.0", | ||
| "@typescript-eslint/parser": "^8.22.0", | ||
| "@vitejs/plugin-react": "^4.3.4", | ||
| "babel-jest": "^29.7.0", | ||
| "babel-plugin-styled-components": "^2.1.4", | ||
| "eslint": "8.57.1", | ||
| "eslint-config-prettier": "^10.0.1", | ||
| "eslint-import-resolver-alias": "^1.1.2", | ||
| "eslint-plugin-import": "^2.31.0", | ||
| "eslint-plugin-prettier": "^5.2.3", | ||
| "eslint-plugin-react": "^7.37.4", | ||
| "eslint-plugin-react-hooks": "^5.1.0", | ||
| "eslint-plugin-react-refresh": "^0.4.18", | ||
| "globals": "^15.14.0", | ||
| "jest": "^29.7.0", | ||
| "jest-environment-jsdom": "^29.7.0", | ||
| "postcss": "^8.5.1", | ||
| "postcss-styled-syntax": "^0.7.1", | ||
| "prettier": "^3.4.2", | ||
| "stylelint": "^16.14.1", | ||
| "stylelint-config-clean-order": "^7.0.0", | ||
| "stylelint-config-standard": "^37.0.0", | ||
| "typescript": "~5.6.2", | ||
| "vite": "^6.0.11" | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| const App = () => { | ||
| return <div></div>; | ||
| }; | ||
|
|
||
| export default App; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| 폴더 생성을 위해 만든 빈 파일입니다. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| 폴더 생성을 위해 만든 빈 파일입니다. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| 폴더 생성을 위해 만든 빈 파일입니다. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| import { QueryClient, QueryClientProvider } from '@tanstack/react-query'; | ||
| import { StrictMode } from 'react'; | ||
| import { createRoot } from 'react-dom/client'; | ||
|
|
||
| import App from './App'; | ||
|
|
||
| const queryClient = new QueryClient({ | ||
| defaultOptions: { | ||
| queries: { | ||
| throwOnError: true, | ||
| refetchOnWindowFocus: false, | ||
| }, | ||
| mutations: { | ||
| throwOnError: true, | ||
| }, | ||
| }, | ||
| }); | ||
|
|
||
| createRoot(document.getElementById('root')!).render( | ||
| <StrictMode> | ||
| <QueryClientProvider client={queryClient}> | ||
| <App /> | ||
| </QueryClientProvider> | ||
| </StrictMode>, | ||
| ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| 폴더 생성을 위해 만든 빈 파일입니다. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| /// <reference types="vite/client" /> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| { | ||
| "compilerOptions": { | ||
| "tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo", | ||
| "target": "ES2020", | ||
| "useDefineForClassFields": true, | ||
| "lib": ["ES2020", "DOM", "DOM.Iterable"], | ||
| "module": "ESNext", | ||
| "skipLibCheck": true, | ||
|
|
||
| /* Bundler mode */ | ||
| "moduleResolution": "bundler", | ||
| "allowImportingTsExtensions": true, | ||
| "isolatedModules": true, | ||
| "moduleDetection": "force", | ||
| "noEmit": true, | ||
| "jsx": "react-jsx", | ||
|
|
||
| /* Linting */ | ||
| "strict": true, | ||
| "noUnusedLocals": true, | ||
| "noUnusedParameters": true, | ||
| "noFallthroughCasesInSwitch": true, | ||
| "noUncheckedSideEffectImports": true | ||
| }, | ||
| "include": ["src"] | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| { | ||
| "files": [], | ||
| "references": [ | ||
| { "path": "./tsconfig.app.json" }, | ||
| { "path": "./tsconfig.node.json" } | ||
| ], | ||
|
|
||
| "types": ["jest", "@testing-library/jest-dom"], | ||
| "compilerOptions": { | ||
| "paths":{ | ||
| "@/*": ["./src/*"] | ||
| } | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| { | ||
| "compilerOptions": { | ||
| "tsBuildInfoFile": "./node_modules/.tmp/tsconfig.node.tsbuildinfo", | ||
| "target": "ES2022", | ||
| "lib": ["ES2023"], | ||
| "module": "ESNext", | ||
| "skipLibCheck": true, | ||
|
|
||
| /* Bundler mode */ | ||
| "moduleResolution": "bundler", | ||
| "allowImportingTsExtensions": true, | ||
| "isolatedModules": true, | ||
| "moduleDetection": "force", | ||
| "noEmit": true, | ||
|
|
||
| /* Linting */ | ||
| "strict": true, | ||
| "noUnusedLocals": true, | ||
| "noUnusedParameters": true, | ||
| "noFallthroughCasesInSwitch": true, | ||
| "noUncheckedSideEffectImports": true | ||
| }, | ||
| "include": ["vite.config.ts"] | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| import { defineConfig } from 'vite' | ||
| import react from '@vitejs/plugin-react' | ||
|
|
||
| // https://vite.dev/config/ | ||
| export default defineConfig({ | ||
| plugins: [react()], | ||
| }) |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.env는 필요시 추가하실 예정인가요?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.env를 깜빡했네요😅
파일 추가 시 함께 추가하면 될 것 같아요!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
네 좋아요!! 고생많으셨어요! 🙇♀️