Skip to content

Commit

Permalink
ESLint: Add inclusive language rule #43600
Browse files Browse the repository at this point in the history
  • Loading branch information
sarayourfriend committed Jun 25, 2020
1 parent f65f304 commit a8bc257
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
5 changes: 4 additions & 1 deletion .eslintrc.js
Expand Up @@ -82,7 +82,7 @@ module.exports = {
// this is when Webpack last built the bundle
BUILD_TIMESTAMP: true,
},
plugins: [ 'jest', 'jsx-a11y', 'import' ],
plugins: [ 'jest', 'jsx-a11y', 'import', 'inclusive-language' ],
settings: {
react: {
version: reactVersion,
Expand Down Expand Up @@ -176,5 +176,8 @@ module.exports = {
// - events because we use it for some event emitters
// - path because we use it quite a bit
'import/no-nodejs-modules': [ 'error', { allow: [ 'url', 'events', 'path', 'config' ] } ],

// Ensure we do not reintroduce non-inclusive language into our repository
'inclusive-language/use-inclusive-words': 'error',
},
};
1 change: 1 addition & 0 deletions package.json
Expand Up @@ -279,6 +279,7 @@
"eslint-config-prettier": "^6.11.0",
"eslint-config-wpcalypso": "^5.0.0",
"eslint-plugin-import": "^2.20.0",
"eslint-plugin-inclusive-language": "^1.0.0",
"eslint-plugin-jest": "^23.6.0",
"eslint-plugin-jsdoc": "^18.11.0",
"eslint-plugin-jsx-a11y": "^6.2.3",
Expand Down
5 changes: 5 additions & 0 deletions yarn.lock
Expand Up @@ -10748,6 +10748,11 @@ eslint-plugin-import@^2.20.0:
read-pkg-up "^2.0.0"
resolve "^1.12.0"

eslint-plugin-inclusive-language@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/eslint-plugin-inclusive-language/-/eslint-plugin-inclusive-language-1.0.0.tgz#bf2222355065b344770be052a0fc3420a5bba7e5"
integrity sha512-O+dHXecD09zB4yaiFXy36KMm2Wt7bHskXF4LMJJLt3j+1956wZ68mH16h50PWwjiLZXcMtrAyBB9N9Vk9Gt84A==

eslint-plugin-jest@^23.6.0:
version "23.6.0"
resolved "https://registry.yarnpkg.com/eslint-plugin-jest/-/eslint-plugin-jest-23.6.0.tgz#508b32f80d44058c8c01257c0ee718cfbd521e9d"
Expand Down

0 comments on commit a8bc257

Please sign in to comment.