mirror of
https://github.com/Lifeforge-app/lifeforge.git
synced 2026-06-28 06:46:24 +00:00
Former-commit-id: 3abfaa8bd2b2edbdb70d0c5a172ba70149df2272 [formerly c3b95cb43418f5ac00e12501f20419130515553f] [formerly b5331347b286a7ffb8c2e5c87725aba2d34f3d9b [formerly bf45c0865e9210c697955f080f23be446a2dd0cd]] Former-commit-id: ee07b01290dd4cd2676ca9265f9c47cbc390e849 [formerly 28c753938c75f57beeb5cb18e84a6599e16a3434] Former-commit-id: ea1684597d2cd0971bed25c4727a3a2b7e214b87
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