Files
lifeforge/apps/apiBuilder/README.md
melvinchia3636 48210f2d71 feat(server): move all localization files into client
Former-commit-id: 75c6fa78efdb42f7bd65c59cb4e3467aabadcad5 [formerly d9e692745e63aa781d7cf12908d792b0deacdfb1] [formerly 2b3d798425ffcd7064fac640433366b7a574fd29 [formerly d9856e49f19341a8413d5b9391fac940305b5678]]
Former-commit-id: 8389997051cd928e4b60287e42177e0f233575b8 [formerly 429a8e32277f66a69bb00368765dc719a8da5313]
Former-commit-id: 12a8c5cd96e1bf0880c509b54bc34b7bba76e976
2025-09-08 19:53:46 +08:00

2.2 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:

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([
  globalIgnores(['dist']),
  {
    files: ['**/*.{ts,tsx}'],
    extends: [
      // Other configs...

      // 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

      // Other configs...
    ],
    languageOptions: {
      parserOptions: {
        project: ['./tsconfig.node.json', './tsconfig.app.json'],
        tsconfigRootDir: import.meta.dirname
      }
      // other options...
    }
  }
])

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([
  globalIgnores(['dist']),
  {
    files: ['**/*.{ts,tsx}'],
    extends: [
      // Other configs...
      // Enable lint rules for React
      reactX.configs['recommended-typescript'],
      // Enable lint rules for React DOM
      reactDom.configs.recommended
    ],
    languageOptions: {
      parserOptions: {
        project: ['./tsconfig.node.json', './tsconfig.app.json'],
        tsconfigRootDir: import.meta.dirname
      }
      // other options...
    }
  }
])