|
1 | 1 | # wildcat-dashboard-ui |
2 | 2 |
|
3 | | -## React + TypeScript + Vite |
| 3 | +## Development |
4 | 4 |
|
5 | | -This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules. |
6 | | - |
7 | | -Currently, two official plugins are available: |
8 | | - |
9 | | -- [@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 |
10 | | -- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh |
11 | | - |
12 | | -### Expanding the ESLint configuration |
13 | | - |
14 | | -If you are developing a production application, we recommend updating the configuration to enable type aware lint rules: |
15 | | - |
16 | | -- Configure the top-level `parserOptions` property like this: |
17 | | - |
18 | | -```js |
19 | | -export default tseslint.config({ |
20 | | - languageOptions: { |
21 | | - // other options... |
22 | | - parserOptions: { |
23 | | - project: ['./tsconfig.node.json', './tsconfig.app.json'], |
24 | | - tsconfigRootDir: import.meta.dirname, |
25 | | - }, |
26 | | - }, |
27 | | -}) |
| 5 | +### Install |
| 6 | +``` |
| 7 | +npm install |
28 | 8 | ``` |
29 | 9 |
|
30 | | -- Replace `tseslint.configs.recommended` to `tseslint.configs.recommendedTypeChecked` or `tseslint.configs.strictTypeChecked` |
31 | | -- Optionally add `...tseslint.configs.stylisticTypeChecked` |
32 | | -- Install [eslint-plugin-react](https://github.com/jsx-eslint/eslint-plugin-react) and update the config: |
33 | | - |
34 | | -```js |
35 | | -// eslint.config.js |
36 | | -import react from 'eslint-plugin-react' |
37 | | - |
38 | | -export default tseslint.config({ |
39 | | - // Set the react version |
40 | | - settings: { react: { version: '18.3' } }, |
41 | | - plugins: { |
42 | | - // Add the react plugin |
43 | | - react, |
44 | | - }, |
45 | | - rules: { |
46 | | - // other rules... |
47 | | - // Enable its recommended rules |
48 | | - ...react.configs.recommended.rules, |
49 | | - ...react.configs['jsx-runtime'].rules, |
50 | | - }, |
51 | | -}) |
| 10 | +### Run |
| 11 | +``` |
| 12 | +npm run dev |
52 | 13 | ``` |
53 | 14 |
|
54 | 15 | ### shadcn |
55 | | -See https://ui.shadcn.com/docs/tailwind-v4 |
56 | | -e.g. add a component |
| 16 | +Add a shadcn component: |
57 | 17 | ```shell |
58 | 18 | npx shadcn@canary add button |
59 | 19 | ``` |
| 20 | + |
| 21 | +## Resources |
| 22 | + |
| 23 | +- React: https://react.dev/ |
| 24 | +- Vite: https://vite.dev/ |
| 25 | +- Tailwind: https://tailwindcss.com/ |
| 26 | +- Shadcn: https://ui.shadcn.com/docs/tailwind-v4 |
0 commit comments