# @faircopy/rules-default 中文文档

规范地址：https://npmcn.com/package/%40faircopy/rules-default/

版本：1\.27\.3
npm 元数据更新时间：2026-11-07T06:14:10.978Z
中文译文更新时间：2026-11-14T09:00:23.912Z
软件包许可：MIT

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

原始 npm 页面：https://www.npmjs.com/package/%40faircopy/rules-default
原文对照：https://npmcn.com/package/%40faircopy/rules-default/?lang=original
项目主页：https://github.com/omniaura/faircopy#readme
源码仓库：https://github.com/omniaura/faircopy

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

- 包体积（解压后）：122 kB，5 个文件
- 模块格式：ES Module
- TypeScript 类型：包内自带
- 运行依赖：1 个
- 首次发布：2026-04-23T09:21:45.696Z
- 最新版本发布：2026-11-07T06:14:10.583Z
- 近 30 天下载量：11996（2026-10-14 至 2026-11-12，npm 官方下载统计）
- 已发布版本数：35（近 12 个月 35 个）

## 中文简介

平按:"素问"作平按:"素问"作平按:"素问"作平作平作平作平作平作平作平作平作平作平作平作平作平作平作平作平作平作平作平作平作平作平作平作平作平作平作平作平作平作平作平作平作平作平作平作平作平作平作平作平作平作平作平作平作平作平作平作平作平作平作平作平作平作平作平作平作平作平作平作平作平作平作平作平作平作平作平作平作平作平作平作平作平作平作平作平作平作平作平作平作平作平作平作平作平作平作平作平作平作平作平作平作平作平作平作平作平作平作平作平作平作平作平作平作平作平作平作平作平作平作平作平作平作平作平作平

## 安装

```sh
npm install @faircopy/rules-default
```

也可以使用：`pnpm add @faircopy/rules-default`、`yarn add @faircopy/rules-default`、`bun add @faircopy/rules-default`

## README

# @ faircopy/ rules- 默认

公平复制的默认规则。 以最常见的登陆页副本模式为目标的"九条规则".

## 安装

安装时自动包含 `faircopy`。单独使用:

```sh
npm i @faircopy/rules-default
```

## 规则

### `no-complex-sentences`

标出Flesch-Kincaid级别超过目标的个人句子.

```
warn[no-complex-sentences]: sentence readability is grade 18.5 — simplify to 12 or below
```

**选项 :**

```ts
{
  maxGradeLevel?: number  // Default: 12
  minWords?: number       // Minimum words before scoring a sentence. Default: 10
}
```

**配置示例 :**

```ts
rules: {
  'no-complex-sentences': ['warn', { maxGradeLevel: 10, minWords: 8 }],
}
```

* * *

### `no-em-dash`

禁用嵌入式字符( E)`—`, U+2014) 在营销副本.

```
error[no-em-dash]: use a sentence break instead of an em-dash
```

**选项 :**

```ts
{
  flagEnDash?: boolean        // Also flag en-dashes (–). Default false.
  flagDoubleHyphen?: boolean  // Also flag --. Default false.
}
```

**配置示例 :**

```ts
rules: {
  'no-em-dash': ['error', { flagDoubleHyphen: true }],
}
```

* * *

### `no-weasel-words`

禁止削弱主张的强化副词.

```
error[no-weasel-words]: remove "actually" — it weakens the claim
```

**选项 :**

```ts
{
  words: string[]  // Default: ['actually', 'truly', 'really', 'literally']
}
```

**配置示例 :**

```ts
rules: {
  'no-weasel-words': ['error', { words: ['actually', 'truly', 'really', 'literally', 'just', 'simply'] }],
}
```

* * *

### `no-filler-words`

禁止填充句子而不添加意义.

```
error[no-filler-words]: remove "just" — it's filler
```

**选项 :**

```ts
{
  words: string[]  // Default: ['just']
}
```

**配置示例 :**

```ts
rules: {
  'no-filler-words': ['error', { words: ['just', 'basically', 'literally'] }],
}
```

* * *

### `no-rhetorical-scaffolding`

禁止三种公式模式:

1.  `X is Y, not Z` 建筑
2.  `Without X... With X...` 句子对
3.  独立 `This/That distinction/difference matters.` 重要事项通知

```
error[no-rhetorical-scaffolding]: avoid "X is Y, not Z" — state the claim directly
error[no-rhetorical-scaffolding]: avoid "Without X / With X" — drop the setup and make the claim
error[no-rhetorical-scaffolding]: avoid "That distinction matters" — state the point directly
```

**选项 :**

```ts
{
  allowIsNotConstruction?: boolean       // Disable pattern 1. Default false.
  allowWithoutWithConstruction?: boolean // Disable pattern 2. Default false.
  allowImportanceAnnouncements?: boolean // Disable pattern 3. Default false.
  extraPatterns?: string[]               // Additional regex patterns to ban.
}
```

