# @doubleloop-io/oxlint-plugin-effect 中文文档

规范地址：https://npmcn.com/package/%40doubleloop-io/oxlint-plugin-effect/

版本：0\.1\.2
npm 元数据更新时间：2026-11-11T09:06:56.404Z
中文译文更新时间：2026-11-12T23:48:46.987Z
软件包许可：MIT

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

原始 npm 页面：https://www.npmjs.com/package/%40doubleloop-io/oxlint-plugin-effect
原文对照：https://npmcn.com/package/%40doubleloop-io/oxlint-plugin-effect/?lang=original
项目主页：https://doubleloop-io.github.io/oxlint-plugin-effect/
源码仓库：https://github.com/doubleloop-io/oxlint-plugin-effect

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

- 包体积（解压后）：214 kB，129 个文件
- 模块格式：ES Module
- TypeScript 类型：包内自带
- Node.js 要求：^22\.20\.0 \|\| \>=24\.8\.0
- 运行依赖：1 个
- peer 依赖：oxlint ^1\.82\.0
- 首次发布：2026-10-16T17:35:09.630Z
- 最新版本发布：2026-11-11T09:06:55.944Z
- 近 30 天下载量：2904（2026-10-13 至 2026-11-11，npm 官方下载统计）
- 已发布版本数：7（近 12 个月 7 个）

## 中文简介

效果 4 代码的氧化林规则

## 安装

```sh
npm install @doubleloop-io/oxlint-plugin-effect
```

也可以使用：`pnpm add @doubleloop-io/oxlint-plugin-effect`、`yarn add @doubleloop-io/oxlint-plugin-effect`、`bun add @doubleloop-io/oxlint-plugin-effect`

## README

# @doubleloop-io/克林特-插件效应

一个 [奥克林特](https://github.com/oxc-project/oxc) 执行图案目录的插件 [效果](https://github.com/Effect-TS/effect/) 4码.

规则是按效果4书写和测试的。 当一个Effect 3 API有相同意图时,规则也承认它的v3名:每个规则的触发名. 这个 [规则概览](https://doubleloop-io.github.io/oxlint-plugin-effect/rules-overview/) 列出所有规则.

它补充了人们了解的 [`@effect/tsgo`](https://doubleloop-io.github.io/oxlint-plugin-effect/alongside-effect-tsgo/):它不需要它们,它检查它们不需要的东西.

## 安装

```bash
pnpm add -D @doubleloop-io/oxlint-plugin-effect oxlint
```

需要节点 `^22.20.0 || >=24.8.0` 和克罗林特 `^1.82.0`。发布会改变什么,支持哪些克林特版本: [版本](https://doubleloop-io.github.io/oxlint-plugin-effect/versioning/)。 。 。 .

## 使用量

扩展 `all` 预设。 偏爱 `oxlint.config.ts`时 `extends` 取配置对象, 预设以包名导入 :

```ts
import dlEffectAll from "@doubleloop-io/oxlint-plugin-effect/presets/all"
import { defineConfig } from "oxlint"

export default defineConfig({ extends: [dlEffectAll] })
```

与 `.oxlintrc.json`, (中文(简体) ), `extends` 只取文件路径, 因此预设通过 `node_modules`数字 :

```json
{
    "extends": ["./node_modules/@doubleloop-io/oxlint-plugin-effect/dist/presets/all.json"]
}
```

`all` 允许所有规则在 `warn`,所以通过它 永远不会打破一个建筑: 先看警告,然后提高到 `error` 你想执行的规则.

**设定 `entryFiles` 在读取警告之前** 在一个不是节点 CLI 的布局上,例如 Next.js 或 monorepo。 它的默认, `**/main.ts`, (中文(简体) ), `**/cli.ts`, (中文(简体) ), `**/bin/**`,决定哪些文件可以运行“效果”和导入适配器,因此在另一种布局上,它把正确的代码变成警告。 如何设定: [共享设置](https://doubleloop-io.github.io/oxlint-plugin-effect/shared-settings/#setting-a-value)。 。 。 .

## 文档

导游在 [网站](https://doubleloop-io.github.io/oxlint-plugin-effect/)数字 :

-   [配置](https://doubleloop-io.github.io/oxlint-plugin-effect/configuration/)页:1 `all` 预设和选择规则.
-   [共享设置](https://doubleloop-io.github.io/oxlint-plugin-effect/shared-settings/): 描述您工程的设置, 默认设置和使用规则 .
-   [默认配置](https://doubleloop-io.github.io/oxlint-plugin-effect/default-configuration/)数字 : `all` 每个设置和选项都明确.
-   [边上 `@effect/tsgo`](https://doubleloop-io.github.io/oxlint-plugin-effect/alongside-effect-tsgo/): 将它的预设和这个合并.
-   [规则概览](https://doubleloop-io.github.io/oxlint-plugin-effect/rules-overview/):按专题分类的每一项规则.
-   [版本](https://doubleloop-io.github.io/oxlint-plugin-effect/versioning/): 释放可能改变什么.
-   [解决问题](https://doubleloop-io.github.io/oxlint-plugin-effect/troubleshooting/): 采用插件时最经常被击中的问题.

编码代理商: 软件包中的同一页船 `docs/user-guide/`,从 `docs/user-guide/README.md`。 。 。 .

## 常见问题

### @doubleloop-io/oxlint-plugin-effect 是什么？

效果 4 代码的氧化林规则

### 如何安装 @doubleloop-io/oxlint-plugin-effect？

在项目目录运行 npm install @doubleloop-io/oxlint-plugin-effect，或使用 pnpm add / yarn add / bun add。它还需要宿主项目提供 peer 依赖：oxlint（^1\.82\.0）。npm 7 及以上与 pnpm 8 及以上默认会自动安装必需的 peer 依赖，Yarn 需要手动安装。

### @doubleloop-io/oxlint-plugin-effect 支持 TypeScript 吗？

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

### @doubleloop-io/oxlint-plugin-effect 支持 ESM 还是 CommonJS？

以 ES Module 形式发布，推荐使用 import 引入。在 CommonJS 项目中，Node\.js 20\.19\+ / 22\.12\+ 可以直接 require\(\) 不含顶层 await 的 ES Module，更早的版本需要改用动态 import\(\)。

### @doubleloop-io/oxlint-plugin-effect 需要什么版本的 Node\.js？

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

### @doubleloop-io/oxlint-plugin-effect 可以商用吗？

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

### @doubleloop-io/oxlint-plugin-effect 的下载量有多少？

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

### @doubleloop-io/oxlint-plugin-effect 还在维护吗？

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

