Skip to content

Commit ce0429a

Browse files
committed
feat : 초기 세팅
1. rtk 삭제 2. recoil 설치
1 parent 41ee991 commit ce0429a

20 files changed

+61
-148
lines changed

.eslintrc.js

+4
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ module.exports = {
44
'next/core-web-vitals',
55
'plugin:@typescript-eslint/recommended',
66
'prettier',
7+
'prettier/prettier',
8+
'plugin:tailwindcss/recommended',
79
],
810
rules: {
911
// ESLint 규칙을 지정합니다. extends에서 지정된 규칙을 덮어 쓸수도 있습니다.
@@ -13,5 +15,7 @@ module.exports = {
1315
'@typescript-eslint/ban-types': 'off',
1416
'@typescript-eslint/no-empty-interface': 'off',
1517
'@typescript-eslint/no-namespace': 'off',
18+
'react/self-closing-comp': 'warn', // 셀프 클로징 태그 가능하면 적용
19+
'no-console': 'warn',
1620
},
1721
};

.prettierrc.js

+1
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,5 @@ module.exports = {
1717
],
1818
importOrderSeparation: true,
1919
importOrderSortSpecifiers: true,
20+
plugins: [require('prettier-plugin-tailwindcss')],
2021
};
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

package.json

+3-2
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,16 @@
1010
},
1111
"dependencies": {
1212
"@headlessui/react": "^1.7.4",
13-
"@reduxjs/toolkit": "^1.8.6",
1413
"@tailwindcss/forms": "^0.5.3",
1514
"axios": "^1.1.3",
1615
"next": "13.0.0",
16+
"prettier-plugin-tailwindcss": "^0.2.1",
1717
"react": "18.2.0",
1818
"react-dom": "18.2.0",
1919
"react-hook-form": "^7.38.0",
2020
"react-query": "^3.39.2",
2121
"react-redux": "^8.0.5",
22+
"recoil": "^0.7.6",
2223
"redux-persist": "^6.0.0"
2324
},
2425
"devDependencies": {
@@ -31,7 +32,7 @@
3132
"eslint-config-next": "13.0.0",
3233
"eslint-config-prettier": "^8.5.0",
3334
"postcss": "^8.4.18",
34-
"prettier": "^2.7.1",
35+
"prettier": "^2.8.3",
3536
"tailwindcss": "^3.2.1",
3637
"typescript": "4.8.4"
3738
},

src/features/hooks.ts

-6
This file was deleted.

src/features/store.ts

-38
This file was deleted.

src/features/user/userSlice.ts

-31
This file was deleted.

src/pages/_app.tsx

+7-12
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,15 @@
1-
import type { AppProps } from 'next/app';
21
import '../styles/globals.css';
3-
import { Provider } from 'react-redux';
4-
import store from '../features/store';
5-
import { PersistGate } from 'redux-persist/integration/react';
6-
import { persistStore } from 'redux-persist';
72

8-
const persistor = persistStore(store);
3+
import { RecoilRoot } from 'recoil';
4+
5+
import type { AppProps } from 'next/app';
96

107
export default function App({ Component, pageProps }: AppProps) {
118
return (
12-
<div className="mx-auto w-full max-w-[375px]">
13-
<Provider store={store}>
14-
<PersistGate loading={null} persistor={persistor}>
15-
<Component {...pageProps} />
16-
</PersistGate>
17-
</Provider>
9+
<div className="mx-auto flex h-5 w-full max-w-[375px] ">
10+
<RecoilRoot>
11+
<Component {...pageProps} />
12+
</RecoilRoot>
1813
</div>
1914
);
2015
}

src/store/atom.ts

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
import { atom } from 'recoil'
2+
3+
export const DetailPageInputMode = atom<{}>({
4+
key: 'DetailPageInputMode',
5+
default: {},
6+
});

yarn.lock

+40-59
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ __metadata:
1515
languageName: node
1616
linkType: hard
1717

18-
"@babel/runtime@npm:^7.10.2, @babel/runtime@npm:^7.12.5, @babel/runtime@npm:^7.18.9, @babel/runtime@npm:^7.5.5, @babel/runtime@npm:^7.6.2, @babel/runtime@npm:^7.7.2, @babel/runtime@npm:^7.9.2":
18+
"@babel/runtime@npm:^7.10.2, @babel/runtime@npm:^7.12.5, @babel/runtime@npm:^7.18.9, @babel/runtime@npm:^7.5.5, @babel/runtime@npm:^7.6.2, @babel/runtime@npm:^7.7.2":
1919
version: 7.20.0
2020
resolution: "@babel/runtime@npm:7.20.0"
2121
dependencies:
@@ -248,26 +248,6 @@ __metadata:
248248
languageName: node
249249
linkType: hard
250250

