Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve option naming #942

Closed
sindresorhus opened this issue Dec 20, 2020 · 7 comments · Fixed by #1180
Closed

Improve option naming #942

sindresorhus opened this issue Dec 20, 2020 · 7 comments · Fixed by #1180

Comments

@sindresorhus
Copy link
Owner

sindresorhus commented Dec 20, 2020

I don't think we should use whitelist/blacklist type naming. They have negative connotations for some.

whitelist => allowList
blacklist => denyList

This applies to:

  • blacklist option in no-keyword-prefix
  • whitelist option in prevent-abbreviations
  • extendDefaultWhitelist option in prevent-abbreviations

I'm not really interested in discussing the merits of this. It's the right thing to do.

https://thenextweb.com/dd/2020/07/13/linux-kernel-will-no-longer-use-terms-blacklist-and-slave/

@fisker
Copy link
Collaborator

fisker commented Dec 20, 2020

Rename default branch to main?

@sindresorhus
Copy link
Owner Author

Rename default branch to main?

GitHub promised they would come with a feature to automate this, so I'm waiting for that.

@fregante
Copy link
Collaborator

fregante commented Dec 26, 2020

Why List? It could just be allow/deny, include/exclude, etc

Or something even more appropriate than a generic whitelist/blacklist equivalent:

  • prevent-abbreviations: except/allowed
  • no-keyword-prefix: keywords (i.e. the keywords that are not allowed)

@sindresorhus
Copy link
Owner Author

@fregante That was just the recommended replacement when I read about it.


prevent-abbreviations: except/allowed

Yeah, allowed would work there. What would extendDefaultWhitelist be then?

no-keyword-prefix: keywords (i.e. the keywords that are not allowed)

👍

@fregante
Copy link
Collaborator

Not as clear probably, but

  • extendDefaultList
  • extendDefaultAllowedList
  • extendDefaults

@sindresorhus
Copy link
Owner Author

extendDefaultList
extendDefaultAllowedList

Why *List? 😛

@fisker
Copy link
Collaborator

fisker commented Apr 14, 2021

When I send #1164, I forgot this issue, allowed was suggested for prevent-abbreviations, but I guess allowList is fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants