@caxerx/oxlint-config-vibeproof

中文文档
0.2.1发布于 2026/10/09MITTypeScriptES Module近 30 天下载 1.1万

Unofficial oxlint + oxfmt port of SukkaW's eslint-config-sukka and eslint-plugin-vibe-proof

原始使用文档
文档目录14 节
  1. Install
  2. Usage
  3. Options
  4. Migrating from eslint-config-sukka
  5. 1. Swap the dependencies
  6. 2. Replace the config
  7. 3. Rewrite disable comments
  8. 4. Update scripts, CI and editor
  9. 5. Format once and review
  10. Upgrading from 0.1
  11. What is not covered
  12. How the port is verified
  13. Credits
  14. License

oxlint-config-vibeproof

An unofficial port of SukkaW's lint preset (eslint-config-sukka 9.1.0 + eslint-plugin-vibe-proof 1.10.0) to oxlint and oxfmt. Not published or endorsed by Sukka; report problems here, not upstream.

  • Most rules are oxlint's native (Rust) rules, including type-aware ones through oxlint-tsgolint.
  • Rules oxlint doesn't have run as the original ESLint plugins through oxlint's JS plugin support. They are checked to report exactly what ESLint reports.
  • Formatting is done by oxfmt instead of @stylistic.

Install

pnpm add -D oxlint @caxerx/oxlint-config-vibeproof
pnpm add -D oxlint-tsgolint   # optional: type-aware rules (recommended for TypeScript projects)
pnpm add -D oxfmt             # optional: formatting

