mirror of
https://github.com/Lifeforge-app/lifeforge.git
synced 2026-06-30 15:56:04 +00:00
Former-commit-id: 764c6df62ba5bdcaa4b145603ca91feae8b6c3c7 [formerly 5273bb7c15f0bb047b6b14c54d7837de5c9c119f] [formerly 78b63544ec0b176416989dd0d478b0fe761c5bab [formerly e1fccb8f4e4c032d193902a1d2475ccb14e8e55e]] Former-commit-id: 4f517d251c61ef28c698d69c4cc78c5719995f66 [formerly e6e4bd71bf5ab6b18631065fd5f0d0337aa9a781] Former-commit-id: 67275f014f62f1f0483b9972053841b8b6d21917
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