mirror of
https://github.com/Lifeforge-app/lifeforge.git
synced 2026-06-29 07:15:48 +00:00
Former-commit-id: e7b453043e8c63e15efd6f3a225cef2f274df748 [formerly 098f270e72506b693cf0634557c83d59313be22b] [formerly 6a330daf3c93d211b6d85c04b2e4c104d96cd6fb [formerly 48557c9fc60807399841ceec97cc65f616a36e40]] Former-commit-id: 9fc67af933ec8744647cb36c749c0b97b407c679 [formerly 88d7f03bcbb744f0b5bbb334e28465441d3a0ef3] Former-commit-id: a9047b6f894153e9fc22f48c7548eaca2eccd90c
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