Skip to content

Commit 406931d

Browse files
committed
[⛏setting] package 세팅
1 parent 6ee949f commit 406931d

File tree

8 files changed

+47
-16
lines changed

8 files changed

+47
-16
lines changed

.eslintrc.json

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,7 @@
55
},
66
"settings": {
77
"import/resolver": {
8-
"node": {},
9-
"typescript": {
10-
"directory": "./src"
11-
}
8+
"typescript": {}
129
},
1310
"import/parsers": { "@typescript-eslint/parser": [".ts", ".tsx"] },
1411
"react": {
@@ -40,6 +37,7 @@
4037
"sourceType": "module"
4138
},
4239
"rules": {
40+
"import/default": "off",
4341
"react-hooks/rules-of-hooks": "error",
4442
"react-hooks/exhaustive-deps": "warn",
4543
"no-console": "warn",
@@ -107,4 +105,4 @@
107105
}
108106
]
109107
}
110-
}
108+
}

.prettierrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"printWidth": 80,
2+
"printWidth": 120,
33
"tabWidth": 2,
44
"singleQuote": true,
55
"trailingComma": "es5",

package-lock.json

Lines changed: 21 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,9 @@
1616
"react-dom": "^18.2.0",
1717
"react-redux": "^8.1.1",
1818
"react-router-dom": "^6.14.2",
19+
"redux-persist": "^6.0.0",
1920
"styled-components": "^6.0.4",
21+
"swr": "^2.2.0",
2022
"web-vitals": "^3.4.0"
2123
},
2224
"devDependencies": {

src/styles/GlobalStyle.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { createGlobalStyle } from 'styled-components';
22

3-
const GlobalStyle = createGlobalStyle`
3+
export const GlobalStyle = createGlobalStyle`
44
#root {
55
max-width: 1280px;
66
margin: 0 auto;
@@ -63,5 +63,3 @@ button:focus-visible {
6363
}
6464
6565
`;
66-
67-
export default GlobalStyle;

tsconfig.base.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22
"compilerOptions": {
33
"baseUrl": ".",
44
"paths": {
5-
"assets/*": ["src/assets/*"],
6-
"components/*": ["src/components/*"],
7-
"pages/*": ["src/pages/*"],
8-
"styles/*": ["src/styles/*"],
9-
"utils/*": ["src/utils/*"],
10-
"stores/*": ["src/stores/*"]
5+
"@apis/*": ["src/apis/*"],
6+
"@hooks/*": ["src/hooks/*"],
7+
"@assets/*": ["src/assets/*"],
8+
"@stores/*": ["src/stores/*"],
9+
"@components/*": ["src/components/*"],
10+
"@/*": ["src/*"]
1111
}
1212
}
1313
}

tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,6 @@
2121
"noUnusedParameters": true,
2222
"noFallthroughCasesInSwitch": true
2323
},
24-
"include": ["src"],
24+
"include": ["src", "**/*.ts", "**/*.tsx"],
2525
"references": [{ "path": "./tsconfig.node.json" }]
2626
}

vite.config.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,20 @@
1+
import path from 'path';
2+
13
import react from '@vitejs/plugin-react-swc';
24
import { defineConfig } from 'vite';
35
import tsconfigPaths from 'vite-tsconfig-paths';
46

57
// https://vitejs.dev/config/
68
export default defineConfig({
79
plugins: [react(), tsconfigPaths()],
10+
resolve: {
11+
alias: {
12+
'@': path.resolve(__dirname, 'src'),
13+
'@components': path.resolve(__dirname, 'src/components'),
14+
'@stores': path.resolve(__dirname, 'src/stores'),
15+
'@assets': path.resolve(__dirname, 'src/assets'),
16+
'@apis': path.resolve(__dirname, 'src/apis'),
17+
'@hooks': path.resolve(__dirname, 'src/hooks'),
18+
},
19+
},
820
});

0 commit comments

Comments
 (0)