mirror of
https://github.com/Lifeforge-app/lifeforge.git
synced 2026-06-28 06:46:24 +00:00
Former-commit-id: 0f0114a7704a5ca63b3fb95fbbfa50d5d5d014d9 [formerly af6665f8f54fcca4adc1f97c28a070ece6ddd576] [formerly 1348dd937ea34e7e2ab2bb049f50428080e527a5 [formerly 8c3e6f58fbf036f129f4b80c0d762dc0329a53ea]] Former-commit-id: dc5732d550b70aab142d0a37464195e48c0d2963 [formerly 9f74b066e0cdf499897929c7dfc39abcb5163558] Former-commit-id: 08668deb31a8ad7f5bc354607d607612b285a7b5
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