重要通知只匹配四个组合 `This` 或者说 `That`, (中文(简体) ), `distinction` 或者说 `difference`,以及 `matters`,对案例不敏感。 他们必须开始 取出的案文、句子或空行分隔的段落,并结束 与 `.`, (中文(简体) ), `!`, (中文(简体) ), `?`,或提取文本的结尾。 单词之间的空白 可能包括换行符;允许周围的引文和括号. 诊断突出该短语和末端点,不包括领先 白空间和周围引文。 不提供自动删除或替换.

直接说明后果:

-   在此之前: `That distinction matters. Only owners can change the file.`
-   之后: `Only owners can change the file.`

实质性用途仍然有效,包括: `That distinction matters because only owners can change the file.`, (中文(简体) ), `This difference matters when access changes.`, (中文(简体) ), 财务报告和审定财务报表 `The distinction between read and write access determines who can change the file.` 保留带有逗号、结号或分号的条款. 这是限定的股票单词检查,不是禁止这些单词.

利用现有的严厉和禁止公约,或只允许这种家庭 保留其他脚手架检查:

```ts
rules: {
  'no-rhetorical-scaffolding': ['warn', { allowImportanceAnnouncements: true }],
}
```

设定规则为 `'off'` 以禁用每个家庭,或使用特定规则的评论 例如 `// faircopy-ignore-next-line no-rhetorical-scaffolding` 故意伤害 使用时。 CLI和下游消费者使用相同的出口规则和注册.

* * *

### `no-non-inclusive-language`

标出非包容性术语并推荐中性替代.

```
error[no-non-inclusive-language]: replace "guys" with a neutral alternative such as "everyone, team, folks"
```

**默认条件 :**

| 任期 | 建议的替代品 |
| --- | --- |
| `guys` | `everyone`, (中文(简体) ), `team`, (中文(简体) ), `folks` |
| `manpower` | `workforce`, (中文(简体) ), `staffing`, (中文(简体) ), `personnel` |
| `whitelist` | `allowlist` |
| `blacklist` | `denylist`, (中文(简体) ), `blocklist` |
| `master` | `primary`, (中文(简体) ), `main`, (中文(简体) ), `leader` |
| `slave` | `secondary`, (中文(简体) ), `replica`, (中文(简体) ), `follower` |
| `crazy` | `unexpected`, (中文(简体) ), `intense`, (中文(简体) ), `extreme` |
| `insane` | `extreme`, (中文(简体) ), `unbelievable`, (中文(简体) ), `remarkable` |
| `dumb` | `unhelpful`, (中文(简体) ), `poor`, (中文(简体) ), `uninformed` |
| `lame` | `unimpressive`, (中文(简体) ), `inadequate`, (中文(简体) ), `weak` |
| `sanity check` | `quick check`, (中文(简体) ), `confidence check`, (中文(简体) ), `verification` |
| `blind spot` | `unaware area`, (中文(简体) ), `gap`, (中文(简体) ), `oversight` |
| `grandfathered` | `legacy status`, (中文(简体) ), `exempted` |
| `mankind` | `humanity`, (中文(简体) ), `humankind`, (中文(简体) ), `people` |

**选项 :**

```ts
{
  terms?: { term: string; alternatives: string[]; exact?: boolean }[]
  allowedTerms?: string[]
}
```

**配置示例 :**

```ts
rules: {
  'no-non-inclusive-language': ['error', {
    terms: [
      { term: 'guys', alternatives: ['everyone', 'team'] },
      { term: 'rockstar', alternatives: ['expert', 'skilled'] },
    ],
    allowedTerms: ['master'],
  }],
}
```

单词词总是符合词的界限,所以 `master` 将不显示 `masterpiece`。默认的多词短语,例如 `sanity check` 财务报告和审定财务报表 `blind spot` 使用情况 `exact: true`这样 `sanity checker` 没有标记。 设定 `exact: false` 在一个自定义多词名词上与它相匹配,作为文本中任何地方的子字符串.

`allowedTerms` 不区分大小写: 添加 `master` 也许可 `Master` 或者说 `MASTER`。 。 。 .

* * *

### `no-redundant-phrases`

旗子文字冗余短语并推荐简洁取而代之.

默认短语包括:

| 词组 | 建议替换 |
| --- | --- |
| `in order to` | `to` |
| `due to the fact that` | `because` |
| `in spite of the fact that` | `although` |
| `at this point in time` | `now` |
| `in the event that` | `if` |
| `for the purpose of` | `to` |
| `with regard to` | `about` |
| `in close proximity to` | `near` |
| `a large number of` | `many` |
| `the reason is that` | `because` |
| `it is important to note that` | _(删除)_ |
| `needless to say` | _(删除)_ |

```
warn[no-redundant-phrases]: "in order to" is redundant — use "to"
```

**选项 :**

```ts
{
  phrases?: { phrase: string; replacement: string }[]
}
```

**配置示例 :**

```ts
rules: {
  'no-redundant-phrases': ['warn', {
    phrases: [
      { phrase: 'in order to', replacement: 'to' },
      { phrase: 'touch base', replacement: 'talk' },
    ],
  }],
}
```

设定 `replacement` 改为空字符串,建议完全删除该短语.

* * *

### `no-cliches`

旗子过度使用或陈词滥调,并提出更新鲜的替代方案.

默认短语包括:

