mirror of
https://github.com/Lifeforge-app/lifeforge.git
synced 2026-06-28 23:05:48 +00:00
Former-commit-id: 511cd51dba90d995c6350d63f78ae0f9e3faa82c [formerly 3c0dabe0accf3609daaed61cdca1efab6566c898] [formerly 34b84f106f017e24d2861b3ab86c50c3bf841ddd [formerly 9e9c38a8f9f75976c9016bfccf1a8155732f905a]] Former-commit-id: 51daf00d5a31bbb62343bc2e361527c4846da3c4 [formerly a8e6c77e5651424a1bca15d375e639d4deb5c83b] Former-commit-id: 65b781928735aa976b620fa04457762bbb26601b
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