eslint-plugin-jest-dom 4.0.0 → 4.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -12,10 +12,7 @@
12
12
  [![version][version-badge]][package]
13
13
  [![downloads][downloads-badge]][npmtrends]
14
14
  [![MIT License][license-badge]][license]
15
-
16
- <!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
17
- [![All Contributors](https://img.shields.io/badge/all_contributors-17-orange.svg?style=flat-square)](#contributors-)
18
- <!-- ALL-CONTRIBUTORS-BADGE:END -->
15
+ [![All Contributors][all-contributors-badge]](#contributors-)
19
16
  [![PRs Welcome][prs-badge]][prs]
20
17
  [![Code of Conduct][coc-badge]][coc]
21
18
  <!-- prettier-ignore-end -->
@@ -183,8 +180,8 @@ MIT
183
180
  <!-- prettier-ignore-start -->
184
181
  [npm]: https://www.npmjs.com
185
182
  [node]: https://nodejs.org
186
- [build-badge]: https://img.shields.io/travis/testing-library/eslint-plugin-jest-dom.svg?style=flat-square
187
- [build]: https://travis-ci.org/testing-library/eslint-plugin-jest-dom
183
+ [build-badge]: https://img.shields.io/github/workflow/status/testing-library/eslint-plugin-jest-dom/validate?logo=github&style=flat-square
184
+ [build]: https://github.com/testing-library/eslint-plugin-jest-dom/actions?query=workflow%3Avalidate
188
185
  [coverage-badge]: https://img.shields.io/codecov/c/github/testing-library/eslint-plugin-jest-dom.svg?style=flat-square
189
186
  [coverage]: https://codecov.io/github/testing-library/eslint-plugin-jest-dom
190
187
  [version-badge]: https://img.shields.io/npm/v/eslint-plugin-jest-dom.svg?style=flat-square
@@ -199,6 +196,7 @@ MIT
199
196
  [coc]: https://github.com/testing-library/eslint-plugin-jest-dom/blob/main/other/CODE_OF_CONDUCT.md
200
197
  [emojis]: https://github.com/all-contributors/all-contributors#emoji-key
201
198
  [all-contributors]: https://github.com/all-contributors/all-contributors
199
+ [all-contributors-badge]: https://img.shields.io/github/all-contributors/testing-library/eslint-plugin-jest-dom?color=orange&style=flat-square
202
200
  [bugs]: https://github.com/testing-library/eslint-plugin-jest-dom/issues?utf8=%E2%9C%93&q=is%3Aissue+is%3Aopen+sort%3Acreated-desc+label%3Abug
203
201
  [requests]: https://github.com/testing-library/eslint-plugin-jest-dom/issues?utf8=%E2%9C%93&q=is%3Aissue+is%3Aopen+sort%3Areactions-%2B1-desc+label%3Aenhancement
204
202
  [good-first-issue]: https://github.com/testing-library/eslint-plugin-jest-dom/issues?utf8=%E2%9C%93&q=is%3Aissue+is%3Aopen+sort%3Areactions-%2B1-desc+label%3Aenhancement+label%3A%22good+first+issue%22
@@ -70,7 +70,11 @@ const create = context => {
70
70
  negatedMatcher,
71
71
  expect
72
72
  }) {
73
- // only report on dom nodes which we can resolve to RTL queries.
73
+ if (matcherNode.parent.parent.type !== "CallExpression") {
74
+ return;
75
+ } // only report on dom nodes which we can resolve to RTL queries.
76
+
77
+
74
78
  if (!queryNode || !queryNode.name && !queryNode.property) return; // toHaveLength() is only invalid with 0 or 1
75
79
 
76
80
  if (matcherNode.name === "toHaveLength" && matcherArguments.length) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eslint-plugin-jest-dom",
3
- "version": "4.0.0",
3
+ "version": "4.0.1",
4
4
  "description": "ESLint plugin to follow best practices and anticipate common mistakes when writing tests with jest-dom",
5
5
  "main": "dist/index.js",
6
6
  "keywords": [
@@ -41,7 +41,7 @@
41
41
  },
42
42
  "dependencies": {
43
43
  "@babel/runtime": "^7.16.3",
44
- "@testing-library/dom": "^7.31.2",
44
+ "@testing-library/dom": "^8.11.1",
45
45
  "requireindex": "^1.2.0"
46
46
  },
47
47
  "devDependencies": {