mirror of
https://github.com/Lifeforge-app/lifeforge.git
synced 2026-07-01 08:16:35 +00:00
Former-commit-id: 0bdf280c935499bb51348bbdfe2848953c98b6f8 [formerly 4b2372901989ed51ebf098fd0811d0c614c28546] [formerly bc324e6cfd955cad75d0149c8de1540fc3c918e6 [formerly 78cd1c88880cd3d0e175d1502e818f201953b7bb]] Former-commit-id: 8a3d4db8b136f7a82e6596b305e61643a07cf514 [formerly d58f8f658d7ada85d0781d1f8d91e0c571433bbe] Former-commit-id: f055b94fb95ffb0b9beea4adf4908c50741dfc9d
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