Skip to content

Commit

Permalink
ESLint: Add inclusive language rule #43600 (#43691)
Browse files Browse the repository at this point in the history
* ESLint: Add inclusive language rule #43600

* ESLint: update changelog
  • Loading branch information
sarayourfriend committed Jul 1, 2020
1 parent a6c0b37 commit b87af9e
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 4 deletions.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -285,8 +285,9 @@
"enzyme-to-json": "^3.4.3",
"eslint": "^7.1.0",
"eslint-config-prettier": "^6.11.0",
"eslint-config-wpcalypso": "^5.0.0",
"eslint-config-wpcalypso": "^6.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
4 changes: 4 additions & 0 deletions packages/eslint-config-wpcalypso/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
### v6.0.0 (2020-07-01)

- Add [`inclusive-language`](https://github.com/muenzpraeger/eslint-plugin-inclusive-language) rule (01f9b02524)

### v5.0.0 (2019-11-19)

- Require eslint v6
Expand Down
5 changes: 4 additions & 1 deletion packages/eslint-config-wpcalypso/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ module.exports = {
},
},
extends: [ 'eslint:recommended', 'plugin:jsdoc/recommended' ],
plugins: [ 'jsdoc', 'wpcalypso' ],
plugins: [ 'jsdoc', 'wpcalypso', 'inclusive-language' ],
rules: {
'array-bracket-spacing': [ 2, 'always' ],
'brace-style': [ 2, '1tbs' ],
Expand Down Expand Up @@ -144,5 +144,8 @@ module.exports = {
'wpcalypso/jsx-classname-namespace': 2,
'wpcalypso/redux-no-bound-selectors': 2,
yoda: 0,

// Ensure our codebases use inclusive language
'inclusive-language/use-inclusive-words': 'error',
},
};
5 changes: 3 additions & 2 deletions packages/eslint-config-wpcalypso/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "eslint-config-wpcalypso",
"version": "5.0.0",
"version": "6.0.0",
"description": "ESLint configuration following WordPress.com's Calypso JavaScript Coding Guidelines",
"keywords": [
"eslint"
Expand All @@ -26,7 +26,8 @@
"peerDependencies": {
"eslint": "^7.0.0",
"eslint-plugin-jsdoc": "^18.0.0",
"eslint-plugin-wpcalypso": "^3.4.1 || ^4.0.0"
"eslint-plugin-wpcalypso": "^3.4.1 || ^4.0.0",
"eslint-plugin-inclusive-language": "^1.0.0"
},
"dependencies": {
"eslint-plugin-react-hooks": "^3.0.0"
Expand Down
5 changes: 5 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -11156,6 +11156,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 b87af9e

Please sign in to comment.