Alexandro.Net

Version 1.0.0

@stackline/retext-equality

retext plugin to warn about possible insensitive, inconsiderate language

Independent maintenance of retext-equality 6.6.0. Original authors and licenses are retained.

Installation

# Preserve existing imports with an npm alias
npm install retext-equality@npm:@stackline/retext-equality@1.0.0
# Or use the scoped package name in your imports
npm install @stackline/retext-equality@1.0.0

Node.js: See compatibility notes. Read the compatibility and maintenance notes before migrating.

Usage and API

The reference below may retain upstream package names. Use the alias installation above to run those imports with this Stackline release.

@stackline/retext-equality

Independent maintenance fork of retext-equality@6.6.0, preserving its API and published type declarations.

npm install @stackline/retext-equality
# Keep existing imports:
npm install retext-equality@npm:@stackline/retext-equality@1.0.0

Stackline · Issues · Community

See UPSTREAM.md for source identity and issue review, and CHANGELOG.md for maintenance changes. Functional tests also run against the final npm tarball; releases are published from GitHub Actions with provenance.

Upstream documentation

retext-equality

Build Coverage Downloads Size Sponsors Backers Chat

retext plugin to check for possible insensitive, inconsiderate language.

Install

This package is ESM only: Node 12+ is needed to use it and it must be imported instead of required.

npm:

npm install retext-equality

Use

Say we have the following file, example.txt:

He’s pretty set on beating your butt for sheriff.

…and our script, example.js, looks like this:

import {readSync} from 'to-vfile'
import {reporter} from 'vfile-reporter'
import {unified} from 'unified'
import retextEnglish from 'retext-english'
import retextEquality from 'retext-equality'
import retextStringify from 'retext-stringify'

const file = readSync('example.txt')

unified()
  .use(retextEnglish)
  .use(retextEquality)
  .use(retextStringify)
  .process(file)
  .then((file) => {
    console.error(reporter(file))
  })

Now, running node example yields:

example.txt
  1:1-1:5  warning  `He’s` may be insensitive, use `They`, `It` instead  he-she  retext-equality

⚠ 1 warning

API

This package exports no identifiers. The default export is retextEquality.

unified().use(retextEquality[, options])

Check for possible insensitive, inconsiderate language.

options.ignore

List of phrases not to warn about (Array.<string>).

options.noBinary

Do not allow binary references (boolean, default: false). By default he is warned about unless it’s followed by something like or she or and she. When noBinary is true, both cases would be warned about.

Messages

See rules.md for a list of rules and how rules work.

Each message is emitted as a VFileMessage on file, with the following fields:

message.source

Name of this plugin ('retext-equality').

message.ruleId

See id in rules.md.

message.actual

Current not ok phrase (string).

message.expected

Suggest ok phrase (Array.<string>).

message.note

Extra information, when available (string?).

Related

Contributing

See contributing.md in retextjs/.github for ways to get started. See support.md for ways to get help.

To create new patterns, add them in the YAML files in the data/ 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 rules.md.

Once you are happy with the new rule, add a test for it in test.js and open a pull request.

This project has a code of conduct. By interacting with this repository, organization, or community you agree to abide by its terms.

License

MIT © Titus Wormer

Upstream issues and maintenance review

Upstream and maintenance review

This package maintains retext-equality@6.6.0 under the independent @stackline/retext-equality name.

Issue triage

The queried open-issue list contained no issue entries. This does not establish that the upstream is abandoned or bug-free. No runtime bug fix is claimed for this initial maintenance release.

The evidence query fetched the latest 100 open and 30 closed issue/PR entries and removed PRs. Closed entries were collected for context; this report does not claim an exhaustive historic review.

Release discipline

The source commit, passing CI and CodeQL, reviewed CI tarball hash, npm provenance, normal and aliased installs, and immutable GitHub release are checked before a release is complete. Published versions and tags are never replaced.

Release changes

Changelog

1.0.0

Release files and references

Package bytes, npm provenance and the immutable GitHub release were verified for this version. Security checks describe the reviewed release; documented compatibility risks and upstream reports are not blanket claims of resolution.