@cybozu/oxlint-config

中文文档
0.7.0发布于 2026/11/05MITTypeScriptES Module零依赖构建来源已验证近 30 天下载 2415

牛林规则为Cybozu.

中文使用文档
文档目录5 节
  1. 使用量
  2. 预设
  3. 反应编译器规则( opt- in)
  4. 动通发展规则(选入)
  5. 发展

牛林配置

以克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克克.

使用量

// oxlint.config.ts
import { defineConfig } from "oxlint";
import reactTypescript from "@cybozu/oxlint-config/presets/react-typescript";

export default defineConfig({ extends: [reactTypescript] });

预设

  • presets/base
  • presets/kintone-customize
  • presets/kintone-dev
  • presets/node
  • presets/node-typescript
  • presets/react
  • presets/react-compiler
  • presets/react-typescript
  • presets/typescript

这个 *-typescript 预设启用类型意识规则,其中需要 oxlint-tsgolint 将安装.

反应编译器规则( opt- in)

presets/react-compiler 是一个添加的预设, 允许 React 编译器规则 (单位:千美元) recommended 一组 eslint-plugin-react-hooks) (中文(简体) ). 将其与反应预设合并 :

import { defineConfig } from "oxlint";
import reactTypescript from "@cybozu/oxlint-config/presets/react-typescript";
import reactCompiler from "@cybozu/oxlint-config/presets/react-compiler";

export default defineConfig({ extends: [reactTypescript, reactCompiler] });

动通发展规则(选入)

presets/kintone-dev 是一个附加的预设,它允许开发相通的自定义规则. 其中不包括 base,因此结合到另一个预设中:

import { defineConfig } from "oxlint";
import reactTypescript from "@cybozu/oxlint-config/presets/react-typescript";
import kintoneDev from "@cybozu/oxlint-config/presets/kintone-dev";

export default defineConfig({ extends: [reactTypescript, kintoneDev] });

见 src/plugins/kintone/README.md 互联网档案馆的存檔,存档日期2013-12-02 为了规则.

发展

pnpm build      # build into dist
pnpm typecheck  # type check including tests
pnpm test       # run the plugin rule tests

规则测试放在每条规则的旁边(*.test.ts)和使用 RuleTester 从 oxlint/plugins-dev 与Node.js测试跑者.

版本与发布记录

@cybozu/oxlint-config 共发布 7 个版本,首次发布于 2026/05/15;过去 12 个月发布了 7 个版本。最新版本附带 npm provenance 构建来源证明,可追溯到公开的 CI 构建记录。

版本发布日期距今
0.7.0latest2026/11/056 天前
0.6.02026/10/1329 天前
0.5.02026/10/011 个月前
0.4.02026/06/055 个月前
0.3.02026/05/295 个月前
0.2.02026/05/155 个月前

关于 @cybozu/oxlint-config 的常见问题

@cybozu/oxlint-config 是什么?

牛林规则为Cybozu.

如何安装 @cybozu/oxlint-config?

在项目目录运行 npm install @cybozu/oxlint-config,或使用 pnpm add / yarn add / bun add。它还需要宿主项目提供 peer 依赖:oxlint(>=1.85.0)。npm 7 及以上与 pnpm 8 及以上默认会自动安装必需的 peer 依赖,Yarn 需要手动安装。

@cybozu/oxlint-config 支持 TypeScript 吗?

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

@cybozu/oxlint-config 支持 ESM 还是 CommonJS?

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

@cybozu/oxlint-config 可以商用吗?

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

@cybozu/oxlint-config 的下载量有多少?

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

@cybozu/oxlint-config 还在维护吗?

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