DEV Community

Discussion on: Do you consider the term "blacklist" a "racist" term? If yes, what is the alternative?

Collapse
 
nikoheikkila profile image
Niko Heikkilä

Allowlist / denylist.

Collapse
 
yaorenjie profile image
Yao Ren Jie

Good ideas:)

Collapse
 
terkwood profile image
Felix Terkhorn

Yep, regardless of the little arguments about the legacy terms, it's not super hard to think of intelligent alternatives 🧠 🌟 🙏🏻 allowlist/denylist is very clear to read and understand.

Collapse
 
nikoheikkila profile image
Niko Heikkilä

I'm pretty happy that we have open-source projects like Alex for checking against these words. Here's what the CLI tool had to say about words.txt file containing words whitelist and blacklist.

❯ alex -t words.txt
words.txt
  1:1-1:10  warning  `whitelist` may be insensitive, use `passlist`, `alrightlist`, `safelist`, `allow list` instead  whitelist  retext-equality
  2:1-2:10  warning  `blacklist` may be insensitive, use `blocklist`, `wronglist`, `banlist`, `deny list` instead     blacklist  retext-equality

I've set up Alex to lint my blog posts on publishing via GitHub Actions. It isn't flawless, though, but there's plenty of room for configuration.