Add inconsiderateLanguage lint rule#267
Conversation
|
Q: Where do comment suppressions go for comments? I don't think I've ever encountered a lint error in a comment before |
|
Before the comment: |
|
Do the origins of these two terms really have anything to do with race or are they commonly used with a racist connotation though? |
|
It's black and white dualism which assumes that white = good and black = evil. There isn't really a good justification for using it, even in non racial contexts, when the alternative, allow and deny, are much clearer, to both English and non-English speakers,. |
|
These words can have legitimate bad connotations in certain situations though, e.g. black may allude to darkness (danger) and white to light (safety). Colors are used metaphorically differently throughout many languages really. There are many words we could change to reflect better their meaning, but thats not a good enough reason to rule them off our vocab |
|
Btw the University of Indiana has a list of acceptable metaphorical uses of colors in english and korean link. I understand the good intentions, but I dislike changing our language when nobody's being hurt. |
|
Well, it's just a lint rule. People can disable it if they have a legitimate use case but this forces them to be intentional about it. |
|
It's comical that one would even take 5min to put this rule in place...what a great joke. |
|
Using this rule is literally zero effort. There’s an autofix so you don’t even need to update the code yourself and it’s easy to suppress if you really want it. The benefit far outweighs the cost here. I’m locking this PR because there’s nothing to debate here. |
This PR adds a new lint rule called
inconsiderateLanguage. It produces errors for specific phrases such as blacklist and whitelist, and suggests alternatives like denylist and allowlist. Right now these are the only two terms we have definitions for. The description was taken fromretext-equality.Some interesting implementation details:
Diagnostics output: