mirror of
https://github.com/Lifeforge-app/lifeforge.git
synced 2026-06-29 15:25:50 +00:00
Former-commit-id: 6ad2fac2e9cab83dd484e90e80732067d22616e8 [formerly 0834b7e2aaeb6a04e31f5f04cf88f01b2c256986] [formerly a4dcf0af4dfe6fcf744184676baa2d4caeb40fc7 [formerly 9632ffb6671d8f30ca33c51bda106c299a4c07da]] Former-commit-id: 23ac95ccea08e36479fe17ac5ae4c2bdc4d77119 [formerly 450788517ac9fabdc16607b8f41785bb5c55917e] Former-commit-id: 256d0df6be62899478c8a3a5258f296649f4672d
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