···11+# React + TypeScript + Vite
22+33+This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.
44+55+Currently, two official plugins are available:
66+77+- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react) uses [Babel](https://babeljs.io/) for Fast Refresh
88+- [@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
99+1010+## Expanding the ESLint configuration
1111+1212+If you are developing a production application, we recommend updating the configuration to enable type-aware lint rules:
1313+1414+```js
1515+export default tseslint.config([
1616+ globalIgnores(['dist']),
1717+ {
1818+ files: ['**/*.{ts,tsx}'],
1919+ extends: [
2020+ // Other configs...
2121+2222+ // Remove tseslint.configs.recommended and replace with this
2323+ ...tseslint.configs.recommendedTypeChecked,
2424+ // Alternatively, use this for stricter rules
2525+ ...tseslint.configs.strictTypeChecked,
2626+ // Optionally, add this for stylistic rules
2727+ ...tseslint.configs.stylisticTypeChecked,
2828+2929+ // Other configs...
3030+ ],
3131+ languageOptions: {
3232+ parserOptions: {
3333+ project: ['./tsconfig.node.json', './tsconfig.app.json'],
3434+ tsconfigRootDir: import.meta.dirname,
3535+ },
3636+ // other options...
3737+ },
3838+ },
3939+])
4040+```
4141+4242+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:
4343+4444+```js
4545+// eslint.config.js
4646+import reactX from 'eslint-plugin-react-x'
4747+import reactDom from 'eslint-plugin-react-dom'
4848+4949+export default tseslint.config([
5050+ globalIgnores(['dist']),
5151+ {
5252+ files: ['**/*.{ts,tsx}'],
5353+ extends: [
5454+ // Other configs...
5555+ // Enable lint rules for React
5656+ reactX.configs['recommended-typescript'],
5757+ // Enable lint rules for React DOM
5858+ reactDom.configs.recommended,
5959+ ],
6060+ languageOptions: {
6161+ parserOptions: {
6262+ project: ['./tsconfig.node.json', './tsconfig.app.json'],
6363+ tsconfigRootDir: import.meta.dirname,
6464+ },
6565+ // other options...
6666+ },
6767+ },
6868+])
6969+```