Skip to content

Commit

Permalink
chore(project): add eslint-plugin-testing-library (#3039)
Browse files Browse the repository at this point in the history
* chore(project): add eslint-plugin-testing-library

* chore(eslint): enable await-async-query

* chore(eslint): enable testing-library/no-await-sync-query

* chore(eslint): enable testing-library/no-unnecessary-act

---------

Co-authored-by: Josh Black <joshblack@users.noreply.github.com>
  • Loading branch information
joshblack and joshblack committed Mar 23, 2023
1 parent b71cb1f commit a622366
Show file tree
Hide file tree
Showing 11 changed files with 192 additions and 242 deletions.
9 changes: 8 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -158,12 +158,19 @@ module.exports = {
// Tests
{
files: ['src/**/*.test.{ts,tsx}'],
extends: ['plugin:jest/recommended'],
extends: ['plugin:jest/recommended', 'plugin:testing-library/react'],
rules: {
'@typescript-eslint/no-non-null-assertion': 'off',
'jest/expect-expect': 'off',
'jest/no-conditional-expect': 'off',
'jest/no-disabled-tests': 'off',
'testing-library/prefer-screen-queries': 'off',
'testing-library/no-node-access': 'off',
'testing-library/no-container': 'off',
'testing-library/render-result-naming-convention': 'off',
'testing-library/prefer-presence-queries': 'off',
'testing-library/prefer-find-by': 'off',
'testing-library/no-wait-for-multiple-assertions': 'off',
},
},

Expand Down
26 changes: 26 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,7 @@
"eslint-plugin-react": "7.32.2",
"eslint-plugin-react-hooks": "4.6.0",
"eslint-plugin-storybook": "0.6.11",
"eslint-plugin-testing-library": "5.10.2",
"fast-glob": "3.2.12",
"filesize": "10.0.6",
"front-matter": "4.0.2",
Expand Down
Loading

0 comments on commit a622366

Please sign in to comment.