diff --git a/.eslintrc.js b/.eslintrc.js index f6f887064c6f5..d05edbc87583a 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -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, @@ -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', }, }; diff --git a/package.json b/package.json index df92efa606016..7d7291af9e396 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/yarn.lock b/yarn.lock index 6986ca2e64b6d..a07979bd91094 100644 --- a/yarn.lock +++ b/yarn.lock @@ -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"