@faircopy/rules-default

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

Default ruleset for faircopy: no-complex-sentences, no-em-dash, no-weasel-words, no-rhetorical-scaffolding, no-non-inclusive-language, no-redundant-phrases, no-passive-voice, no-cliches, no-repetitive-sentence-startings, no-filler-words

原始使用文档
文档目录11 节
  1. Install
  2. Rules
  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-default

Default ruleset for faircopy. Ships nine rules targeting the most common landing-page copy patterns.

Install

Included automatically when you install faircopy. To use standalone:

npm i @faircopy/rules-default

Rules

no-complex-sentences

Flags individual sentences whose Flesch-Kincaid grade level exceeds a target.

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

Options:

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

Config example:

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

no-em-dash

Bans the em-dash character (—, U+2014) in marketing copy.

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

Options:

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

Config example:

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

no-weasel-words

Bans reinforcement adverbs that weaken claims.

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

Options:

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

Config example:

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

no-filler-words

Bans filler words that pad out a sentence without adding meaning.

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

Options:

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

Config example:

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

no-rhetorical-scaffolding

Bans three formulaic patterns:

  1. X is Y, not Z constructions
  2. Without X... With X... sentence pairs
  3. Standalone This/That distinction/difference matters. importance announcements
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

Options:

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

Importance announcements match only the four combinations of This or That, distinction or difference, and matters, case-insensitively. They must start the extracted text, a sentence, or a blank-line-separated paragraph, and end with ., !, ?, or the end of the extracted text. Whitespace between words may include line breaks; surrounding quotes and parentheses are allowed. Diagnostics highlight the phrase and terminal punctuation, excluding leading whitespace and surrounding quotes. No automatic deletion or replacement is offered.

State the consequence directly:

  • Before: That distinction matters. Only owners can change the file.
  • After: Only owners can change the file.

Substantive uses remain valid, including That distinction matters because only owners can change the file., This difference matters when access changes., and The distinction between read and write access determines who can change the file. Clauses continued with a comma, colon, or semicolon are also retained. This is a bounded stock-phrase check, not a ban on these words.

Use the existing severity and suppression conventions, or allow only this family while retaining the other scaffolding checks:

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

Set the rule to 'off' to disable every family, or use a rule-specific comment such as // faircopy-ignore-next-line no-rhetorical-scaffolding for an intentional use. The CLI and downstream consumers use the same exported rule and registry.


no-non-inclusive-language

Flags non-inclusive terms and suggests neutral alternatives.

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

Default terms:

TermSuggested alternatives
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

Options:

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

Config example:

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

Single-word terms always match with word boundaries, so master will not flag masterpiece. Default multi-word phrases such as sanity check and blind spot use exact: true, so sanity checker is not flagged. Set exact: false on a custom multi-word term to match it as a substring anywhere in the text.

allowedTerms is case-insensitive: adding master also permits Master or MASTER.


no-redundant-phrases

Flags wordy redundant phrases and suggests concise replacements.

Default phrases include:

PhraseSuggested replacement
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(delete)
needless to say(delete)
warn[no-redundant-phrases]: "in order to" is redundant — use "to"

Options:

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

Config example:

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

Set replacement to an empty string to suggest deleting the phrase entirely.


no-cliches

Flags overused or clichéd phrases and suggests fresher alternatives.

Default phrases include:

PhraseSuggested alternatives
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"

Options:

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

Config example:

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

no-passive-voice

Flags likely passive-voice constructions using auxiliary + past participle patterns.

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

Passive voice often hides the actor and adds drag. Prefer naming who did the action unless the actor genuinely does not matter.

Options:

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

Config example:

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 是什么?

Default ruleset for faircopy: no-complex-sentences, no-em-dash, no-weasel-words, no-rhetorical-scaffolding, no-non-inclusive-language, no-redundant-phrases, no-passive-voice, no-cliches, no-repetitive-sentence-startings, no-filler-words

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