@faircopy/rules-default

中文文档
1.27.3发布于 2026/11/07MITTypeScriptES Module构建来源已验证近 30 天下载 1.2万

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

中文使用文档
文档目录11 节
  1. 安装
  2. 规则
  3. no-complex-sentences
  4. no-em-dash
  5. no-weasel-words
  6. no-filler-words
  7. no-rhetorical-scaffolding
  8. no-non-inclusive-language
  9. no-redundant-phrases
  10. no-cliches
  11. no-passive-voice

@ faircopy/ rules- 默认

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

安装

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

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

选项 :

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

配置示例 :

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

选项 :

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

配置示例 :

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

no-weasel-words

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

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

选项 :

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

配置示例 :

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

no-filler-words

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

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

选项 :

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

配置示例 :

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

选项 :

{
  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. 保留带有逗号、结号或分号的条款. 这是限定的股票单词检查,不是禁止这些单词.

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

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"

默认条件 :

任期建议的替代品
guyseveryone, (中文(简体) ), team, (中文(简体) ), folks
manpowerworkforce, (中文(简体) ), staffing, (中文(简体) ), personnel
whitelistallowlist
blacklistdenylist, (中文(简体) ), blocklist
masterprimary, (中文(简体) ), main, (中文(简体) ), leader
slavesecondary, (中文(简体) ), replica, (中文(简体) ), follower
crazyunexpected, (中文(简体) ), intense, (中文(简体) ), extreme
insaneextreme, (中文(简体) ), unbelievable, (中文(简体) ), remarkable
dumbunhelpful, (中文(简体) ), poor, (中文(简体) ), uninformed
lameunimpressive, (中文(简体) ), inadequate, (中文(简体) ), weak
sanity checkquick check, (中文(简体) ), confidence check, (中文(简体) ), verification
blind spotunaware area, (中文(简体) ), gap, (中文(简体) ), oversight
grandfatheredlegacy status, (中文(简体) ), exempted
mankindhumanity, (中文(简体) ), humankind, (中文(简体) ), people

选项 :

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

配置示例 :

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 toto
due to the fact thatbecause
in spite of the fact thatalthough
at this point in timenow
in the event thatif
for the purpose ofto
with regard toabout
in close proximity tonear
a large number ofmany
the reason is thatbecause
it is important to note that(删除)
needless to say(删除)
warn[no-redundant-phrases]: "in order to" is redundant — use "to"

选项 :

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

配置示例 :

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

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


no-cliches

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

默认短语包括:

词组建议的替代品
world-classtop-tier, (中文(简体) ), exceptional, (中文(简体) ), outstanding
best-in-classleading, (中文(简体) ), top-performing, (中文(简体) ), category-leading
cutting-edgeadvanced, (中文(简体) ), modern, (中文(简体) ), latest
state-of-the-artadvanced, (中文(简体) ), modern, (中文(简体) ), sophisticated
game changerbreakthrough, (中文(简体) ), transformation, (中文(简体) ), major advance
think outside the boxbe creative, (中文(简体) ), innovate, (中文(简体) ), find a new approach
at the end of the dayultimately, (中文(简体) ), finally, (中文(简体) ), in summary
low-hanging fruiteasy wins, (中文(简体) ), quick opportunities, (中文(简体) ), simple targets
move the needlemake a measurable difference, (中文(简体) ), drive results, (中文(简体) ), create impact
circle backfollow up, (中文(简体) ), reconnect, (中文(简体) ), return to this
hit the ground runningstart quickly, (中文(简体) ), get started immediately, (中文(简体) ), begin effectively
boil the oceantake on too much, (中文(简体) ), overcomplicate, (中文(简体) ), lose focus
paradigm shiftfundamental change, (中文(简体) ), new approach, (中文(简体) ), transformation
next leveladvanced, (中文(简体) ), improved, (中文(简体) ), elevated
seamlesssmooth, (中文(简体) ), effortless, (中文(简体) ), frictionless
robuststrong, (中文(简体) ), resilient, (中文(简体) ), reliable
leverageuse, (中文(简体) ), take advantage of, (中文(简体) ), utilize
synergycollaboration, (中文(简体) ), combined effect, (中文(简体) ), partnership
warn[no-cliches]: replace "world-class" with a fresher alternative such as "top-tier, exceptional, outstanding"

选项 :

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

配置示例 :

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

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

选项 :

{
  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.
}

配置示例 :

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

版本与发布记录

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

版本发布日期距今
1.27.3latest2026/11/077 天前
1.27.22026/11/077 天前
1.27.12026/11/077 天前
1.27.02026/11/0410 天前
1.26.02026/10/2124 天前
1.25.02026/10/2025 天前

关于 @faircopy/rules-default 的常见问题

@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 和提交记录判断。