Files
lifeforge/apps/mrt-map-builder
Melvin Chia 14e2170d57 refactor: update input field attributes from 'name' to 'label' to match new UI SDK
Former-commit-id: 064a3cabe545c8fc4ba760d0acf27b740071b0e1 [formerly 64ae7a291db3f74800c67d067ec3a834ff002511] [formerly 322799645eeed2555ee2014e9b19584826e19b96 [formerly ad0120bc188022431fa4e87d60f006799c003369]]
Former-commit-id: e8727b89aff979032f407acab0de78a8e22cd414 [formerly 605181cdf95c8f190c073e8bb6022dcf68fd42d3]
Former-commit-id: 09048dedfc4e9a93f966a7c3d0a990bd92d3e318
2025-08-24 11:02:47 +08:00
..
2025-07-31 06:50:51 +08:00
2025-07-31 06:50:51 +08:00
2025-07-31 06:50:51 +08:00
2025-07-31 17:40:28 +08:00
2025-07-31 06:50:51 +08:00
2025-07-31 06:50:51 +08:00
2025-07-31 06:50:51 +08:00
2025-07-31 06:50:51 +08:00
2025-07-31 06:50:51 +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 reactX from 'eslint-plugin-react-x'
import reactDom from 'eslint-plugin-react-dom'

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...
    },
  },
])