Check for unhelpful ‘assuming’ phrases such as 'just', 'simply' or 'obviously' with retext.
Using these phrases in documentation is unhelpful: “simple” is relative to a users’ knowledge and experience. Often it is fine to leave the phrase out completely:
“Simply run the tests. Just type
“To run the tests type
Install through npm:
npm install retext-assuming
Say we have the following file,
And our script,
example.js, looks as follows:
var vfile = ;var report = ;var retext = ;var dontAssume = ;;
Should result in:
example.txt1:9-1:13 warning Avoid “just”, it's not helpful no-just retext-assuming2:15-2:21 warning Avoid “simply”, it's not helpful no-simply retext-assuming3:1-3:10 warning Avoid “Obviously”, it's not helpful no-obviously retext-assuming4:1-4:9 warning Avoid “Actually”, it's not helpful no-actually retext-assuming4:22-4:26 warning Avoid “easy”, it's not helpful no-easy retext-assuming⚠ 3 warnings
Checks for unhelpful phrases such as “just”, “simply” or “obviously” in processed text.
dontAssume is the assigned name of our
required module. You can name it however you like.
Array.<string> — list of phrases to warn about (defaults to
Array.<string> — phrases not to warn about.
Boolean — If
true includes matches that are probably fine (“You should not simply assume”)
retext-equality— Check possible insensitive, inconsiderate language
retext-intensify— Check for weak and mitigating wording
retext-passive— Check passive voice
retext-profanities— Check profane and vulgar wording