mirror of
https://github.com/Lifeforge-app/lifeforge.git
synced 2026-06-30 07:46:04 +00:00
Former-commit-id: b4682e28197b43c3935813cb77e37262358b4f23 [formerly 81b7404107f01d7c04dab80cfe604d69a4681b8e] [formerly c501f161c8123e354740d268818888ae6d007819 [formerly c9af822fa445507f3d4cec6507e25df5cbdcd1c8]] Former-commit-id: 0305b375ffbb9b84a7b87aa1e94a28ffd10659a2 [formerly c4e3ee242bfe9a4f8f0c952621e9c32565715004] Former-commit-id: 671b3160412545a58fbd942457e90dc451754398
React + TypeScript + Vite
This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.
Currently, two official plugins are available:
- @vitejs/plugin-react uses Babel for Fast Refresh
- @vitejs/plugin-react-swc uses SWC for Fast Refresh
Expanding the ESLint configuration
If you are developing a production application, we recommend updating the configuration to enable type aware lint rules:
- Configure the top-level
parserOptionsproperty like this:
export default {
// other rules...
parserOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
project: ['./tsconfig.json', './tsconfig.node.json'],
tsconfigRootDir: __dirname
}
}
- Replace
plugin:@typescript-eslint/recommendedtoplugin:@typescript-eslint/recommended-type-checkedorplugin:@typescript-eslint/strict-type-checked - Optionally add
plugin:@typescript-eslint/stylistic-type-checked - Install eslint-plugin-react and add
plugin:react/recommended&plugin:react/jsx-runtimeto theextendslist