-ui-kit-mz

中文文档
0.0.2发布于 2025/06/17TypeScriptESM + CJS

This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.

原始使用文档

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 reactX from 'eslint-plugin-react-x'
import reactDom from 'eslint-plugin-react-dom'

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

版本与发布记录

-ui-kit-mz 共发布 2 个版本,首次发布于 2025/06/17;过去 12 个月发布了 0 个版本。

版本发布日期距今
0.0.2latest2025/06/171.4 年前
0.0.12025/06/171.4 年前

关于 -ui-kit-mz 的常见问题

-ui-kit-mz 是什么?

这个模板提供了一个最小的设置,让React在Vite中使用HMR和一些ESLint规则工作。

如何安装 -ui-kit-mz?

在项目目录运行 npm install -- -ui-kit-mz,或使用 pnpm add / yarn add / bun add。它还需要宿主项目提供 peer 依赖:react(*)、react-dom(*)。npm 7 及以上与 pnpm 8 及以上默认会自动安装必需的 peer 依赖,Yarn 需要手动安装。

-ui-kit-mz 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

-ui-kit-mz 支持 ESM 还是 CommonJS?

同时提供 ES Module 与 CommonJS 入口,import 和 require() 都可以使用,打包工具会自动选择合适的版本。

-ui-kit-mz 可以商用吗?

-ui-kit-mz 使用 未声明 许可。package.json 没有声明许可证。没有许可证的代码默认保留全部权利,商用前请联系作者或查看仓库中的 LICENSE 文件。以上为概括,不构成法律意见,请以许可原文为准。

-ui-kit-mz 还在维护吗?

最新版本 0.0.2 发布于 2025/06/17(1.4 年前);至今共发布 2 个版本,其中过去 12 个月发布了 0 个;首次发布于 2025/06/17。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。