@bensandee/config

中文文档
0.15.1发布于 2026/10/24MITES Module近 30 天下载 2561

Shared configs: tsconfig bases, oxlint preset + custom rules, Renovate preset

原始使用文档
文档目录4 节
  1. Installation
  2. Oxlint configuration
  3. TSConfig bases
  4. Exports

@bensandee/config

Shared tsconfig bases and oxlint configuration for TypeScript projects.

Installation

pnpm add -D @bensandee/config

Oxlint configuration

Provides a recommended oxlint config that combines 12 custom plugin rules from @bensandee/eslint-plugin with a curated preset of oxlint built-in rules across 10 plugins (eslint, typescript, react, react-perf, jsx-a11y, unicorn, promise, vitest, node, import) with correctness, suspicious, and perf categories enabled.

// oxlint.config.ts
import recommended from "@bensandee/config/oxlint/recommended";
import { defineConfig } from "oxlint";

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

The base preset without custom rules is also available:

import preset from "@bensandee/config/oxlint";

TSConfig bases

The default, library, and react bases use bundler module resolution. The node base uses nodenext module resolution with allowImportingTsExtensions, targeting Node's native TypeScript support. The node base tracks the current Node.js LTS release; expect its target and lib settings to advance as new LTS versions ship. The react base assumes React 19+.

BaseImport pathTargetLibKey options
default@bensandee/config/tsconfig/defaultES2024ES2024General purpose
node@bensandee/config/tsconfig/nodeES2024ES2024nodenext, allowImportingTsExtensions, erasableSyntaxOnly, noEmit
library@bensandee/config/tsconfig/libraryES2022ES2022Lower target for broader compatibility
react@bensandee/config/tsconfig/reactES2024ES2024, DOM, DOM.IterableReact 19+, jsx: react-jsx
{
  "extends": "@bensandee/config/tsconfig/node"
}

Exports

Entry pointDescription
@bensandee/config/oxlintOxlint preset rules and plugin config
@bensandee/config/oxlint/recommendedFull recommended config (preset + custom rules)
@bensandee/config/tsconfig/defaultGeneral-purpose tsconfig base
@bensandee/config/tsconfig/nodeNode.js tsconfig base
@bensandee/config/tsconfig/libraryLibrary tsconfig base (lower target)
@bensandee/config/tsconfig/reactReact tsconfig base (JSX + DOM)

版本与发布记录

@bensandee/config 共发布 40 个版本,首次发布于 2026/03/03;过去 12 个月发布了 40 个版本。

版本发布日期距今
0.15.1latest2026/10/2415 天前
0.15.02026/10/0930 天前
0.14.72026/10/0830 天前
0.14.62026/10/061 个月前
0.14.52026/09/231 个月前
0.14.42026/09/032 个月前

关于 @bensandee/config 的常见问题

@bensandee/config 是什么?

Shared configs: tsconfig bases, oxlint preset + custom rules, Renovate preset

如何安装 @bensandee/config?

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

@bensandee/config 支持 TypeScript 吗?

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

@bensandee/config 支持 ESM 还是 CommonJS?

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

@bensandee/config 可以商用吗?

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

@bensandee/config 的下载量有多少?

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

@bensandee/config 还在维护吗?

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