npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

eslint-plugin-inclusive-language

v2.2.1

Published

An ESLint plugin to raise awareness for using inclusive language not only in your codebase, but in life.

Downloads

201,397

Readme

eslint-plugin-inclusive-language

An ESLint plugin to raise awareness for using inclusive language not only in your codebase, but in life.

Github Workflow Version

If you're upgrading from 1.x.x. to 2.x.x, please read the migration document here first.

What is inclusive language anyway?

This is a great question to ask.

Lets start with a general definition of "inclusive language":

Inclusive language is language that is free from words, phrases or tones that reflect prejudiced, stereotyped or discriminatory views of particular people or groups. It is also language that doesn’t deliberately or inadvertently exclude people from being seen as part of a group. (Source)

While it sounds obvious to adhere to use language that is inclusive, it may not always be as obvious to apply as you think. Sometimes it can also be subtle, and you're just not aware. Especially when you're using language that is not your first language. I am speaking out of my own experience.

Let me give you a simple example (where I had to unlearn non-inclusive behavior myself): How often do you use the term "hey guys" when addressing a group of people? And how often can you say with 100% certainty that all members of that group identify as male? In English lessons I learned many decades ago that it's OK to use "guys" to address any group. In reality it's not OK, and adjusting (in this case my own) language helps others to be more included in conversations.

There are many terms that we can have really looooong arguments about if they are inclusive, or non-inclusive. And there are many that are really obvious. Depending on your first language, it can be even more difficult to differentiate.

This plugin contains, for now, four terms, where IMHO the tech industry as a whole is coming to/came to a consensus to change (the existing) standards. It will grow, over time. If you want to see some of this for yourself, there is a discussion about these terms here.

Now, if you ask yourself "Do I really need this plugin?"... read further.

Why would I need an ESLint plugin for that?

There may be a high likelihood you won't need it. You still may want to use it though.

First, if you read all this text, and if you haven't been aware of this topic until now, then I've reached my goal for this project. Think about it, read about it (there's plenty of information on the internet), discuss with your colleagues and friends, and hopefully apply a more inclusive language.

Second, if you want to raise awareness, using this plugin is an option (eventually not the only one). Just having it in your codebase, and with that eventually bringing people to this repository and text, is a step. When more people learn, more people will apply these patterns to their own language.

Third, if you want to participate, you can open issues on the repo. Or customize this plugin for your own usage or language, fork the repository, whatever you prefer. I don't care really about npm installs, or stars on this particular repo. I care that you start learning about inclusive language, and how to apply it. It's still a journey for me, unlearning many different behaviours.

Installation

Ok, you're here, so let's come to the technical part.

You'll first need to install ESLint:

$ npm i eslint --save-dev

Next, install eslint-plugin-inclusive-language:

$ npm install eslint-plugin-inclusive-language --save-dev

Note: If you installed ESLint globally (using the -g flag) then you must also install eslint-plugin-inclusive-language globally.

Usage

Add inclusive-language to the plugins section of your .eslintrc configuration file. You can omit the eslint-plugin- prefix:

{
    "plugins": ["inclusive-language"]
}

Then configure the rule use-inclusive-words.

{
    "rules": {
        "inclusive-language/use-inclusive-words": "error"
    }
}

That's it. You can find information on how to customize it in the rule documentation.