mirror of
https://github.com/Lifeforge-app/lifeforge.git
synced 2026-06-28 14:55:45 +00:00
Former-commit-id: f8290f544c8e87e93ee9966243b96b020a3fc9e5 [formerly 6adc3aa708c43f1b135fe80243cb1687192318ac] [formerly ca6f3b8afde68958c67b8f53092a34f8fe5b9044 [formerly 20fac923b9cd6acfa7005da6474ee0e8edc0698a]] Former-commit-id: 947ad6c18298b2c345515dcf964ecbfc4baf341e [formerly 55be06f4a438fd76c82f25a90de4593f91eea154] Former-commit-id: c464c0ebf094fdcf96f1d6d873910e466d603a51
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