Files
lifeforge/apps/api-builder
Melvin Chia 9f4f4ab671 refactor: Refactor various components from lifeforge-ui to meet the new props definitions
Former-commit-id: ecb4687df50a31e421aaa0c6105846d5df2c47df [formerly 3de4c063a07dd4bc75432373f47c60f01f5a8171] [formerly 97940d4b9d343e8651f5614a3a580cca4223c57a [formerly fcd17b62bbe7e3955bcb4e8150878b305b45f3af]]
Former-commit-id: 5445c8be84753f83feaf6afe7406bdbefaad6dea [formerly a25cb548052e63ac8bda716dc4197af3bf697c8a]
Former-commit-id: c64dc0f5b08b03a13d772838e01ab4af0af2dab9
2025-08-15 19:28:02 +08:00
..
2025-07-21 07:05:42 +08:00
2025-07-21 07:05:42 +08:00
2025-08-12 09:37:54 +08:00
2025-08-11 11:35:51 +08:00
2025-07-21 07:05:42 +08:00
2025-08-11 11:35:51 +08:00
2025-07-21 07:05:42 +08:00
2025-07-21 07:05:42 +08:00
2025-07-21 07:05:42 +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([
  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...
    }
  }
])