251-
"@reduxjs/toolkit@npm:^1.8.6":
252-
version: 1.8.6
253-
resolution: "@reduxjs/toolkit@npm:1.8.6"
254-
dependencies:
255-
immer: ^9.0.7
256-
redux: ^4.1.2
257-
redux-thunk: ^2.4.1
258-
reselect: ^4.1.5
259-
peerDependencies:
260-
react: ^16.9.0 || ^17.0.0 || ^18
261-
react-redux: ^7.2.1 || ^8.0.2
262-
peerDependenciesMeta:
263-
react:
264-
optional: true
265-
react-redux:
266-
optional: true
267-
checksum: f2a5f20f638a981eacd6becb040b923a825013064ece9b1555a658cab1e9f6c46a14d8c50aa095cda49ff0b89518b855ae88c774d95bcc9692e9297d3bc3b2d6
268-
languageName: node
269-
linkType: hard
270-
271251
"@rushstack/eslint-patch@npm:^1.1.3":
272252
version: 1.2.0
273253
resolution: "@rushstack/eslint-patch@npm:1.2.0"
@@ -1888,6 +1868,13 @@ __metadata:
18881868
languageName: node
18891869
linkType: hard
18901870

1871+
"hamt_plus@npm:1.0.2":
1872+
version: 1.0.2
1873+
resolution: "hamt_plus@npm:1.0.2"
1874+
checksum: af26ea32db03009019cc83dfa9411521a2fa16079443de1a502c9be46d8b3c975acda8ed93fc5750ef08d3186d35901e2d8cfe717dd54bea67b358601fa74e4c
1875+
languageName: node
1876+
linkType: hard
1877+
18911878
"has-bigints@npm:^1.0.1, has-bigints@npm:^1.0.2":
18921879
version: 1.0.2
18931880
resolution: "has-bigints@npm:1.0.2"
@@ -2005,13 +1992,6 @@ __metadata:
20051992
languageName: node
20061993
linkType: hard
20071994

2008-
"immer@npm:^9.0.7":
2009-
version: 9.0.16
2010-
resolution: "immer@npm:9.0.16"
2011-
checksum: e9a5ca65c929b329da7a3b7beccf7984271cda7bdd47b2cab619eac3277dcd56598c211b55cc340786b6eff0c06652ac018808d9fd744443f06882364dece6bc
2012-
languageName: node
2013-
linkType: hard
2014-
20151995
"import-fresh@npm:^3.0.0, import-fresh@npm:^3.2.1":
20161996
version: 3.3.0
20171997
resolution: "import-fresh@npm:3.3.0"
@@ -2249,7 +2229,6 @@ __metadata:
22492229
resolution: "jooonis-nextjs-boilerplate@workspace:."
22502230
dependencies:
22512231
"@headlessui/react": ^1.7.4
2252-
"@reduxjs/toolkit": ^1.8.6
22532232
"@tailwindcss/forms": ^0.5.3
22542233
"@types/node": 18.11.7
22552234
"@types/react": 18.0.24
@@ -2262,12 +2241,14 @@ __metadata:
22622241
eslint-config-prettier: ^8.5.0
22632242
next: 13.0.0
22642243
postcss: ^8.4.18
2265-
prettier: ^2.7.1
2244+
prettier: ^2.8.3
2245+
prettier-plugin-tailwindcss: ^0.2.1
22662246
react: 18.2.0
22672247
react-dom: 18.2.0
22682248
react-hook-form: ^7.38.0
22692249
react-query: ^3.39.2
22702250
react-redux: ^8.0.5
2251+
recoil: ^0.7.6
22712252
redux-persist: ^6.0.0
22722253
tailwindcss: ^3.2.1
22732254
typescript: 4.8.4
@@ -3103,12 +3084,21 @@ __metadata:
31033084
languageName: node
31043085
linkType: hard
31053086

