You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
chore(claude): add 'inclusive language' rule to CLAUDE.md
Codifies the substitution table for whitelist/blacklist/master/etc.
Allowlist/denylist/main aren't euphemisms — they're more accurate
descriptions of what the lists do. Carves out exceptions for
third-party APIs and vendored upstream sources where renaming would
break the boundary.
Copy file name to clipboardExpand all lines: CLAUDE.md
+22Lines changed: 22 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -190,6 +190,28 @@ When in doubt, sort. The cost of a sorted list that didn't need to be is approxi
190
190
191
191
When you spot duplication, the answer is never "update both" — the answer is "delete one and import the other." Fix the architecture, not the symptom.
192
192
193
+
### Inclusive Language
194
+
195
+
Use precise, neutral terms over historical metaphors that imply hierarchy or exclusion. The substitutes are not euphemisms — they're more *accurate* (a list of allowed values genuinely is an "allowlist"; "whitelist" is a metaphor that hides what the list does).
Apply across **code** (identifiers, comments, string literals), **docs** (READMEs, CLAUDE.md, markdown), **config files** (YAML, JSON), **commit messages**, **PR titles/descriptions**, and **CI logs** you control.
208
+
209
+
Two exceptions where the legacy term must remain (because changing it breaks something external):
210
+
-**Third-party APIs / upstream code**: when interfacing with an external API field literally named `whitelist`, keep the field name; rename your local variable. E.g. `const allowedDomains = response.whitelist`.
211
+
-**Vendored upstream sources**: don't rewrite vendored code (`vendor/**`, `upstream/**`, `**/fixtures/**`). Patch around it if needed.
212
+
213
+
When you encounter a legacy term during unrelated work, fix it inline — don't defer.
214
+
193
215
### Error Messages
194
216
195
217
An error message is UI. The reader should be able to fix the problem from the message alone, without opening your source.
0 commit comments