mirror of
https://github.com/Lifeforge-app/lifeforge.git
synced 2026-07-01 08:16:35 +00:00
Former-commit-id: 35a9466bf1c6ab76a3661572d462629db63627ef [formerly a5a76a5a0d32707cbc64da97aaf0bb47c38d38b7] [formerly 1367e1ce733eb5de793bf57c0593a421f5037d61 [formerly 3e422f73ac87b543a0aaaea2e3de35fd3ab07d0d]] Former-commit-id: 640847dab31327c4fe256276e5266378b7580ade [formerly ab6dfc75784b5ab327135db06b8f171bfb66ac48] Former-commit-id: 9dccac672972db4e1d9b8b95364727d7de5fbaa1
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