mirror of
https://github.com/Lifeforge-app/lifeforge.git
synced 2026-06-28 06:46:24 +00:00
Former-commit-id: 7b2512d7f4cdabeb4501f2440381190288e7057c [formerly 5fa5d7014705073fa927676c5a7e0b1d5b72b66f] [formerly 67dced63a7eeee9fd9cb98989835608c1eb752ba [formerly 96b0f220e7c7628a2c0fd47783d6a94b835cfb96]] Former-commit-id: dfe9ffc358c58c466b32b0133bd594e1439f5ef2 [formerly 0bfedae55cfe8e9702ae972fe8c60394631528a8] Former-commit-id: c92775235a8ac2a6f8466f2c071524fa33b92073
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