reilly
TypeScript icon, indicating that this package has built-in type declarations

2.0.0 • Public • Published

Reilly

Check conversational English for insensitive language.

Inspired by Alex, but with more opinions and less noise.

Installation

npm install reilly

Usage

const reilly = require("reilly");

const text = "The **boogeyman** is coming.";
const settings = {
  presets: ["ableism"],
  enable: ["boogeyman-boogeywoman"],
  ignore: ["boogeyman"],
};

reilly(text, settings);

The default export is a function that take text: string as its first argument and settings?: ReillySettings as an optional second argument. It returns a promise to a VFile with messages set to include any issues found.

ReillySettings

Reilly understands the following properties in its settings argument:

  • presets?: string[]

    For example:

    reilly(text, { presets: ["ableism"] });

    Reilly comes with a number of presets ready to use. Provide an array of their names.

    Presets are only ever additive, meaning they will never disable or override each other.

    Other properties of settings override the presets where relevant.

  • enable?: string[]

    For example:

    reilly(text, { enable: ["boogeyman-boogeywoman"] });

    A list of rules to enable.

    If presets and enable are both undefined, all rules are enabled.

    Currently supported rules:

  • ignore?: string[]

    For example:

    reilly(text, { ignore: ["boogeyman"] });

    A list of "not ok" phrases to ignore, even when they would normally be caught by an enabled rule.

Related

Built with Reilly

  • Reilly Slack Bot - A Slack bot to check conversational English for insensitive language

Similar / Connected

Readme

Keywords

none

Package Sidebar

Install

npm i reilly

Weekly Downloads

3

Version

2.0.0

License

MIT

Unpacked Size

19.1 kB

Total Files

18

Last publish

Collaborators

  • erbridge