@faircopy/rules-default
v1.5.0
Published
Default ruleset for faircopy: no-em-dash, no-weasel-words, no-rhetorical-scaffolding
Readme
@faircopy/rules-default
Default ruleset for faircopy. Ships three rules targeting the most common landing-page copy patterns.
Install
Included automatically when you install faircopy. To use standalone:
npm i @faircopy/rules-defaultRules
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-dashOptions:
{
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 claimOptions:
{
words: string[] // Default: ['actually', 'truly', 'really', 'literally']
}Config example:
rules: {
'no-weasel-words': ['error', { words: ['actually', 'truly', 'really', 'literally', 'just', 'simply'] }],
}no-rhetorical-scaffolding
Bans two formulaic patterns:
X is Y, not ZconstructionsWithout X... With X...sentence pairs
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 claimOptions:
{
allowIsNotConstruction?: boolean // Disable pattern 1. Default false.
allowWithoutWithConstruction?: boolean // Disable pattern 2. Default false.
extraPatterns?: string[] // Additional regex patterns to ban.
}