question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Replace use of whitelist with allowlist and blacklist with denylist

See original GitHub issue

We can use better terminology and promote diversity.

As stated in the CODE_OF_CONDUCT:

  • Using welcoming and inclusive language
  • Being respectful of differing viewpoints and experiences
  • Gracefully accepting constructive criticism
  • Focusing on what is best for the community
  • Showing empathy towards other community members

Whitelists would become allowlists Blacklists would become denylists

This is what I proposed for Tailwind CSS (https://github.com/tailwindcss/tailwindcss/issues/1868) to map to PurgeCSS’ options:

  • whitelist -> allowlist
  • whitelistPatterns -> allowlistPatterns
  • whitelistPatternsChildren -> allowlistPatternsChildren

The unwelcoming terms could still be supported, but no more documented. It would not break any code already using it but would enforce better standards for future.

It has to start somewhere. Good documentation on our side would reduce the friction and send a message: we are doing our part.

I’m not familiar with the codebase, but would be willing to make these changes as in most of the cases it would be documentation and renaming (yes, I propose to also change internal code, but leave the minimum necessary to keep old properties working)

inspired by Rails: https://github.com/rails/rails/issues/33677

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:52
  • Comments:9 (4 by maintainers)

github_iconTop GitHub Comments

8reactions
endertoncommented, Jun 2, 2020

wholehearted +1000

4reactions
adamwathancommented, Jun 6, 2020

I think that especially since this can be done with no breaking changes there’s no reason not to use try and use less divisive terminology here.

I think the proposed allowlist and denylist are not great because the definitions of the words allow and deny aren’t perfect metaphors for what the options do — they make sense in other contexts but here it’s more about preserving than allowing. I think when making a change like this we should aim to choose a name that is not only more inclusive than “whitelist” but also better, like DHH talks about in the linked Rails issue.

It’s worth noting is that there is no “blacklist” feature/option in PurgeCSS currently, so we only really have to think of something for “whitelist”.

I’ve been thinking through different options and I think the one I like most is safelist. It’s actually shorter than whitelist, and has history of being used in place of “whitelist” in other contexts, like email for example.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Replace use of whitelist with allowlist and blacklist with denylist
Scenario 1: Whitelist/blacklist is used in the product itself, and therefore in docs as an direct reference. Raise an issue (or request that...
Read more >
Replace "whitelist" and "blacklist" terms by "allowlist" and ...
There has been a debate in the IT sec community for a while now about the terms "whitelist" and "blacklist", see e.g. here....
Read more >
Why changing the terms blacklist and whitelist isn't as easy as ...
Replacing racially loaded terms like blacklist and whitelist can be hard ... used alternatives for “blacklist” are denylist and blocklist.
Read more >
Terminology: it's not black and white - NCSC.GOV.UK
Terminology: it's not black and white. The NCSC now uses 'allow list' and 'deny list' in place of 'whitelist' and 'blacklist'. Emma ...
Read more >
Consider renaming "whitelist" and "blacklist" to "allow-list ... - Jira
Solution: Use non-exclusionary terms instead. I suggest allow-list and deny-list. This change should be made in product as well as in our ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found