mirror of
https://github.com/Lifeforge-app/lifeforge.git
synced 2026-06-30 07:46:04 +00:00
Former-commit-id: 5a49a08aa56d45590b30da0a9fb1662bfa9f7509 [formerly 3a567cd978e6d21c56ed7c8aca1e790e084d0ec9] [formerly e24cf09e249b0cbf464824723c346ed7bb5a2fc4 [formerly e18246d308f726ef6373fd431cb14eb1cc66e376]] Former-commit-id: 7c0a3f07dec00038235b725fd06ed42224968790 [formerly 69b0886017a5627e294f01d6ae187fdc6b8b2ba1] Former-commit-id: 3f47e5e79cdd2ebf491cd9f383ac4f734bb8f754
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