1+ # Get started
2+
3+ ## Install
4+
5+ 1 . Установить NodeJS 20.19 or above (https://nodejs.org/en/download )
6+ 2 . Проверьте версию Node.js ` node -v `
7+ 3 . ` npm ci `
8+ 4 . Сгенерировать файл сервис воркера для работы моков ` npx msw init ./public --save `
9+ 5 . Создайть файл .env.local и прописать в нем ` VITE_MSW=true `
10+
11+ ## Build
12+
13+ 1 . ` npm run build `
14+
15+ ## Development
16+
17+ 1 . ` npm run dev `
18+ 2 . Открыть http://localhost:5173/
19+
120# React + TypeScript + Vite
221
322This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.
@@ -13,9 +32,9 @@ If you are developing a production application, we recommend updating the config
1332
1433``` js
1534export default tseslint .config ([
16- globalIgnores ([' dist' ]),
35+ globalIgnores ([" dist" ]),
1736 {
18- files: [' **/*.{ts,tsx}' ],
37+ files: [" **/*.{ts,tsx}" ],
1938 extends: [
2039 // Other configs...
2140
@@ -30,40 +49,40 @@ export default tseslint.config([
3049 ],
3150 languageOptions: {
3251 parserOptions: {
33- project: [' ./tsconfig.node.json' , ' ./tsconfig.app.json' ],
52+ project: [" ./tsconfig.node.json" , " ./tsconfig.app.json" ],
3453 tsconfigRootDir: import .meta.dirname,
3554 },
3655 // other options...
3756 },
3857 },
39- ])
58+ ]);
4059```
4160
4261You can also install [ eslint-plugin-react-x] ( https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-x ) and [ eslint-plugin-react-dom] ( https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-dom ) for React-specific lint rules:
4362
4463``` js
4564// eslint.config.js
46- import reactX from ' eslint-plugin-react-x'
47- import reactDom from ' eslint-plugin-react-dom'
65+ import reactX from " eslint-plugin-react-x" ;
66+ import reactDom from " eslint-plugin-react-dom" ;
4867
4968export default tseslint .config ([
50- globalIgnores ([' dist' ]),
69+ globalIgnores ([" dist" ]),
5170 {
52- files: [' **/*.{ts,tsx}' ],
71+ files: [" **/*.{ts,tsx}" ],
5372 extends: [
5473 // Other configs...
5574 // Enable lint rules for React
56- reactX .configs [' recommended-typescript' ],
75+ reactX .configs [" recommended-typescript" ],
5776 // Enable lint rules for React DOM
5877 reactDom .configs .recommended ,
5978 ],
6079 languageOptions: {
6180 parserOptions: {
62- project: [' ./tsconfig.node.json' , ' ./tsconfig.app.json' ],
81+ project: [" ./tsconfig.node.json" , " ./tsconfig.app.json" ],
6382 tsconfigRootDir: import .meta.dirname,
6483 },
6584 // other options...
6685 },
6786 },
68- ])
87+ ]);
6988```
0 commit comments