Skip to content

Commit

Permalink
Set up eslint-plugin-testing-library
Browse files Browse the repository at this point in the history
  • Loading branch information
aarongarciah committed Jul 18, 2024
1 parent 4523ba2 commit 36c6b28
Show file tree
Hide file tree
Showing 3 changed files with 117 additions and 0 deletions.
15 changes: 15 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,21 @@ module.exports = {
'react/no-unused-prop-types': 'off',
},
},
{
files: [
// matching the pattern of the test runner
'*.test.mjs',
'*.test.js',
'*.test.ts',
'*.test.tsx',
],
excludedFiles: ['packages/markdown/**/*', 'test/e2e/**/*', 'test/regressions/**/*'],
extends: ['plugin:testing-library/react'],
rules: {
'testing-library/no-container': 'off',
'testing-library/prefer-screen-queries': 'off',
},
},
{
files: ['docs/src/modules/components/**/*.js'],
rules: {
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@
"eslint-plugin-react": "^7.34.4",
"eslint-plugin-react-compiler": "0.0.0-experimental-0998c1e-20240625",
"eslint-plugin-react-hooks": "^4.6.2",
"eslint-plugin-testing-library": "^6.2.2",
"fast-glob": "^3.3.2",
"fs-extra": "^11.2.0",
"globby": "^14.0.2",
Expand Down
101 changes: 101 additions & 0 deletions pnpm-lock.yaml

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

0 comments on commit 36c6b28

Please sign in to comment.