@charcuterie/biome-config

中文文档
1.3.0发布于 2026/08/21MITES Module零依赖构建来源已验证近 30 天下载 2216

The shared Biome formatter and linter settings for the Charcuterie fleet.

原始使用文档

@charcuterie/biome-config

The shared Biome settings, extracted verbatim from mux-magic/biome.json — the reference app for every convention in this repo.

// biome.json, in any consumer
{
  "extends": ["@charcuterie/biome-config"],
  "files": { "includes": ["./**", "!**/dist"] }
}

The consumer owns files.includes, because which paths exist is a property of the app, not of the house style. Everything else — 60-column lines, two-space indent, LF, double quotes, semicolons as-needed, trailing commas everywhere, always-parenthesized arrow params — comes from here.

Why 60 columns. It is narrow enough that a function call with three arguments breaks one-per-line, which is the shape every diff in the fleet already has. Widening it later reflows every file in every repo at once, so it is set here and left alone.

@charcuterie/biome-config/app — the house rules an app also gets

The base config above is deliberately house style only: it is what @charcuterie/ui itself extends, and the library renders a raw <select> because rendering one correctly is the library.

An app is not the library, so an app extends both — the base, then the app delta:

// biome.json, in any app repo
{
  "extends": [
    "@charcuterie/biome-config",
    "@charcuterie/biome-config/app"
  ],
  "files": { "includes": ["./**", "!**/dist"] }
}

Both entries, and the order matters. app.json is a delta: it holds the picker rules and nothing else, and it deliberately carries no extends of its own.

That is not a style choice, it is Biome's behaviour. Biome does not resolve a nested extends inside an extended config. app.json shipped in 1.2.0 with "extends": ["./config.json"], on the reasonable assumption that a package's config can extend its sibling; a consumer on /app alone got the picker rules and silently lost the entire house style — 60 columns, no semicolons, the Tailwind CSS parser, the VCS ignore file. Nothing errored. The first biome check --write would have reformatted the repo. src/appConfig.test.ts runs the real CLI over real fixtures and asserts each of those base settings survives the second entry, because a config that looks adopted and enforces Biome's defaults is indistinguishable from a config that works.

Together they give everything in the base plus the fleet's picker rule, expressed natively:

RuleFires onReach for instead
correctness/noRestrictedElements<select>Picker, Listbox, or Combobox
correctness/noRestrictedElements<Select>Picker — the drop-in, same props
style/noRestrictedImportsimport { Select } from "@charcuterie/ui"Picker

Why this is here and not only in ESLint. charcuterie/no-raw-select and charcuterie/prefer-listbox-over-select are ESLint rules, and a repo that lints with Biome alone had no way to get them — queuepilot's option was "adopt a second linter for two rules", which is not an option anybody takes. noRestrictedElements matches JSX components as well as HTML elements, so the same two mistakes are catchable without one. A repo running both linters gets the rule twice and the same message twice, which is noise rather than a problem; a repo running either gets it once.

Where the two differ, and it is worth knowing which you have: the ESLint rules carry charcuterie/require-suppression-reason, so an eslint-disable that names them owes a -- why on the same line. Biome's // biome-ignore syntax already requires an explanation, so the Biome path gets that for free from the tool.

Biome covers formatting and most linting. The rules it cannot express — the ones needing TypeScript type information or a custom AST query — live in @charcuterie/eslint-config, whose createAppConfig() is the ESLint half of the same one-line adoption.

版本与发布记录

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

版本发布日期距今
1.3.0latest2026/08/212 个月前
1.2.02026/08/212 个月前
1.1.02026/08/112 个月前
1.0.02026/08/023 个月前
0.1.02026/07/313 个月前

关于 @charcuterie/biome-config 的常见问题

@charcuterie/biome-config 是什么?

The shared Biome formatter and linter settings for the Charcuterie fleet.

如何安装 @charcuterie/biome-config?

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

@charcuterie/biome-config 支持 TypeScript 吗?

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

@charcuterie/biome-config 支持 ESM 还是 CommonJS?

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

@charcuterie/biome-config 可以商用吗?

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

@charcuterie/biome-config 的下载量有多少?

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

@charcuterie/biome-config 还在维护吗?

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