gitscope
https://dev.kronoz.win/r/marzneshin.git
dashboard/README.md · v0.3.0-alpha8
Source
1 88bd1b0 Mrdn 2y ago # React + TypeScript + Vite
2 88bd1b0 Mrdn 2y ago
3 88bd1b0 Mrdn 2y ago This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.
4 88bd1b0 Mrdn 2y ago
5 88bd1b0 Mrdn 2y ago Currently, two official plugins are available:
6 88bd1b0 Mrdn 2y ago
7 88bd1b0 Mrdn 2y ago - [@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
8 88bd1b0 Mrdn 2y ago - [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh
9 88bd1b0 Mrdn 2y ago
10 88bd1b0 Mrdn 2y ago ## Expanding the ESLint configuration
11 88bd1b0 Mrdn 2y ago
12 88bd1b0 Mrdn 2y ago If you are developing a production application, we recommend updating the configuration to enable type aware lint rules:
13 88bd1b0 Mrdn 2y ago
14 88bd1b0 Mrdn 2y ago - Configure the top-level `parserOptions` property like this:
15 88bd1b0 Mrdn 2y ago
16 88bd1b0 Mrdn 2y ago ```js
17 88bd1b0 Mrdn 2y ago export default {
18 88bd1b0 Mrdn 2y ago // other rules...
19 88bd1b0 Mrdn 2y ago parserOptions: {
20 88bd1b0 Mrdn 2y ago ecmaVersion: 'latest',
21 88bd1b0 Mrdn 2y ago sourceType: 'module',
22 88bd1b0 Mrdn 2y ago project: ['./tsconfig.json', './tsconfig.node.json'],
23 88bd1b0 Mrdn 2y ago tsconfigRootDir: __dirname,
24 88bd1b0 Mrdn 2y ago },
25 88bd1b0 Mrdn 2y ago }
26 88bd1b0 Mrdn 2y ago ```
27 88bd1b0 Mrdn 2y ago
28 88bd1b0 Mrdn 2y ago - Replace `plugin:@typescript-eslint/recommended` to `plugin:@typescript-eslint/recommended-type-checked` or `plugin:@typescript-eslint/strict-type-checked`
29 88bd1b0 Mrdn 2y ago - Optionally add `plugin:@typescript-eslint/stylistic-type-checked`
30 88bd1b0 Mrdn 2y ago - Install [eslint-plugin-react](https://github.com/jsx-eslint/eslint-plugin-react) and add `plugin:react/recommended` & `plugin:react/jsx-runtime` to the `extends` list