# @bifravst/prettier-config 中文文档

规范地址：https://npmcn.com/package/%40bifravst/prettier-config/

版本：2\.0\.5
npm 元数据更新时间：2026-10-30T11:39:14.172Z
中文译文更新时间：2026-11-08T01:45:57.695Z
软件包许可：BSD-3-Clause

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

原始 npm 页面：https://www.npmjs.com/package/%40bifravst/prettier-config
原文对照：https://npmcn.com/package/%40bifravst/prettier-config/?lang=original
项目主页：https://github.com/bifravst/prettier-config
源码仓库：https://github.com/bifravst/prettier-config

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

- 包体积（解压后）：8.7 kB，13 个文件
- 模块格式：ES Module
- TypeScript 类型：未声明
- Node.js 要求：\>=24\.22\.1 \<25 \|\| \>=26\.12\.1 \<27
- 运行依赖：2 个
- 首次发布：2024-02-16T15:16:10.346Z
- 最新版本发布：2026-10-30T11:39:13.833Z
- 近 30 天下载量：7526（2026-10-08 至 2026-11-06，npm 官方下载统计）
- 已发布版本数：29（近 12 个月 10 个）

## 中文简介

我们项目的初步配置

## 安装

```sh
npm install @bifravst/prettier-config
```

也可以使用：`pnpm add @bifravst/prettier-config`、`yarn add @bifravst/prettier-config`、`bun add @bifravst/prettier-config`

## README

# 高级配置 [![npm version](https://img.shields.io/npm/v/@bifravst/prettier-config.svg)](https://www.npmjs.com/package/@bifravst/prettier-config)

[![Test and Release](https://github.com/bifravst/prettier-config/actions/workflows/release.yaml/badge.svg)](https://github.com/bifravst/prettier-config/actions/workflows/release.yaml) [![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release) [![Renovate](https://img.shields.io/badge/renovate-enabled-brightgreen.svg)](https://renovatebot.com/) [![@commitlint/config-conventional](https://img.shields.io/badge/%40commitlint-config--conventional-brightgreen)](https://github.com/conventional-changelog/commitlint/tree/master/@commitlint/config-conventional) [![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg)](https://github.com/prettier/prettier/)

我们项目的初步配置

## 安装

```
npm i --save-dev --save-exact @bifravst/prettier-config
```

## 使用量

添加为 `package.json`数字 :

```json
{
  "prettier": "@bifravst/prettier-config"
}
```

## 节点和国家预防机制

这个项目需要节点.js `>=24.22.1 <25 || >=26.12.1 <27` 页:1 `>=12.0.2 <13` (通过 `check-node-version` 打开 `npm install` 财务报告和审定财务报表 `npm ci`) (中文(简体) ).

检查时跳过 `npm publish` 财务报告和审定财务报表 `npm pack`,因为 `semantic-release` 捆绑自己的npm(`@semantic-release/npm` 取决于 `npm@^11.6.2`)并使用该版本而不是该版本运行出版物 安装于 CI.

## 常见问题

### @bifravst/prettier-config 是什么？

我们项目的初步配置

### 如何安装 @bifravst/prettier-config？

在项目目录运行 npm install @bifravst/prettier-config，或使用 pnpm add / yarn add / bun add。

### @bifravst/prettier-config 支持 TypeScript 吗？

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

### @bifravst/prettier-config 支持 ESM 还是 CommonJS？

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

### @bifravst/prettier-config 需要什么版本的 Node\.js？

package\.json 的 engines 字段要求 Node\.js \>=24\.22\.1 \<25 \|\| \>=26\.12\.1 \<27。版本不符时 npm 默认只给出警告，开启 engine-strict 后会拒绝安装。

### @bifravst/prettier-config 可以商用吗？

@bifravst/prettier-config 使用 BSD-3-Clause 许可。宽松许可：允许商业使用、修改和再分发，通常只需在分发时保留原版权与许可声明。另外不得用原作者名义为衍生产品背书。以上为概括，不构成法律意见，请以许可原文为准。

### @bifravst/prettier-config 的下载量有多少？

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

### @bifravst/prettier-config 还在维护吗？

最新版本 2\.0\.5 发布于 2026/10/30（9 天前）；至今共发布 29 个版本，其中过去 12 个月发布了 10 个；首次发布于 2024/02/16。发布频率只是参考信号：功能稳定的工具可能很少需要更新，建议结合源码仓库的 issue 和提交记录判断。

