You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

README.md 1.2KB

123456789101112131415161718192021222324252627
  1. # React + TypeScript + Vite
  2. This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.
  3. Currently, two official plugins are available:
  4. - [@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
  5. - [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh
  6. ## Expanding the ESLint configuration
  7. If you are developing a production application, we recommend updating the configuration to enable type aware lint rules:
  8. - Configure the top-level `parserOptions` property like this:
  9. ```js
  10. parserOptions: {
  11. ecmaVersion: 'latest',
  12. sourceType: 'module',
  13. project: ['./tsconfig.json', './tsconfig.node.json'],
  14. tsconfigRootDir: __dirname,
  15. },
  16. ```
  17. - Replace `plugin:@typescript-eslint/recommended` to `plugin:@typescript-eslint/recommended-type-checked` or `plugin:@typescript-eslint/strict-type-checked`
  18. - Optionally add `plugin:@typescript-eslint/stylistic-type-checked`
  19. - 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