@genesislcap/oxlint-config

中文文档
15.96.2发布于 2026/11/16SEE LICENSE IN license.txt近 30 天下载 1.7万

Oxlint rules derived from @genesislcap/eslint-config

原始使用文档
文档目录5 节
  1. What it does
  2. How it runs in the monorepo
  3. Import rules and ESLint
  4. Consumption
  5. Bundled dependencies

@genesislcap/oxlint-config

Published Oxlint rules for Genesis Foundation UI. This monorepo's own lint pipeline (npm run lint) runs Oxlint only — Oxlint → Oxfmt → Stylelint. @genesislcap/eslint-config still exists and remains available for other packages/consumers that opt in to ESLint for stricter or type-aware checks Oxlint doesn't cover (see its README and the Import rules and ESLint section below for the specific gaps), but it is no longer part of this repo's own build/CI.

What it does

  • Ships .oxlintrc.json — the only file you should edit for Oxlint rule changes in this product line.
  • Does not format code. Formatting is Oxfmt — config lives in the root .oxfmtrc.json (copy it to your app, no extra package needed).

How it runs in the monorepo

  1. npm run lint / genx lint runs Oxlint (first, before Oxfmt and Stylelint) from the current working directory.
  2. The repo root has a small .oxlintrc.json that only extends this package so oxlint finds the same rules from the workspace root.
  3. Nested apps that run genx lint from their own folder may need a local stub extends (see Consumption) so config resolves correctly.

Import rules and ESLint

Oxlint loads eslint-plugin-import as a JS plugin under the alias import-es (avoids clashing with Oxlint’s built-in import plugin). In this config, import-es covers newline-after-import, no-self-import, no-useless-path-segments (warn), no-duplicates (warn), and no-extraneous-dependencies (error).

Import ordering is handled by import-es/order with the same groups and alphabetize config as @genesislcap/eslint-config, so both linters enforce identical ordering. import-es/first is disabled (redundant with import-es/order).

Native Oxlint import/* rules used here include no-absolute-path and no-mutable-exports — do not duplicate those as import-es/*.

JS plugins are alpha in Oxlint; type-aware TypeScript rules (e.g. @typescript-eslint/no-shadow) still require ESLint (upstream limits). Two rare-trigger core rules, no-unreachable-loop and require-atomic-updates, also have no Oxlint implementation yet.

When to run ESLint as well: in a package that depends on @genesislcap/eslint-config, use genx lint -l eslint (or that package's own lint:eslint/lint:with-eslint script, if defined) when you need type-aware @typescript-eslint/* rules or finer import/* behavior. This monorepo's own root pipeline no longer runs ESLint, so those remaining gaps aren't enforced here — only in packages that opt in.

Consumption

In this repository: change rules only in this package’s .oxlintrc.json. Keep the root stub in sync with the extends pattern below.

Downstream: installing @genesislcap/oxlint-config automatically brings in oxlint, oxfmt, and the required ESLint plugins as bundled dependencies — no separate installs needed. At your app root, add:

{
  "devDependencies": {
    "@genesislcap/oxlint-config": "latest"
  }
}

Then create .oxlintrc.json:

{
  "$schema": "./node_modules/oxlint/configuration_schema.json",
  "extends": ["./node_modules/@genesislcap/oxlint-config/.oxlintrc.json"]
}

And copy .oxfmtrc.json from the foundation-ui repo for Oxfmt config (no extra package needed).

If you run Oxlint only from a subfolder of a monorepo, ensure a .oxlintrc.json in that folder can resolve the shared config (for example by extending a path or package that exists from that directory).

Bundled dependencies

Shipped as dependencies in package.json so they install automatically:

  • oxlint
  • oxfmt
  • eslint-import-resolver-typescript
  • eslint-plugin-import
  • eslint-plugin-unused-imports

版本与发布记录

@genesislcap/oxlint-config 共发布 664 个版本,首次发布于 2026/05/11;过去 12 个月发布了 664 个版本。

版本发布日期距今
15.96.2latest2026/11/16今天
15.96.12026/11/16今天
15.96.0-GENC-1665.32026/11/142 天前
15.96.02026/11/142 天前
15.95.2-GENC-1665.22026/11/132 天前
15.95.22026/11/133 天前

其他发布通道:FUI-2489 → 14.436.0-FUI-2489.8,GENC-1262 → 14.444.1-GENC-1262.1,chore-fix-ag-grid-types-react → 14.445.2-chore-fix-ag-grid-types-react.3,FUI-2537 → 14.446.0-FUI-2537.8,FUI-2541 → 14.446.1-FUI-2541.4,GENC-1298 → 14.451.0-GENC-1298.1。

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

@genesislcap/oxlint-config 是什么?

Oxlint rules derived from @genesislcap/eslint-config

如何安装 @genesislcap/oxlint-config?

在项目目录运行 npm install @genesislcap/oxlint-config,或使用 pnpm add / yarn add / bun add。

@genesislcap/oxlint-config 支持 TypeScript 吗?

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

@genesislcap/oxlint-config 需要什么版本的 Node.js?

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

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

@genesislcap/oxlint-config 使用 SEE LICENSE IN license.txt 许可。许可条款写在包内的独立文件中,请阅读该文件确认可否商用。以上为概括,不构成法律意见,请以许可原文为准。

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

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

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

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