@minimalstuff/tooling

中文文档
0.8.0发布于 2026/11/02MITES Module构建来源已验证

Shared tooling configs: EditorConfig, OXC (oxlint + oxfmt), Knip

原始使用文档
文档目录8 节
  1. Requirements
  2. Versioning
  3. Set up a project
  4. With the CLI
  5. Manually
  6. Develop
  7. Documentation
  8. License

@minimalstuff/tooling

Shared tooling configs: EditorConfig, OXC (oxlint + oxfmt), Knip. A CLI sets them up in a project.

Requirements

  • Node >= 26
  • oxlint >= 1.89.0, oxfmt >= 0.74.0 and oxlint-tsgolint >= 7.0.2004 (optional peer dependencies, for the OXC presets)
  • knip >= 6.42.1 (optional peer dependency, for the Knip preset)
  • @adonisjs/eslint-plugin ^2.2.2 (optional peer dependency, needed with adonisjs: true in the oxlint preset; the CLI installs it)

Versioning

[!IMPORTANT] Removing or changing an export or option is a breaking change. Before 1.0, new or stricter error-level rules and new required peer dependencies are breaking too: they ship in a minor release, which ^0.x ranges never pick up automatically. New warn-level rules and relaxed rules are not breaking.

Set up a project

With the CLI

Run this command from the project root, in an interactive terminal:

pnpm dlx @minimalstuff/tooling@latest

The CLI asks which tools to set up (EditorConfig, OXC, Knip), offers VS Code settings when OXC is selected, and asks for presets (react, adonisjs, vitest) pre-selected from your dependencies. It asks before overwriting a file and only adds the package.json scripts that are missing. It then installs the packages once as devDependencies with the detected package manager. See the CLI reference for details.

Manually

pnpm add -D oxlint oxfmt oxlint-tsgolint @minimalstuff/tooling
# optional, for the AdonisJS oxlint preset
pnpm add -D @adonisjs/eslint-plugin
# optional, for the Knip preset
pnpm add -D knip
// oxlint.config.ts
import { minimalstuffPreset } from '@minimalstuff/tooling/oxc/lint';

export default minimalstuffPreset({ react: true });
// oxfmt.config.ts
import { minimalstuffPreset } from '@minimalstuff/tooling/oxc/fmt';

export default minimalstuffPreset();
// knip.ts
import { minimalstuffPreset } from '@minimalstuff/tooling/knip';

export default minimalstuffPreset();
cp node_modules/@minimalstuff/tooling/preset/.editorconfig .editorconfig

See the presets reference for the options.

Develop

pnpm install
pnpm checks

pnpm checks runs the typecheck, lint, format check, Knip, unit tests and build. pnpm test:package installs the packed tarball into throwaway consumer projects with strict pnpm: it needs network access and runs in CI.

Documentation

License

MIT

版本与发布记录

@minimalstuff/tooling 共发布 11 个版本,首次发布于 2026/04/03;过去 12 个月发布了 11 个版本。最新版本附带 npm provenance 构建来源证明,可追溯到公开的 CI 构建记录。

版本发布日期距今
0.8.0latest2026/11/021 天前
0.8.0-next.0next2026/11/021 天前
0.7.02026/10/2311 天前
0.6.02026/05/115 个月前
0.5.02026/04/266 个月前
0.4.02026/04/266 个月前

关于 @minimalstuff/tooling 的常见问题

@minimalstuff/tooling 是什么?

共享工具配置:EditorConfig, OXC (oxlint + oxfmt), Knip

如何安装 @minimalstuff/tooling?

在项目目录运行 npm install @minimalstuff/tooling,或使用 pnpm add / yarn add / bun add。它还提供命令行工具 tooling,可以用 npx tooling 直接运行。

@minimalstuff/tooling 支持 TypeScript 吗?

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

@minimalstuff/tooling 支持 ESM 还是 CommonJS?

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

@minimalstuff/tooling 需要什么版本的 Node.js?

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

@minimalstuff/tooling 可以商用吗?

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

@minimalstuff/tooling 还在维护吗?

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