Skip to content

Commit ddb9007

Browse files
committed
Use Jest DOM and Testing Library ESLint plugins
1 parent e89f153 commit ddb9007

File tree

3 files changed

+7
-1
lines changed

3 files changed

+7
-1
lines changed

packages/eslint-config-react-app/index.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ module.exports = {
3030

3131
plugins: ['import', 'flowtype', 'jsx-a11y', 'react', 'react-hooks'],
3232

33+
extends: ['plugin:jest-dom/recommended', 'plugin:testing-library/react'],
34+
3335
env: {
3436
browser: true,
3537
commonjs: true,

packages/eslint-config-react-app/package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,11 @@
2121
"eslint": "6.x",
2222
"eslint-plugin-flowtype": "3.x || 4.x",
2323
"eslint-plugin-import": "2.x",
24+
"eslint-plugin-jest-dom": "1.x",
2425
"eslint-plugin-jsx-a11y": "6.x",
2526
"eslint-plugin-react": "7.x",
26-
"eslint-plugin-react-hooks": "1.x || 2.x"
27+
"eslint-plugin-react-hooks": "1.x || 2.x",
28+
"eslint-plugin-testing-library": "1.x"
2729
},
2830
"dependencies": {
2931
"confusing-browser-globals": "^1.0.9"

packages/react-scripts/package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,11 @@
4848
"eslint-loader": "3.0.3",
4949
"eslint-plugin-flowtype": "4.6.0",
5050
"eslint-plugin-import": "2.20.1",
51+
"eslint-plugin-jest-dom": "1.3.0",
5152
"eslint-plugin-jsx-a11y": "6.2.3",
5253
"eslint-plugin-react": "7.19.0",
5354
"eslint-plugin-react-hooks": "^1.6.1",
55+
"eslint-plugin-testing-library": "1.3.2",
5456
"file-loader": "4.3.0",
5557
"fs-extra": "^8.1.0",
5658
"html-webpack-plugin": "4.0.0-beta.11",

0 commit comments

Comments
 (0)