retext plugin to check for possible insensitive, inconsiderate language.
npm install retext-equality
Say we have the following file,
He’s pretty set on beating your butt for sheriff.
…and our script,
example.js, looks like this:
var vfile =var report =var unified =var english =var stringify =var equality =
node example yields:
example.txt1:1-1:5 warning `He’s` may be insensitive, use `They`, `It` instead he-she retext-equality⚠ 1 warning
Check for possible insensitive, inconsiderate language.
List of phrases not to warn about (
Do not allow binary references (
he is warned about unless it’s followed by something like
true, both cases would be warned about.
rules.md for a list of rules and how rules work.
Each message is emitted as a
file, with the
Name of this plugin (
Current not ok phrase (
Suggest ok phrase (
Extra information, when available (
alex— Catch insensitive, inconsiderate writing
retext-passive— Check passive voice
retext-profanities— Check for profane and vulgar wording
retext-simplify— Check phrases for simpler alternatives
To create new patterns, add them in the YAML files in the
directory, and run
npm install and then
npm test to build everything.
Please see the current patterns for inspiration.
New English rules will be automatically added to
Once you are happy with the new rule, add a test for it in
open a Pull Request.
This project has a Code of Conduct. By interacting with this repository, organisation, or community you agree to abide by its terms.