isairey GitHub avatar

SISMEDICO-FRONTEND

isairey

一个极简的Vite模板,用于React + TypeScript开发,包含HMR和ESLint配置指南。

Stars

4

7 天增长

暂无数据

Fork 数

3

开放 Issue

0

开源协议

MIT

最近更新

2026-07-30

AI 仓库情报摘要
FR-AI / ANALYSIS

为什么值得关注

提供精简的起点,附带官方Vite React插件以及面向生产环境的详细ESLint配置建议。

适合谁使用

  • React开发者
  • TypeScript开发者
  • 需要极简Vite配置的开发者
  • 配置React项目ESLint的开发者

典型使用场景

  • 使用Vite启动新的React项目
  • 在React中设置TypeScript
  • 配置ESLint以启用类型感知的lint规则
  • 添加React专属的lint规则

项目优势

  • 简洁且聚焦的模板
  • 开箱即用的热模块替换(HMR)
  • 官方Vite React插件(Oxc和SWC)
  • 详细的ESLint扩展指南,适配生产标准

使用前须知

  • 默认未启用React Compiler(性能影响)
  • ESLint配置需要手动更新以启用类型感知和React专属规则

README 快速开始

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:

React Compiler

The React Compiler is not enabled on this template because of its impact on dev & build performances. To add it, see this documentation.

Expanding the ESLint configuration

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

export default defineConfig([
  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 defineConfig([
  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 opti

相关仓库与替代方案

根据分类、Topic 和编程语言匹配的相似项目。

react
精选
react GitHub avatar

react

React is a JavaScript library for building user interfaces with declarative, component-based, and cross-platform design.

Web 开发前端框架
246,741
ddoemonn
ddoemonn GitHub avatar

interior

A collection of React micro-interaction components that handle the critical half-second after a click, with headless hooks for behavior and styled examples.

Web 开发前端框架
77
filipj9
filipj9 GitHub avatar

Hermes-Control-Deck

Hermes Control is a mobile-first PWA control deck that provides a unified event-driven interface for monitoring and operating Hermes WebUI and Codex CLI AI runtimes from a browser or phone.

AI 与机器学习AI Skills 与提示词
35