Skip to content

Commit 40a9c72

Browse files
committed
chore: 초기 프로젝트 설정
0 parents  commit 40a9c72

23 files changed

+3793
-0
lines changed

.eslintignore

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# eslint, prettier, etc. config files
2+
.eslintrc.cjs
3+
.prettierrc.cjs
4+
5+
*.config.js
6+
*.config.ts
7+
8+
9+
# lib/RenderExtension file
10+
src/**/*.js

.eslintrc.cjs

+63
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
/* eslint-env node */
2+
module.exports = {
3+
root: true,
4+
env: { browser: true, es2020: true },
5+
extends: [
6+
"eslint:recommended",
7+
"plugin:@typescript-eslint/recommended",
8+
"plugin:@typescript-eslint/recommended-type-checked",
9+
"plugin:react-hooks/recommended",
10+
"plugin:react/recommended",
11+
"plugin:import/recommended",
12+
"prettier",
13+
],
14+
parser: "@typescript-eslint/parser",
15+
parserOptions: {
16+
ecmaVersion: "latest",
17+
sourceType: "module",
18+
project: true,
19+
tsconfigRootDir: __dirname,
20+
},
21+
ignorePatterns: ["postcss.config.cjs", "dist", ".eslintrc.cjs", "**/*.cjs"],
22+
plugins: ["react-refresh", "react", "import"],
23+
rules: {
24+
"@typescript-eslint/no-unused-vars": [
25+
"warn",
26+
{ argsIgnorePattern: "^_", varsIgnorePattern: "^_" },
27+
],
28+
"react/no-unknown-property": ["error", { "ignore": ["css"] }],
29+
"@typescript-eslint/no-misused-promises": "off",
30+
"react-refresh/only-export-components": [
31+
"off",
32+
{ allowConstantExport: true },
33+
],
34+
"react/react-in-jsx-scope": "off",
35+
"no-restricted-imports": ["error", { patterns: ["../*", "../**/*"] }],
36+
"import/newline-after-import": "warn",
37+
"import/no-default-export": "warn",
38+
"import/order": [
39+
"warn",
40+
{
41+
"newlines-between": "always",
42+
alphabetize: {
43+
order: "asc",
44+
caseInsensitive: true,
45+
},
46+
},
47+
],
48+
},
49+
settings: {
50+
"import/parsers": {
51+
"@typescript-eslint/parser": [".ts", ".tsx"],
52+
},
53+
"import/resolver": {
54+
typescript: {
55+
alwaysTryTypes: true,
56+
project: "src/",
57+
},
58+
node: {
59+
"extensions": [".js", ".jsx", ".ts", ".tsx"]
60+
}
61+
},
62+
},
63+
};

.gitignore

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Logs
2+
logs
3+
*.log
4+
npm-debug.log*
5+
yarn-debug.log*
6+
yarn-error.log*
7+
pnpm-debug.log*
8+
lerna-debug.log*
9+
10+
node_modules
11+
dist
12+
dist-ssr
13+
*.local
14+
15+
# Editor directories and files
16+
.vscode/*
17+
!.vscode/extensions.json
18+
.idea
19+
.DS_Store
20+
*.suo
21+
*.ntvs*
22+
*.njsproj
23+
*.sln
24+
*.sw?

.prettierrc.cjs

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
module.exports = {
2+
printWidth: 80,
3+
tabWidth: 2,
4+
semi: true,
5+
useTabs: false,
6+
singleQuote: false,
7+
quoteProps: "as-needed",
8+
jsxSingleQuote: false,
9+
trailingComma: "all",
10+
bracketSpacing: true,
11+
bracketSameLine: false,
12+
arrowParens: "always",
13+
requirePragma: false,
14+
proseWrap: "preserve",
15+
endOfLine: "lf",
16+
singleAttributePerLine: false,
17+
insertPragma: false,
18+
htmlWhitespaceSensitivity: "css",
19+
embeddedLanguageFormatting: "auto",
20+
vueIndentScriptAndStyle: false,
21+
};

README.md

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
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) uses [Babel](https://babeljs.io/) for Fast Refresh
8+
- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh
9+
10+
## Expanding the ESLint configuration
11+
12+
If you are developing a production application, we recommend updating the configuration to enable type aware lint rules:
13+
14+
- Configure the top-level `parserOptions` property like this:
15+
16+
```js
17+
export default {
18+
// other rules...
19+
parserOptions: {
20+
ecmaVersion: 'latest',
21+
sourceType: 'module',
22+
project: ['./tsconfig.json', './tsconfig.node.json'],
23+
tsconfigRootDir: __dirname,
24+
},
25+
}
26+
```
27+
28+
- Replace `plugin:@typescript-eslint/recommended` to `plugin:@typescript-eslint/recommended-type-checked` or `plugin:@typescript-eslint/strict-type-checked`
29+
- Optionally add `plugin:@typescript-eslint/stylistic-type-checked`
30+
- Install [eslint-plugin-react](https://github.com/jsx-eslint/eslint-plugin-react) and add `plugin:react/recommended` & `plugin:react/jsx-runtime` to the `extends` list

index.html

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<!doctype html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8" />
5+
<link rel="stylesheet" as="style" crossorigin href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/static/pretendard-dynamic-subset.min.css" />
6+
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
7+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
8+
<title>리워크</title>
9+
</head>
10+
<body>
11+
<div id="root"></div>
12+
<script type="module" src="/src/app.tsx"></script>
13+
</body>
14+
</html>

package.json

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
{
2+
"name": "rework",
3+
"private": true,
4+
"version": "0.0.0",
5+
"type": "module",
6+
"scripts": {
7+
"dev": "vite",
8+
"build": "tsc && vite build",
9+
"lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
10+
"preview": "vite preview"
11+
},
12+
"dependencies": {
13+
"@emotion/react": "^11.11.4",
14+
"react": "^18.2.0",
15+
"react-dom": "^18.2.0",
16+
"react-router-dom": "^6.22.3"
17+
},
18+
"devDependencies": {
19+
"@types/node": "^20.12.4",
20+
"@types/react": "^18.2.74",
21+
"@types/react-dom": "^18.2.24",
22+
"@typescript-eslint/eslint-plugin": "^7.5.0",
23+
"@typescript-eslint/parser": "^7.5.0",
24+
"@vitejs/plugin-react": "^4.2.1",
25+
"eslint": "^8.57.0",
26+
"eslint-config-prettier": "^9.1.0",
27+
"eslint-import-resolver-typescript": "^3.6.1",
28+
"eslint-plugin-import": "^2.29.1",
29+
"eslint-plugin-react": "^7.34.1",
30+
"eslint-plugin-react-hooks": "^4.6.0",
31+
"eslint-plugin-react-refresh": "^0.4.6",
32+
"typescript": "^5.2.2",
33+
"vite": "^5.2.0",
34+
"vite-plugin-svgr": "^4.2.0"
35+
}
36+
}

0 commit comments

Comments
 (0)