Skip to content

Commit

Permalink
feat: configure suggested word substitutions
Browse files Browse the repository at this point in the history
Our RFC suggests 'denylist' as an alternative to 'blacklist', so we add
that along with the built-in suggestion of 'blocklist'

artsy/README#427
  • Loading branch information
anandaroop committed Dec 1, 2021
1 parent 1bcc282 commit 25a3cef
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,18 @@ module.exports = {
'react/jsx-handler-names': 'off',
'react/prop-types': 'off',
'space-before-function-paren': ['error', 'never'],
'inclusive-language/use-inclusive-words': 'error',
'inclusive-language/use-inclusive-words': [
"error",
{
"words": [
{
"word": "blacklist",
"suggestions": ["denylist or blocklist"],
"explanation": "The usage of the non-inclusive word '{{word}}' is discouraged, use '{{suggestion}}' instead."
}
]
}
],

// next two rules are a workaround, see
// https://github.com/babel/babel-eslint/issues/681#issuecomment-420663038
Expand Down

0 comments on commit 25a3cef

Please sign in to comment.