| 词组 | 建议的替代品 |
| --- | --- |
| `world-class` | `top-tier`, (中文(简体) ), `exceptional`, (中文(简体) ), `outstanding` |
| `best-in-class` | `leading`, (中文(简体) ), `top-performing`, (中文(简体) ), `category-leading` |
| `cutting-edge` | `advanced`, (中文(简体) ), `modern`, (中文(简体) ), `latest` |
| `state-of-the-art` | `advanced`, (中文(简体) ), `modern`, (中文(简体) ), `sophisticated` |
| `game changer` | `breakthrough`, (中文(简体) ), `transformation`, (中文(简体) ), `major advance` |
| `think outside the box` | `be creative`, (中文(简体) ), `innovate`, (中文(简体) ), `find a new approach` |
| `at the end of the day` | `ultimately`, (中文(简体) ), `finally`, (中文(简体) ), `in summary` |
| `low-hanging fruit` | `easy wins`, (中文(简体) ), `quick opportunities`, (中文(简体) ), `simple targets` |
| `move the needle` | `make a measurable difference`, (中文(简体) ), `drive results`, (中文(简体) ), `create impact` |
| `circle back` | `follow up`, (中文(简体) ), `reconnect`, (中文(简体) ), `return to this` |
| `hit the ground running` | `start quickly`, (中文(简体) ), `get started immediately`, (中文(简体) ), `begin effectively` |
| `boil the ocean` | `take on too much`, (中文(简体) ), `overcomplicate`, (中文(简体) ), `lose focus` |
| `paradigm shift` | `fundamental change`, (中文(简体) ), `new approach`, (中文(简体) ), `transformation` |
| `next level` | `advanced`, (中文(简体) ), `improved`, (中文(简体) ), `elevated` |
| `seamless` | `smooth`, (中文(简体) ), `effortless`, (中文(简体) ), `frictionless` |
| `robust` | `strong`, (中文(简体) ), `resilient`, (中文(简体) ), `reliable` |
| `leverage` | `use`, (中文(简体) ), `take advantage of`, (中文(简体) ), `utilize` |
| `synergy` | `collaboration`, (中文(简体) ), `combined effect`, (中文(简体) ), `partnership` |

```
warn[no-cliches]: replace "world-class" with a fresher alternative such as "top-tier, exceptional, outstanding"
```

**选项 :**

```ts
{
  phrases?: { phrase: string; alternatives: string[] }[]
  allow?: string[]
}
```

**配置示例 :**

```ts
rules: {
  'no-cliches': ['warn', {
    phrases: [
      { phrase: 'world-class', alternatives: ['top-tier', 'exceptional'] },
      { phrase: 'low-hanging fruit', alternatives: ['easy wins'] },
    ],
    allow: ['robust'],
  }],
}
```

* * *

### `no-passive-voice`

使用辅助 + 过去 participle 模式的旗子可能为被动语音构造.

```
warn[no-passive-voice]: rewrite passive construction "was approved" with a named actor
```

被动的声音经常会隐藏演员并添加拖放. 除非演员真的无所谓 否则最好点名.

**选项 :**

```ts
{
  auxiliaries?: string[]  // Default: ['is', 'are', 'was', 'were', 'be', 'been', 'being']
  participles?: string[]  // Past participles to flag. Default is a curated list of common action participles.
  allowedPhrases?: string[] // Phrases to allow even if they match the passive pattern.
}
```

**配置示例 :**

```ts
rules: {
  'no-passive-voice': ['warn', {
    allowedPhrases: ['is licensed', 'was founded'],
  }],
}
```

## 常见问题

### @faircopy/rules-default 是什么？

平按:"素问"作平按:"素问"作平按:"素问"作平作平作平作平作平作平作平作平作平作平作平作平作平作平作平作平作平作平作平作平作平作平作平作平作平作平作平作平作平作平作平作平作平作平作平作平作平作平作平作平作平作平作平作平作平作平作平作平作平作平作平作平作平作平作平作平作平作平作平作平作平作平作平作平作平作平作平作平作平作平作平作平作平作平作平作平作平作平作平作平作平作平作平作平作平作平作平作平作平作平作平作平作平作平作平作平作平作平作平作平作平作平作平作平作平作平作平作平作平作平作平作平作平作平作平作平

### 如何安装 @faircopy/rules-default？

在项目目录运行 npm install @faircopy/rules-default，或使用 pnpm add / yarn add / bun add。

### @faircopy/rules-default 支持 TypeScript 吗？

支持。包内自带 TypeScript 类型声明（package\.json 声明了 types 入口），安装后即可获得类型提示，无需再安装 @types 包。

### @faircopy/rules-default 支持 ESM 还是 CommonJS？

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

### @faircopy/rules-default 可以商用吗？

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

### @faircopy/rules-default 的下载量有多少？

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

### @faircopy/rules-default 还在维护吗？

最新版本 1\.27\.3 发布于 2026/11/07（7 天前）；至今共发布 35 个版本，其中过去 12 个月发布了 35 个；首次发布于 2026/04/23。发布频率只是参考信号：功能稳定的工具可能很少需要更新，建议结合源码仓库的 issue 和提交记录判断。

