# @gitopslovers/nx-biome 中文文档

规范地址：https://npmcn.com/package/%40gitopslovers/nx-biome/

版本：1\.5\.0
npm 元数据更新时间：2026-05-16T16:54:48.674Z
中文译文更新时间：2026-11-16T14:44:28.540Z
软件包许可：未声明

本文由上游 README 翻译，可能存在偏差，请结合原文核对 API、命令与配置。版权与许可归原作者所有。

原始 npm 页面：https://www.npmjs.com/package/%40gitopslovers/nx-biome
原文对照：https://npmcn.com/package/%40gitopslovers/nx-biome/?lang=original

弃用说明：Package no longer supported\. Contact Support at https://www\.npmjs\.com/support for more info\.

## 关键信息（来自 npm 元数据）

- 包体积（解压后）：24.1 kB，28 个文件
- 模块格式：CommonJS
- TypeScript 类型：未声明
- 运行依赖：0 个
- 首次发布：2024-04-11T14:05:03.218Z
- 最新版本发布：2024-08-08T17:57:21.227Z
- 近 30 天下载量：14917（2026-10-17 至 2026-11-15，npm 官方下载统计）
- 已发布版本数：8（近 12 个月 0 个）

## 中文简介

![NX Biome](https://raw.githubusercontent.com/GitOpsLovers/nx-biome/main/banner.jpg)

## 安装

```sh
npm install @gitopslovers/nx-biome
```

也可以使用：`pnpm add @gitopslovers/nx-biome`、`yarn add @gitopslovers/nx-biome`、`bun add @gitopslovers/nx-biome`

## README

![NX Biome](https://raw.githubusercontent.com/GitOpsLovers/nx-biome/main/banner.jpg)

# nx - biome (正键)

**[无](https://nx.dev/) 要使用的插件 [生物体](https://biomejs.dev/) 工具链.**

[![Nx peer dependency version](https://img.shields.io/npm/dependency-version/nx-stylelint/@nx/devkit?label=Nx&logo=nx&style=flat-square)](https://nx.dev/) [![Stylelint peer dependency version](https://img.shields.io/npm/dependency-version/nx-stylelint/peer/stylelint?label=Stylelint&logo=stylelint&style=flat-square)](https://stylelint.io/) [![CI](https://img.shields.io/github/actions/workflow/status/Phillip9587/nx-stylelint/ci.yml?branch=main&label=CI&style=flat-square&logo=github)](https://github.com/Phillip9587/nx-stylelint/actions/workflows/ci.yml) [![LICENSE](https://img.shields.io/github/license/phillip9587/nx-stylelint?style=flat-square)](https://github.com/phillip9587/nx-stylelint/blob/main/LICENSE) [![npm version](https://img.shields.io/npm/v/nx-stylelint?style=flat-square&logo=npm)](https://www.npmjs.com/package/nx-stylelint) [![npm](https://img.shields.io/npm/dt/nx-stylelint?style=flat-square&logo=npm)](https://www.npmjs.com/package/nx-stylelint)

* * *

# \* 特性

@gitopslovers/nx-biome 提供一套供电 [无](https://nx.dev/) 以 生物体。 。 。 .

-   **执行者**: 提供一些执行器, 用于用 Biome 添加、格式化和分析您的文件 .
-   **发电机**:帮助您配置您的项目.
-   **配置**: Biome 的每个项目配置扩展工作空间配置.
-   **仅受影响**: 使用 Nx 支持仅对受影响的项目进行林入格式化和分析.
-   **缓存**: 使用 Nx来缓存已触碰的工程 .

# \* 安装

**使用 [无](https://npmjs.com/)**

```shell
npm i -D @gitopslovers/nx-biome
```

# 为一个项目配置生物体

要在一个项目中添加 Biome 配置, 您只需运行 `@gitopslovers/nx-biome:configuration` 发电机.

```shell
nx g @gitopslovers/nx-biome:configuration --project <projectName>
```

发电机加了一个 `biome.json` 工程根上延伸根的配置文件 `biome.json` 添加一个 `biome-lint` 目标到项目.

在第一次运行时,生成器安装所有必要的依赖性并创建一个 `biome.json` 在工作空间根处的文件。 它也会配置 `namedInputs` 联 合 国 `biome-lint` 目标.

# 实例

运行 `biome-lint` 项目

```shell
nx biome-lint {{projectName}}
```

运行 `biome-lint` 所有项目

```shell
nx run-many --target=biome-lint
```

运行 `biome-lint` 受影响的项目

```shell
nx affected --target=biome-lint
```

# 页:1

## `@gitopslovers/nx-biome:configuration` 发电机

在项目中添加 Biome 配置 .

### 使用量

向工程添加配置 :

`nx g @gitopslovers/nx-biome:configuration --project projectName`

### 选项

| 选项 | 数值 | 说明 |
| --- | --- | --- |
| `project` | `string` | 项目名称. |

## `@gitopslovers/nx-biome:biome-lint` 执行器

在一个项目上运行 Biome linter.

目标选项可以配置在 `project.json` 或当执行人被援引.

见: [https://nx.dev/configulation/projectjson#目标](https://nx.dev/configuration/projectjson#targets)

### 选项

| 选项 | 数值 | 默认 | 说明 |
| --- | --- | --- | --- |
| `lintFilePatterns` | `string[]` |  | 一个或多个文件/ dirs/ globs 直接传递到 Biome 的 lint () 方法 . |

## 常见问题

### 如何安装 @gitopslovers/nx-biome？

在项目目录运行 npm install @gitopslovers/nx-biome，或使用 pnpm add / yarn add / bun add。

### @gitopslovers/nx-biome 支持 TypeScript 吗？

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

### @gitopslovers/nx-biome 支持 ESM 还是 CommonJS？

以 CommonJS 形式发布，可以直接 require\(\)；在 ES Module 项目中也可以用 import 引入（Node\.js 会把 module\.exports 作为默认导出）。

### @gitopslovers/nx-biome 可以商用吗？

@gitopslovers/nx-biome 使用 未声明 许可。package\.json 没有声明许可证。没有许可证的代码默认保留全部权利，商用前请联系作者或查看仓库中的 LICENSE 文件。以上为概括，不构成法律意见，请以许可原文为准。

### @gitopslovers/nx-biome 的下载量有多少？

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

### @gitopslovers/nx-biome 还在维护吗？

最新版本 1\.5\.0 发布于 2024/08/09（2 年前）；至今共发布 8 个版本，其中过去 12 个月发布了 0 个；首次发布于 2024/04/11。作者已将其标记为弃用，新项目建议寻找替代方案。

