mirror of
https://github.com/Lifeforge-app/lifeforge.git
synced 2026-07-01 08:16:35 +00:00
Former-commit-id: 1b8dc6c18879932d5d1c42b100affcba6539493a [formerly 5f3cd509572512aeab16f0b585e35e9588fcbdac] [formerly 97c47212ec8ff79bfb784a56dc6dcf432b564325 [formerly 4722793986bc917ef73af72a80e59987f06693b0]] Former-commit-id: c494e5082caefd405acbbcb6d672f833eea6e5e3 [formerly 923bca4484b9961386e60ffc49c0dd77e16eedb1] Former-commit-id: 4ce8b97b4bb97dcbce15b7f336dbd42bc0623aa5
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