mirror of
https://github.com/Lifeforge-app/lifeforge.git
synced 2026-06-29 23:35:55 +00:00
Former-commit-id: 9d7e5d8020b3a85db232b3e2e244e943562f675c [formerly 84524c6249beaa375c30c03ee7bda46421e23add] [formerly 7cfef4c7dfb0acf6602a3f375e9e0cba74b65ecb [formerly 335184cae12876996fd182fa95d2195344d8e44c]] Former-commit-id: 7d83bfee351715b9827b89407446bd325d793cfd [formerly 38a644ed7de37442463f2f97a39e1b56666dbe78] Former-commit-id: 491bed9115a21a0ff699356e6674d76e35c3cc7f
1.3 KiB
1.3 KiB
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