mirror of
https://github.com/Lifeforge-app/lifeforge.git
synced 2026-06-28 06:46:24 +00:00
Former-commit-id: 3af26994218fe3f84298d9ec54a73807d576313b [formerly 31f091261aa80eb7be39feed971553f50720bf3d] [formerly c50db32eb9c4e058dd7e85cbd33ce8828de8b7a1 [formerly 3ccb922867d8d344613f7889aa815cbfd9d59d61]] Former-commit-id: 483a9a9a88e2baaf992d9957a8288fd1ddfb229a [formerly d2ebb4780f0f2dab4b2b5b4aa5bcd6590dec5c76] Former-commit-id: 918db4445dbfa1505a0b971e60b23d5088f00f6e
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