Requires Node.js ≥ 22.18 (oxlint loads .ts config files with Node's type stripping).

Usage

// oxlint.config.ts
import { defineConfig } from 'oxlint';
import { sukka } from '@caxerx/oxlint-config-vibeproof';

export default defineConfig({
  extends: [sukka()],
  rules: {
    // your overrides
  }
});
// oxfmt.config.ts
import { defineConfig } from 'oxfmt';
import { oxfmt } from '@caxerx/oxlint-config-vibeproof/oxfmt';

export default defineConfig(oxfmt());
npx oxlint            # type-aware rules run automatically when oxlint-tsgolint is installed
npx oxfmt

oxlint only discovers oxlint.config.ts (or .oxlintrc.json) automatically. Other file names need -c.

Options

Same options and auto-detection as eslint-config-sukka's sukka(). Each preset accepts true, false, or an options object; when left out it is enabled based on what your project has installed.

OptionDefaultNotes
jstrue{ disableNoConsoleInCLI, env: { browser, webextensions, greasemonkey, customGlobals } }. module is read from package.json "type".
tsif typescript or @types/node is installed{ allowJs, componentExtensions, typeAware }. typeAware defaults to whether oxlint-tsgolint is installed.
reactif react, @types/react or next is installed (needs ts){ files, additionalHooks, additionalHooksWithType, additionalComponents, nextjs, remix, reactRefresh: { allowConstantExport } }
nextif next is installed
stylexif @stylexjs/stylex or stylex-webpack is installed{ opt }, passed to @stylexjs/eslint-plugin
nodeif @types/node or @types/bun is installed{ strict, module, files }
legacyfalse{ browser, node, files }
ignoresbuilt-in globs{ customGlobs }. .gitignore is always honoured by oxlint.
stylistictrueThe few style rules oxfmt can't enforce
cwdprocess.cwd()Where to look for installed packages

oxfmt({ printWidth }): printWidth defaults to 120.

Migrating from eslint-config-sukka

A step-by-step guide for a project that uses eslint-config-sukka (with or without eslint-plugin-vibe-proof). Options are above; what is not covered is below.

1. Swap the dependencies

pnpm remove eslint eslint-config-sukka eslint-plugin-vibe-proof   # plus any @eslint-sukka/* packages you added
pnpm add -D oxlint @caxerx/oxlint-config-vibeproof
pnpm add -D oxlint-tsgolint   # type-aware rules; recommended for TypeScript projects
pnpm add -D oxfmt             # formatting, replaces @stylistic

Node.js ≥ 22.18 is required.

2. Replace the config

// before: eslint.config.js
import { sukka } from 'eslint-config-sukka';

export default sukka({ react: { nextjs: true } }, {
  rules: { 'no-console': 'off' }
});
// after: oxlint.config.ts
import { defineConfig } from 'oxlint';
import { sukka } from '@caxerx/oxlint-config-vibeproof';

export default defineConfig({
  extends: [sukka({ react: { nextjs: true } })],
  rules: { 'no-console': 'off' }
});
// oxfmt.config.ts
import { defineConfig } from 'oxfmt';
import { oxfmt } from '@caxerx/oxlint-config-vibeproof/oxfmt';

export default defineConfig(oxfmt());
  • sukka() takes the same options and auto-detects the same presets.
  • Extra flat-config objects you passed after the options become oxlint's rules and overrides. An object with files becomes overrides: [{ files: [...], rules: {...} }].
  • Rule ids mostly stay the same. oxlint matches @typescript-eslint/x, import-x/x, unicorn/x and similar to its native rules by rule name. The 66 that now run under another name are listed in data/directive-compat.json, for example camelcase → sukka-compat/camelcase.
  • Delete eslint.config.js. oxlint only discovers oxlint.config.ts (or .oxlintrc.json) automatically; other names need -c.
  • .gitignore is always honoured, so most ignores entries can go.

3. Rewrite disable comments

oxlint understands eslint-disable* comments, so most keep working. Comments naming a rule that runs under a new name need rewriting:

npx oxlint-config-vibeproof-migrate --dry-run   # preview
npx oxlint-config-vibeproof-migrate             # rewrite in place

Comments naming a rule with no oxlint version, such as the jsonc/* and yml/* rules or @stylistic/* rules replaced by oxfmt, are reported as unused. Delete them by hand; the codemod counts them for you.

4. Update scripts, CI and editor

// package.json
"scripts": {
  "lint": "oxlint",               // was: eslint .
  "lint:fix": "oxlint --fix",     // was: eslint . --fix
  "format": "oxfmt",
  "format:check": "oxfmt --check"
}
  • CI: run oxlint --deny-warnings and oxfmt --check. Add npx oxlint-config-vibeproof-migrate --check to fail when a disable comment needs migrating.
  • lint-staged / pre-commit hooks: swap eslint --fix for oxlint --fix and oxfmt.
  • VS Code: replace the ESLint extension with the oxc extension, which runs both oxlint and oxfmt.

5. Format once and review

Run npx oxfmt and commit the result separately so the reformat is easy to skip in git blame (add the commit to .git-blame-ignore-revs). The visible style changes are interface and type members ending with ;, function* g() instead of function *g(), and a few line-break choices; see docs/stylistic-oxfmt.md.

Then run npx oxlint. Expect small differences from ESLint; each known one is listed with its reason in packages/harness/allowlist.json.

Upgrading from 0.1

  • The package moved from GitHub Packages to npm. Remove the @caxerx:registry=https://npm.pkg.github.com line (and its token) from .npmrc and reinstall.
  • react-hooks/config and react-hooks/gating are no longer run, and eslint-plugin-react-hooks is no longer a dependency. Neither rule can report anything without options this preset never sets. Remove any react-hooks-js/* entries from your config and disable comments.

What is not covered

Why
JSON, YAML, package.json and pnpm-workspace.yaml rules (jsonc/*, yml/*, pnpm/*)oxlint only lints JS/TS. oxfmt still formats JSON and YAML.
66 @stylistic formatting rulesReplaced by oxfmt
8 rules that need type information inside a JS plugin, e.g. vibe-proof/no-indexof-equality and @eslint-react/no-leaked-conditional-renderingoxlint gives JS plugins no type information. Tracked in docs/blocked-rules.md and probed weekly in CI.
import-x/no-unresolved, no-relative-packages, no-useless-path-segmentsThe TypeScript resolver can't be configured from oxlint's JSON settings. tsc already reports unresolved imports.
n/process-exit-as-throwIt patches ESLint's code-path analysis, which oxlint doesn't use

Known differences from ESLint, each one a documented oxlint behaviour or bug, are listed in packages/harness/allowlist.json. Examples:

  • Imports: no-unused-vars also reports unused imports in TS files.
  • React: react/only-export-components misses components wrapped in React.memo(...).
  • vibe-proof: 7 rules run without their optional type refinement, so a few non-array receivers may be reported.

How the port is verified

packages/harness runs eslint-config-sukka and this preset on the same corpus and compares their reports rule by rule and line by line. It also:

  • replays eslint-plugin-vibe-proof's own test suite through oxlint;
  • checks that oxfmt and the kept @stylistic rules don't fight;
  • detects drift when eslint-config-sukka changes;
  • tests which old disable-comment ids still match.

Credits

The rule selection, rule options, and the ESLint plugins this preset runs are the work of Sukka (SukkaW): eslint-config-sukka, eslint-plugin-vibe-proof and eslint-plugin-sukka. This package only adapts them to oxlint.

License

MIT. Rule configuration ported from MIT-licensed eslint-config-sukka and eslint-plugin-vibe-proof; see THIRD-PARTY-NOTICES.md.

版本与发布记录

@caxerx/oxlint-config-vibeproof 共发布 3 个版本,首次发布于 2026/10/09;过去 12 个月发布了 3 个版本。

版本发布日期距今
0.2.1latest2026/10/091 个月前
0.0.02026/10/091 个月前
0.0.0-stage2026/10/091 个月前

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

@caxerx/oxlint-config-vibeproof 是什么?

Unofficial oxlint + oxfmt port of SukkaW's eslint-config-sukka and eslint-plugin-vibe-proof

如何安装 @caxerx/oxlint-config-vibeproof?

在项目目录运行 npm install @caxerx/oxlint-config-vibeproof,或使用 pnpm add / yarn add / bun add。它还需要宿主项目提供 peer 依赖:oxlint(>=1.87.0)。npm 7 及以上与 pnpm 8 及以上默认会自动安装必需的 peer 依赖,Yarn 需要手动安装。它还提供命令行工具 oxlint-config-vibeproof-migrate,可以用 npx oxlint-config-vibeproof-migrate 直接运行。

@caxerx/oxlint-config-vibeproof 支持 TypeScript 吗?

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

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

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

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

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

@caxerx/oxlint-config-vibeproof 可以商用吗?

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

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

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

@caxerx/oxlint-config-vibeproof 还在维护吗?

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