Skip to content

Commit

Permalink
refactor: CRA에서 vite로 마이그레이션 후 충돌해결 (#30)
Browse files Browse the repository at this point in the history
  • Loading branch information
rbgksqkr committed Jan 12, 2024
2 parents 20c2229 + c6275b2 commit 8ef6db4
Show file tree
Hide file tree
Showing 44 changed files with 16,256 additions and 12,742 deletions.
1 change: 0 additions & 1 deletion .env

This file was deleted.

40 changes: 40 additions & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
module.exports = {
root: true,
env: { browser: true, es2020: true },
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'plugin:react-hooks/recommended',
],
ignorePatterns: ['dist', '.eslintrc.cjs'],
parser: '@typescript-eslint/parser',
plugins: ['prettier', '@typescript-eslint'],
// parserOptions: {
// parser: '@typescript-eslint/parser',
// },
// rules: {
// 'import/order': [
// 'error',
// {
// groups: ['builtin', 'external', ['parent', 'sibling'], 'index'],
// pathGroups: [
// {
// pattern: 'angular',
// group: 'external',
// position: 'before',
// },
// ],
// alphabetize: {
// order: 'asc',
// caseInsensitive: true,
// },
// 'newlines-between': 'always',
// },
// ],
// },
settings: {
'import/resolver': {
typescript: {},
},
},
};
44 changes: 0 additions & 44 deletions .eslintrc.js

This file was deleted.

37 changes: 27 additions & 10 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,31 @@
# 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?

# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules
/.pnp
.pnp.js

Expand All @@ -13,16 +37,9 @@

# misc
.DS_Store
.env
.env.local
.env.development.local
.env.test.local
.env.production.local
.firebase

npm-debug.log*
yarn-debug.log*
yarn-error.log*
firebase-debug.log*

# build
dist
.firebase
13 changes: 0 additions & 13 deletions .vscode/settings.json

This file was deleted.

31 changes: 29 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,30 @@
# CAUSW Frontend
# React + TypeScript + Vite

https://causw.net/
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 {
// other rules...
parserOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
project: ['./tsconfig.json', './tsconfig.node.json'],
tsconfigRootDir: __dirname,
},
}
```

- Replace `plugin:@typescript-eslint/recommended` to `plugin:@typescript-eslint/recommended-type-checked` or `plugin:@typescript-eslint/strict-type-checked`
- Optionally add `plugin:@typescript-eslint/stylistic-type-checked`
- 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
13 changes: 0 additions & 13 deletions craco.config.js

This file was deleted.

6 changes: 1 addition & 5 deletions firebase.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
{
"hosting": {
"public": "build",
"ignore": [
"firebase.json",
"**/.*",
"**/node_modules/**"
],
"ignore": ["firebase.json", "**/.*", "**/node_modules/**"],
"rewrites": [
{
"source": "**",
Expand Down
21 changes: 21 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no,viewport-fit=cover" />
<meta name="theme-color" content="#000000" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="mobile-web-app-capable" content="yes" />
<link rel="apple-touch-icon" href="/logo192.png" />
<link rel="manifest" href="/manifest.json" />
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700&display=swap" />
<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons" />
<title>CAUSW</title>
</head>
<body>
<div id="root"></div>
<div id="external-root"></div>
<script type="module" src="/src/index.tsx"></script>
</body>
</html>
Loading

0 comments on commit 8ef6db4

Please sign in to comment.