3106-
"prettier@npm:^2.7.1":
3107-
version: 2.7.1
3108-
resolution: "prettier@npm:2.7.1"
3087+
"prettier-plugin-tailwindcss@npm:^0.2.1":
3088+
version: 0.2.1
3089+
resolution: "prettier-plugin-tailwindcss@npm:0.2.1"
3090+
peerDependencies:
3091+
prettier: ">=2.2.0"
3092+
checksum: 5a04b26f50baea552aaff938b6413bf66d0050c3ca5a0d5bc432a7efc8f8e4ba194a23b1aabd4d39d36228afaf368ba2bce24ebb87f4972459a3679eff6942e8
3093+
languageName: node
3094+
linkType: hard
3095+
3096+
"prettier@npm:^2.8.3":
3097+
version: 2.8.3
3098+
resolution: "prettier@npm:2.8.3"
31093099
bin:
31103100
prettier: bin-prettier.js
3111-
checksum: 55a4409182260866ab31284d929b3cb961e5fdb91fe0d2e099dac92eaecec890f36e524b4c19e6ceae839c99c6d7195817579cdffc8e2c80da0cb794463a748b
3101+
checksum: 92f2ceb522d454370e02082aa74ad27388672f7cee8975028b59517c069fe643bdc73e322675c8faf2ff173d7a626d1a6389f26b474000308e793aa25fff46e5
31123102
languageName: node
31133103
linkType: hard
31143104

@@ -3291,6 +3281,22 @@ __metadata:
32913281
languageName: node
32923282
linkType: hard
32933283

3284+
"recoil@npm:^0.7.6":
3285+
version: 0.7.6
3286+
resolution: "recoil@npm:0.7.6"
3287+
dependencies:
3288+
hamt_plus: 1.0.2
3289+
peerDependencies:
3290+
react: ">=16.13.1"
3291+
peerDependenciesMeta:
3292+
react-dom:
3293+
optional: true
3294+
react-native:
3295+
optional: true
3296+
checksum: 2b31dd29a7e0b369bc986a16f7253006776845144684c9e38bb6760e4ea954c5d7dc682aaf88e815e69098b8dea3ff62b6fa4e6c156157a29d2d9cb824db1779
3297+
languageName: node
3298+
linkType: hard
3299+
32943300
"redux-persist@npm:^6.0.0":
32953301
version: 6.0.0
32963302
resolution: "redux-persist@npm:6.0.0"
@@ -3300,24 +3306,6 @@ __metadata:
33003306
languageName: node
33013307
linkType: hard
33023308

3303-
"redux-thunk@npm:^2.4.1":
3304-
version: 2.4.1
3305-
resolution: "redux-thunk@npm:2.4.1"
3306-
peerDependencies:
3307-
redux: ^4
3308-
checksum: af5abb425fb9dccda02e5f387d6f3003997f62d906542a3d35fc9420088f550dc1a018bdc246c7d23ee852b4d4ab8b5c64c5be426e45a328d791c4586a3c6b6e
3309-
languageName: node
3310-
linkType: hard
3311-
3312-
"redux@npm:^4.1.2":
3313-
version: 4.2.0
3314-
resolution: "redux@npm:4.2.0"
3315-
dependencies:
3316-
"@babel/runtime": ^7.9.2
3317-
checksum: 75f3955c89b3f18edf5411e5fb482aa2e4f41a416183e8802a6bf6472c4fc3d47675b8b321d147f8af8e0f616436ac507bf5a25f1c4d6180e797b549c7db2c1d
3318-
languageName: node
3319-
linkType: hard
3320-
33213309
"regenerator-runtime@npm:^0.13.10":
33223310
version: 0.13.10
33233311
resolution: "regenerator-runtime@npm:0.13.10"
@@ -3350,13 +3338,6 @@ __metadata:
33503338
languageName: node
33513339
linkType: hard
33523340

3353-
"reselect@npm:^4.1.5":
3354-
version: 4.1.6
3355-
resolution: "reselect@npm:4.1.6"
3356-
checksum: 3ea1058422904063ec93c8f4693fe33dcb2178bbf417ace8db5b2c797a5875cf357d9308d11ed3942ee22507dd34ecfbf1f3a21340a4f31c206cab1d36ceef31
3357-
languageName: node
3358-
linkType: hard
3359-
33603341
"resolve-from@npm:^4.0.0":
33613342
version: 4.0.0
33623343
resolution: "resolve-from@npm:4.0.0"

0 commit comments

Comments
 (0)