|
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) uses [Babel](https://babeljs.io/) for Fast Refresh |
8 | | -- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react/blob/main/packages/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 | | -```js |
15 | | -export default tseslint.config({ |
16 | | - extends: [ |
17 | | - // Remove ...tseslint.configs.recommended and replace with this |
18 | | - ...tseslint.configs.recommendedTypeChecked, |
19 | | - // Alternatively, use this for stricter rules |
20 | | - ...tseslint.configs.strictTypeChecked, |
21 | | - // Optionally, add this for stylistic rules |
22 | | - ...tseslint.configs.stylisticTypeChecked, |
23 | | - ], |
24 | | - languageOptions: { |
25 | | - // other options... |
26 | | - parserOptions: { |
27 | | - project: ['./tsconfig.node.json', './tsconfig.app.json'], |
28 | | - tsconfigRootDir: import.meta.dirname, |
29 | | - }, |
30 | | - }, |
31 | | -}) |
| 1 | +@ -1,55 +0,0 @@ |
| 2 | +# React TS Boilerplate |
| 3 | + |
| 4 | +## Technology Stack |
| 5 | + |
| 6 | +- [Vite](https://vitejs.dev): Efficient build tool for modern browsers. |
| 7 | +- [React](https://reactjs.org): JavaScript library for building user interfaces. |
| 8 | +- [TypeScript](https://www.typescriptlang.org): Superset of JavaScript with static type-checking. |
| 9 | +- [Ramda](https://ramdajs.com/): Functional programming library for JavaScript. |
| 10 | +- [Zustand](https://zustand-demo.pmnd.rs/): Small, fast and scaleable bearbones state-management solution. |
| 11 | + |
| 12 | +## Quick Start |
| 13 | + |
| 14 | +Install project dependencies |
| 15 | + |
| 16 | +``` |
| 17 | +pnpm install |
32 | 18 | ``` |
33 | 19 |
|
34 | | -You 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: |
35 | | - |
36 | | -```js |
37 | | -// eslint.config.js |
38 | | -import reactX from 'eslint-plugin-react-x' |
39 | | -import reactDom from 'eslint-plugin-react-dom' |
40 | | - |
41 | | -export default tseslint.config({ |
42 | | - plugins: { |
43 | | - // Add the react-x and react-dom plugins |
44 | | - 'react-x': reactX, |
45 | | - 'react-dom': reactDom, |
46 | | - }, |
47 | | - rules: { |
48 | | - // other rules... |
49 | | - // Enable its recommended typescript rules |
50 | | - ...reactX.configs['recommended-typescript'].rules, |
51 | | - ...reactDom.configs.recommended.rules, |
52 | | - }, |
53 | | -}) |
| 20 | +Launch the app, it will become available at [http://localhost:3000](http://localhost:3000/) |
| 21 | + |
| 22 | +``` |
| 23 | +pnpm dev |
54 | 24 | ``` |
| 25 | + |
| 26 | +## Project Standards |
| 27 | + |
| 28 | +- xxx |
| 29 | +- xxx |
| 30 | +- xxx |
| 31 | + |
| 32 | +## Directory Structure |
| 33 | + |
| 34 | +`βββ`[`.vscode`](.vscode) β VSCode settings including code snippets, recommended extensions etc<br> |
| 35 | +`βββ`[`public`](./public) β Static assets such as robots.txt, index.html etc<br> |
| 36 | +`βββ`[`src/assets`](./src/assets) β Static assets<br> |
| 37 | +`βββ`[`src/components`](./src/components) β React public components<br> |
| 38 | +`βββ`[`src/hooks`](./src/hooks) β React public hooks<br> |
| 39 | +`βββ`[`src/stores`](./src/stores) β Status Management<br> |
| 40 | +`βββ`[`src/pages`](./src/pages) β Application and page (screen) components<br> |
| 41 | +`βββ`[`src/routes`](./src/routes) β Application routes components<br> |
| 42 | +`βββ`[`src/theme`](./src/services) β External connection service<br> |
| 43 | +`βββ`[`src/utils`](./src/utils) β Utility functions<br> |
| 44 | + |
| 45 | +## Recommended VSCode Extensions |
| 46 | + |
| 47 | +- [Tailwind CSS IntelliSense](https://marketplace.visualstudio.com/items?itemName=bradlc.vscode-tailwindcss): IntelliSense for Tailwind CSS. |
| 48 | +- [Prettier - Code formatter](https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode&ssr=false#overview): Code formatting tool. |
| 49 | +- [EditorConfig for VS Code](https://marketplace.visualstudio.com/items?itemName=EditorConfig.EditorConfig): Editor configuration consistency. |
| 50 | + |
| 51 | +## Coding Conventions |
| 52 | + |
| 53 | +- Check [here](https://github.com/sj-distributor/react-coding-conventions). |
0 commit comments