# @devoxa/eslint-config 中文文档

规范地址：https://npmcn.com/package/%40devoxa/eslint-config/

版本：4\.0\.2
npm 元数据更新时间：2024-12-17T08:04:49.798Z
中文译文更新时间：2026-11-12T03:55:19.589Z
软件包许可：MIT

本文由上游 README 翻译，可能存在偏差，请结合原文核对 API、命令与配置。版权与许可归原作者所有。

原始 npm 页面：https://www.npmjs.com/package/%40devoxa/eslint-config
原文对照：https://npmcn.com/package/%40devoxa/eslint-config/?lang=original
源码仓库：https://github.com/devoxa/eslint-config

## 关键信息（来自 npm 元数据）

- 包体积（解压后）：13.8 kB，17 个文件
- 模块格式：CommonJS
- TypeScript 类型：未声明
- 运行依赖：6 个
- peer 依赖：eslint ^9\.0\.0，typescript ^4\.0\.0 \|\| ^5\.0\.0
- 首次发布：2020-06-11T19:19:57.296Z
- 最新版本发布：2024-12-17T08:04:49.610Z
- 近 30 天下载量：10428（2026-10-12 至 2026-11-10，npm 官方下载统计）
- 已发布版本数：28（近 12 个月 0 个）

## 中文简介

用于所有 Devoxa 项目的 ESLint 可共享配置

## 安装

```sh
npm install @devoxa/eslint-config
```

也可以使用：`pnpm add @devoxa/eslint-config`、`yarn add @devoxa/eslint-config`、`bun add @devoxa/eslint-config`

## README

# 埃斯林特配置

#### 这个 [可共享配置](https://eslint.org/docs/developer-guide/shareable-configs) 页:1 [ESLint 语录](https://eslint.org/) 用于所有 Devoxa 项目

 [![Package Version](https://img.shields.io/npm/v/@devoxa/eslint-config?style=flat-square)](https://www.npmjs.com/package/@devoxa/eslint-config)[![Build Status](https://img.shields.io/github/actions/workflow/status/devoxa/eslint-config/push.yml?branch=master&style=flat-square)](https://github.com/devoxa/eslint-config/actions?query=branch%3Amaster+workflow%3A%22Continuous+Integration%22)

[安装](https://npmcn.com/package/%40devoxa/eslint-config/#readme-installation) 二. 支助 [使用量](https://npmcn.com/package/%40devoxa/eslint-config/#readme-usage) 二. 支助 [扩展](https://npmcn.com/package/%40devoxa/eslint-config/#readme-extending) 二. 支助 [贡献者](https://npmcn.com/package/%40devoxa/eslint-config/#readme-contributors) 二. 支助 [许可证](https://npmcn.com/package/%40devoxa/eslint-config/#readme-license)

  

## 安装

```bash
yarn add --dev eslint @devoxa/eslint-config
```

配置还依赖于对等关系 `typescript@^3.9.2`。 。 。 .

## 使用量

为启用规则,增加: `eslint.config.js` 文件到您的项目。 见 [ESLint 配置文件](https://eslint.org/docs/user-guide/configuring) 更多细节.

```js
const config = require('@devoxa/eslint-config')

module.exports = config({
  // (Recommended) Files (in gitignore syntax) that will be transformed into ignore configs
  ignoreFiles: ['.gitignore'],

  // (Optional) Additional configs that will be spread into the main config
  // See https://typescript-eslint.io/packages/typescript-eslint#config
  configs: [
    /* ... */
  ],
})
```

由于 ESLint 配置是用于 TypeScript 工程,因此还需要您有一个 `tsconfig.json` 文件已配置.

也建议在您 `package.json` 方便地使用.

```json
"lint": "eslint '{src,tests}/**/*.{ts,tsx}'"
```

此外,建议安装 [VS 代码扩展](https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint) 改为 得到编辑警告.

## 扩展

此配置无意被更改, 但如果您有修改所在的设置 要求,这是可能的。 要扩展配置, 您可以使用 `configs` 选项 见上文.

## 贡献者

感谢这些伟大的人[emoji 密钥](https://allcontributors.org/docs/en/emoji-key):

<table><tbody><tr><td align="center"><a href="https://www.david-reess.de/" rel="nofollow noopener noreferrer"><img alt="" src="https://avatars3.githubusercontent.com/u/4615516?v=4" width="75px;" loading="lazy" decoding="async" referrerpolicy="no-referrer"><br><sub><b>大卫·瑞斯</b></sub></a><br><a href="https://github.com/devoxa/eslint-config/commits?author=queicherius" title="Code" rel="nofollow noopener noreferrer">💻</a> <a href="https://github.com/devoxa/eslint-config/commits?author=queicherius" title="Documentation" rel="nofollow noopener noreferrer">📖</a> <a href="https://github.com/devoxa/eslint-config/commits?author=queicherius" title="Tests" rel="nofollow noopener noreferrer">⚠️</a></td></tr></tbody></table>

本项目遵循 [全部贡献者](https://github.com/all-contributors/all-contributors) 规格。 任何捐款都欢迎!

## 许可证

麻省理工学院

## 常见问题

### @devoxa/eslint-config 是什么？

用于所有 Devoxa 项目的 ESLint 可共享配置

### 如何安装 @devoxa/eslint-config？

在项目目录运行 npm install @devoxa/eslint-config，或使用 pnpm add / yarn add / bun add。它还需要宿主项目提供 peer 依赖：eslint（^9\.0\.0）、typescript（^4\.0\.0 \|\| ^5\.0\.0）。npm 7 及以上与 pnpm 8 及以上默认会自动安装必需的 peer 依赖，Yarn 需要手动安装。

### @devoxa/eslint-config 支持 TypeScript 吗？

该包的 package\.json 没有声明类型入口。需要类型提示时，可以在 npm 上查找社区维护的 @types/devoxa\_\_eslint-config 是否存在。

### @devoxa/eslint-config 支持 ESM 还是 CommonJS？

以 CommonJS 形式发布，可以直接 require\(\)；在 ES Module 项目中也可以用 import 引入（Node\.js 会把 module\.exports 作为默认导出）。

### @devoxa/eslint-config 可以商用吗？

@devoxa/eslint-config 使用 MIT 许可。宽松许可：允许商业使用、修改和再分发，通常只需在分发时保留原版权与许可声明。以上为概括，不构成法律意见，请以许可原文为准。

### @devoxa/eslint-config 的下载量有多少？

根据 npm 官方下载统计，@devoxa/eslint-config 在 2026/10/12 – 2026/11/10 这 30 天内被下载 10,428 次，日均约 348 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入，适合横向比较热度，不能直接等同于使用人数。

### @devoxa/eslint-config 还在维护吗？

最新版本 4\.0\.2 发布于 2024/12/17（1\.9 年前）；至今共发布 28 个版本，其中过去 12 个月发布了 0 个；首次发布于 2020/06/12。发布频率只是参考信号：功能稳定的工具可能很少需要更新，建议结合源码仓库的 issue 和提交记录判断。

