Skip to content

Commit

Permalink
Include TS and JSX files to testing-library lint (#45533)
Browse files Browse the repository at this point in the history
* Include TS and JSX files to testing-library lint

* Fix all testing-library/render-result-naming-convention violations

* Fix all jest-dom/prefer-in-document violations

* Fix all testing-library/no-render-in-setup violations

* Fix all testing-library/no-await-sync-query violations

* Disable jsx, ts, and tsx for all excluded files

Co-authored-by: Marin Atanasov <[email protected]>
  • Loading branch information
mirka and tyxla authored Nov 4, 2022
1 parent ed8ffbe commit 519f0e7
Show file tree
Hide file tree
Showing 12 changed files with 169 additions and 413 deletions.
10 changes: 5 additions & 5 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -327,12 +327,12 @@ module.exports = {
extends: [ 'plugin:@wordpress/eslint-plugin/test-unit' ],
},
{
files: [ '**/test/**/*.js' ],
files: [ '**/test/**/*.[tj]s?(x)' ],
excludedFiles: [
'**/*.@(android|ios|native).js',
'packages/react-native-*/**/*.js',
'test/native/**/*.js',
'test/e2e/**/*.[tj]s',
'**/*.@(android|ios|native).[tj]s?(x)',
'packages/react-native-*/**/*.[tj]s?(x)',
'test/native/**/*.[tj]s?(x)',
'test/e2e/**/*.[tj]s?(x)',
],
extends: [
'plugin:jest-dom/recommended',
Expand Down
Loading

0 comments on commit 519f0e7

Please sign in to comment.