# @epilot/eslint-config 中文文档

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

版本：2\.1\.3
npm 元数据更新时间：2026-11-10T09:27:41.264Z
中文译文更新时间：2026-11-13T19:42:34.913Z
软件包许可：MIT

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

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

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

- 包体积（解压后）：6.2 kB，5 个文件
- 模块格式：CommonJS
- TypeScript 类型：未声明
- Node.js 要求：\>=10\.0\.0
- 运行依赖：7 个
- peer 依赖：eslint \>= 7\.0\.0，typescript \>= 3\.9\.0
- 首次发布：2020-03-22T16:21:15.389Z
- 最新版本发布：2024-12-18T10:15:35.516Z
- 近 30 天下载量：43349（2026-10-14 至 2026-11-12，npm 官方下载统计）
- 已发布版本数：59（近 12 个月 0 个）

## 中文简介

节点工程的 eslint 包

## 安装

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

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

## README

[![Epilot Logo](https://npmcn.com/package/%40epilot/eslint-config/.github/epilot_logo.svg "Epilot")](https://epilot.cloud/)

# @ epilot/ slint- config

这个包是一套eslint规则,推荐给所有节点.js Projects(包括没有服务器的lambda)

ESLint静态分析您的代码以快速发现问题. ESLint被构建在大多数文本编辑器中,你可以运行ESLint,作为你连续集成管道的一部分. [更多信息](https://eslint.org/)

该项目也与 [高级](https://prettier.io/) 以确保全公司代码格式化.

## 使用量

```bash
yarn add eslint typescript @epilot/eslint-config-react -D
```

现在将配置添加到您的任意 `package.json`数字 :

```json
{
  "eslintConfig": {
    "extends": "@epilot/eslint-config"
  }
}
```

给您的 `.eslintrc`数字 :

```json
{
  "extends": "@epilot/eslint-config"
}
```

或者说 `.eslintrc.js`数字 :

```js
module.exports = {
  extends: '@epilot/eslint-config'
}
```

## VS 代码

建议安装 [斯林特扩展](https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint)设置

```json
    "eslint.alwaysShowStatus": true,
    "eslint.validate": [
        "javascript",
        "javascriptreact",
        "typescript",
        "typescriptreact"
    ],
    "editor.codeActionsOnSave": {
        "source.fixAll.eslint": true
    },

```

您已经安装了 Pretier 扩展 。 这可能会引起与 Eslint 物质的冲突. 我建议关闭或拆除它.

## 假设

这个ESLint配置带有一些基本假设:

-   节点环境
-   解析器: 打字符

## 开发者指令

### 所需资源

-   节点.js(建议12/14)
-   线条

### 发展

```bash
git clone git@gitlab.com:e-pilot/cookie-cutter/epilot-eslint-config.git
cd epilot-eslint-config
yarn
yarn test
```

其他有用的脚本

```bash
yarn run
```

或检查 [软件包.json](https://npmcn.com/package.json)

### 新发行

在这些脚本中用其中之一创建主机标记

```bash
yarn release
```

## 常见问题

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

节点工程的 eslint 包

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

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

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

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

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

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

### @epilot/eslint-config 需要什么版本的 Node\.js？

package\.json 的 engines 字段要求 Node\.js \>=10\.0\.0。版本不符时 npm 默认只给出警告，开启 engine-strict 后会拒绝安装。

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

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

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

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

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

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

