Files
lifeforge/client
Melvin Chia 2071170e14 fix(deps): update react and react-dom versions to use caret notation for compatibility
Former-commit-id: ee8de5dd98a4abf3dbc1c430e10ac04dd0f9d08a [formerly 33e7342daff56aae2d44f1d9fe91eacfc67f64f6] [formerly 9242f3fa84774747195a29e2742ff035b21e858b [formerly 02d72f6f42c6a3fd0e0041991b78e4867a1a398a]]
Former-commit-id: 8746416c942543ce6a412b32c2a24454d20464d0 [formerly 9305ee6c162b4be0836036aec3efda9d0134ca46]
Former-commit-id: c44657d719e22b3e403adb7c76c36688c04e7402
2025-10-28 10:57:12 +08:00
..
2025-08-01 00:11:35 +08:00
2025-07-19 00:10:10 +08:00

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:

Expanding the ESLint configuration

If you are developing a production application, we recommend updating the configuration to enable type-aware lint rules:

export default tseslint.config({
  extends: [
    // Remove ...tseslint.configs.recommended and replace with this
    ...tseslint.configs.recommendedTypeChecked,
    // Alternatively, use this for stricter rules
    ...tseslint.configs.strictTypeChecked,
    // Optionally, add this for stylistic rules
    ...tseslint.configs.stylisticTypeChecked
  ],
  languageOptions: {
    // other options...
    parserOptions: {
      project: ['./tsconfig.node.json', './tsconfig.app.json'],
      tsconfigRootDir: import.meta.dirname
    }
  }
})

You can also install eslint-plugin-react-x and eslint-plugin-react-dom for React-specific lint rules:

// eslint.config.js
import reactDom from 'eslint-plugin-react-dom'
import reactX from 'eslint-plugin-react-x'

export default tseslint.config({
  plugins: {
    // Add the react-x and react-dom plugins
    'react-x': reactX,
    'react-dom': reactDom
  },
  rules: {
    // other rules...
    // Enable its recommended typescript rules
    ...reactX.configs['recommended-typescript'].rules,
    ...reactDom.configs.recommended.rules
  }
})