{"name":"eslint-plugin-jest-dom","version":"5.0.1","description":"ESLint plugin to follow best practices and anticipate common mistakes when writing tests with jest-dom","main":"dist/index.js","keywords":["eslint","eslintplugin","eslint-plugin","jest-dom","testing-library","react-testing-library","dom-testing-library","RTL","DTL","tests"],"author":{"name":"Ben Monro"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/testing-library/eslint-plugin-jest-dom.git"},"bugs":{"url":"https://github.com/testing-library/eslint-plugin-jest-dom/issues"},"homepage":"https://github.com/testing-library/eslint-plugin-jest-dom#readme","scripts":{"build":"kcd-scripts build","pregenerate-readme-table":"npm run build","generate-readme-table":"eslint-doc-generator --ignore-config all","lint":"kcd-scripts lint","lint:generate-readme-table":"npm run generate-readme-table -- --check","setup":"npm install && npm run validate -s","test":"kcd-scripts test","test:coverage":"npm test -- --coverage","test:update":"npm test:coverage -- --updateSnapshot","validate":"kcd-scripts validate"},"dependencies":{"@babel/runtime":"^7.16.3","requireindex":"^1.2.0"},"devDependencies":{"@testing-library/dom":"^8.20.0","@typescript-eslint/parser":"^5.9.1","eslint":"^8.7.0","eslint-doc-generator":"^1.0.0","eslint-remote-tester":"^3.0.0","eslint-remote-tester-repositories":"^1.0.1","kcd-scripts":"^12.0.0","typescript":"^4.5.3"},"peerDependencies":{"eslint":"^6.8.0 || ^7.0.0 || ^8.0.0","@testing-library/dom":"^8.0.0 || ^9.0.0"},"eslintConfig":{"extends":"./node_modules/kcd-scripts/eslint.js","rules":{"consistent-return":"off","max-lines-per-function":"off","testing-library/no-dom-import":"off"}},"eslintIgnore":["node_modules","coverage","dist","eslint-remote-tester-results"],"engines":{"node":"^12.22.0 || ^14.17.0 || >=16.0.0","npm":">=6","yarn":">=1"},"gitHead":"b38b8ea22d331d2ae42bde12c13c4f1ea74c7545","_id":"eslint-plugin-jest-dom@5.0.1","_nodeVersion":"16.20.0","_npmVersion":"8.19.4","dist":{"integrity":"sha512-zD/BjNk12R5R9cxIu8oa2HfNeDSknI3ewtN8nygIUMQuieWDnTY9Np//6a1Z3G7Y3dx3l45hCUR4EphsgRmUtA==","shasum":"48a0bec664665f206535c87a70d063a05e4189da","tarball":"http://registry-npm.ywwl.com/eslint-plugin-jest-dom/download/eslint-plugin-jest-dom-5.0.1.tgz","fileCount":18,"unpackedSize":79706,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD5i/ePkVWbe5yiz7esb8tpn4iD3A/NISJLq3/AtWfYiQIgef0Kv4RKBUWRkCLinyB35/KR2tZAPhZlLI3ADnc/rGM="}],"size":13483,"noattachment":false,"key":"/eslint-plugin-jest-dom/-/eslint-plugin-jest-dom-5.0.1.tgz"},"_npmUser":{"name":"benmonro","email":"ben.monro@gmail.com"},"directories":{},"maintainers":[{"name":"benmonro","email":"ben.monro@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/eslint-plugin-jest-dom_5.0.1_1685908984739_0.686323451912423"},"_hasShrinkwrap":false,"readme":"<div align=\"center\">\n<h1>eslint-plugin-jest-dom</h1>\n\n<p>ESLint plugin to follow best practices and anticipate common mistakes when writing tests with jest-dom.</p>\n</div>\n\n---\n\n<!-- prettier-ignore-start -->\n[![Build Status][build-badge]][build]\n[![Code Coverage][coverage-badge]][coverage]\n[![version][version-badge]][package]\n[![downloads][downloads-badge]][npmtrends]\n[![MIT License][license-badge]][license]\n[![All Contributors][all-contributors-badge]](#contributors-)\n[![PRs Welcome][prs-badge]][prs]\n[![Code of Conduct][coc-badge]][coc]\n<!-- prettier-ignore-end -->\n\n## Table of Contents\n\n<!-- START doctoc generated TOC please keep comment here to allow auto update -->\n<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->\n\n- [Installation](#installation)\n- [Usage](#usage)\n- [Recommended Configuration](#recommended-configuration)\n- [Supported Rules](#supported-rules)\n- [Issues](#issues)\n  - [🐛 Bugs](#-bugs)\n  - [💡 Feature Requests](#-feature-requests)\n- [Contributors ✨](#contributors-)\n- [LICENSE](#license)\n\n<!-- END doctoc generated TOC please keep comment here to allow auto update -->\n\n## Installation\n\nThis module is distributed via [npm][npm] which is bundled with [node][node] and\nshould be installed as one of your project's `devDependencies`:\n\n```\nnpm install --save-dev eslint-plugin-jest-dom\n```\n\nThis library has a required `peerDependencies` listing for [`ESLint`](https://eslint.org/).\n\n## Usage\n\n> [!NOTE]\n>\n> `eslint.config.js` is supported, though most of the plugin documentation still\n> currently uses `.eslintrc` syntax; compatible versions of configs are available\n> prefixed with `flat/` and may be subject to small breaking changes while ESLint\n> v9 is being finalized.\n>\n> Refer to the\n> [ESLint documentation on the new configuration file format](https://eslint.org/docs/latest/use/configure/configuration-files-new)\n> for more.\n\nAdd `jest-dom` to the plugins section of your `.eslintrc.js` configuration file.\nYou can omit the `eslint-plugin-` prefix:\n\n```javascript\nmodule.exports = {\n  plugins: [\"jest-dom\"],\n  rules: {\n    // your configuration\n  },\n};\n```\n\nThen configure the rules you want to use under the rules section.\n\n```javascript\nmodule.exports = {\n  rules: {\n    \"jest-dom/prefer-checked\": \"error\",\n    \"jest-dom/prefer-enabled-disabled\": \"error\",\n    \"jest-dom/prefer-required\": \"error\",\n    \"jest-dom/prefer-to-have-attribute\": \"error\",\n  },\n};\n```\n\n## Recommended Configuration\n\nThis plugin exports a recommended configuration that enforces good `jest-dom`\npractices _(you can find more info about enabled rules in\n[Supported Rules section](#supported-rules))_.\n\nTo enable this configuration with `.eslintrc`, use the `extends` property:\n\n```javascript\nmodule.exports = {\n  extends: \"plugin:jest-dom/recommended\",\n  rules: {\n    // your configuration\n  },\n};\n```\n\nTo enable this configuration with `eslint.config.js`, use\n`jestDom.configs['flat/recommended']`:\n\n```javascript\nmodule.exports = [\n  {\n    files: [\n      /* glob matching your test files */\n    ],\n    ...require(\"eslint-plugin-jest-dom\").configs[\"flat/recommended\"],\n  },\n];\n```\n\n## Supported Rules\n\n<!-- begin auto-generated rules list -->\n\n💼 Configurations enabled in.\\\n✅ Set in the `recommended` configuration.\\\n🔧 Automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/user-guide/command-line-interface#--fix).\\\n💡 Manually fixable by [editor suggestions](https://eslint.org/docs/latest/use/core-concepts#rule-suggestions).\n\n| Name                                                                     | Description                                                           | 💼 | 🔧 | 💡 |\n| :----------------------------------------------------------------------- | :-------------------------------------------------------------------- | :- | :- | :- |\n| [prefer-checked](docs/rules/prefer-checked.md)                           | prefer toBeChecked over checking attributes                           | ✅  | 🔧 |    |\n| [prefer-empty](docs/rules/prefer-empty.md)                               | Prefer toBeEmpty over checking innerHTML                              | ✅  | 🔧 |    |\n| [prefer-enabled-disabled](docs/rules/prefer-enabled-disabled.md)         | prefer toBeDisabled or toBeEnabled over checking attributes           | ✅  | 🔧 |    |\n| [prefer-focus](docs/rules/prefer-focus.md)                               | prefer toHaveFocus over checking document.activeElement               | ✅  | 🔧 |    |\n| [prefer-in-document](docs/rules/prefer-in-document.md)                   | Prefer .toBeInTheDocument() for asserting the existence of a DOM node | ✅  | 🔧 | 💡 |\n| [prefer-required](docs/rules/prefer-required.md)                         | prefer toBeRequired over checking properties                          | ✅  | 🔧 |    |\n| [prefer-to-have-attribute](docs/rules/prefer-to-have-attribute.md)       | prefer toHaveAttribute over checking  getAttribute/hasAttribute       | ✅  | 🔧 |    |\n| [prefer-to-have-class](docs/rules/prefer-to-have-class.md)               | prefer toHaveClass over checking element className                    | ✅  | 🔧 |    |\n| [prefer-to-have-style](docs/rules/prefer-to-have-style.md)               | prefer toHaveStyle over checking element style                        | ✅  | 🔧 |    |\n| [prefer-to-have-text-content](docs/rules/prefer-to-have-text-content.md) | Prefer toHaveTextContent over checking element.textContent            | ✅  | 🔧 |    |\n| [prefer-to-have-value](docs/rules/prefer-to-have-value.md)               | prefer toHaveValue over checking element.value                        | ✅  | 🔧 |    |\n\n<!-- end auto-generated rules list -->\n\n## Issues\n\n_Looking to contribute? Look for the [Good First Issue][good-first-issue]\nlabel._\n\n### 🐛 Bugs\n\nPlease file an issue for bugs, missing documentation, or unexpected behavior.\n\n[**See Bugs**][bugs]\n\n### 💡 Feature Requests\n\nPlease file an issue to suggest new features. Vote on feature requests by adding\na 👍. This helps maintainers prioritize what to work on.\n\n[**See Feature Requests**][requests]\n\n## Contributors ✨\n\nThanks goes to these people ([emoji key][emojis]):\n\n<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->\n<!-- prettier-ignore-start -->\n<!-- markdownlint-disable -->\n<table>\n  <tr>\n    <td align=\"center\"><a href=\"https://github.com/benmonro\"><img src=\"https://avatars3.githubusercontent.com/u/399236?v=4?s=100\" width=\"100px;\" alt=\"\"/><br /><sub><b>Ben Monro</b></sub></a><br /><a href=\"https://github.com/testing-library/eslint-plugin-jest-dom/commits?author=benmonro\" title=\"Documentation\">📖</a> <a href=\"https://github.com/testing-library/eslint-plugin-jest-dom/commits?author=benmonro\" title=\"Code\">💻</a> <a href=\"#example-benmonro\" title=\"Examples\">💡</a> <a href=\"https://github.com/testing-library/eslint-plugin-jest-dom/commits?author=benmonro\" title=\"Tests\">⚠️</a></td>\n    <td align=\"center\"><a href=\"https://nickmccurdy.com/\"><img src=\"https://avatars0.githubusercontent.com/u/927220?v=4?s=100\" width=\"100px;\" alt=\"\"/><br /><sub><b>Nick McCurdy</b></sub></a><br /><a href=\"https://github.com/testing-library/eslint-plugin-jest-dom/commits?author=nickmccurdy\" title=\"Code\">💻</a> <a href=\"https://github.com/testing-library/eslint-plugin-jest-dom/commits?author=nickmccurdy\" title=\"Documentation\">📖</a> <a href=\"https://github.com/testing-library/eslint-plugin-jest-dom/commits?author=nickmccurdy\" title=\"Tests\">⚠️</a></td>\n    <td align=\"center\"><a href=\"https://twitter.com/gnapse\"><img src=\"https://avatars0.githubusercontent.com/u/15199?v=4?s=100\" width=\"100px;\" alt=\"\"/><br /><sub><b>Ernesto García</b></sub></a><br /><a href=\"https://github.com/testing-library/eslint-plugin-jest-dom/commits?author=gnapse\" title=\"Documentation\">📖</a></td>\n    <td align=\"center\"><a href=\"https://chriscolborne.com\"><img src=\"https://avatars2.githubusercontent.com/u/101371?v=4?s=100\" width=\"100px;\" alt=\"\"/><br /><sub><b>Chris Colborne</b></sub></a><br /><a href=\"https://github.com/testing-library/eslint-plugin-jest-dom/commits?author=zorfling\" title=\"Code\">💻</a> <a href=\"https://github.com/testing-library/eslint-plugin-jest-dom/commits?author=zorfling\" title=\"Tests\">⚠️</a></td>\n    <td align=\"center\"><a href=\"https://michaeldeboey.be\"><img src=\"https://avatars3.githubusercontent.com/u/6643991?v=4?s=100\" width=\"100px;\" alt=\"\"/><br /><sub><b>Michaël De Boey</b></sub></a><br /><a href=\"https://github.com/testing-library/eslint-plugin-jest-dom/commits?author=MichaelDeBoey\" title=\"Code\">💻</a></td>\n    <td align=\"center\"><a href=\"http://gerritalex.de\"><img src=\"https://avatars1.githubusercontent.com/u/29307652?v=4?s=100\" width=\"100px;\" alt=\"\"/><br /><sub><b>Gerrit Alex</b></sub></a><br /><a href=\"https://github.com/testing-library/eslint-plugin-jest-dom/commits?author=ljosberinn\" title=\"Code\">💻</a> <a href=\"https://github.com/testing-library/eslint-plugin-jest-dom/commits?author=ljosberinn\" title=\"Tests\">⚠️</a> <a href=\"https://github.com/testing-library/eslint-plugin-jest-dom/commits?author=ljosberinn\" title=\"Documentation\">📖</a> <a href=\"https://github.com/testing-library/eslint-plugin-jest-dom/issues?q=author%3Aljosberinn\" title=\"Bug reports\">🐛</a></td>\n    <td align=\"center\"><a href=\"http://ololos.space/\"><img src=\"https://avatars1.githubusercontent.com/u/3940079?v=4?s=100\" width=\"100px;\" alt=\"\"/><br /><sub><b>Andrey Los</b></sub></a><br /><a href=\"https://github.com/testing-library/eslint-plugin-jest-dom/issues?q=author%3ARIP21\" title=\"Bug reports\">🐛</a></td>\n  </tr>\n  <tr>\n    <td align=\"center\"><a href=\"https://skovy.dev\"><img src=\"https://avatars1.githubusercontent.com/u/5247455?v=4?s=100\" width=\"100px;\" alt=\"\"/><br /><sub><b>Spencer Miskoviak</b></sub></a><br /><a href=\"https://github.com/testing-library/eslint-plugin-jest-dom/commits?author=skovy\" title=\"Code\">💻</a> <a href=\"https://github.com/testing-library/eslint-plugin-jest-dom/commits?author=skovy\" title=\"Tests\">⚠️</a></td>\n    <td align=\"center\"><a href=\"https://github.com/atsikov\"><img src=\"https://avatars3.githubusercontent.com/u/1422928?v=4?s=100\" width=\"100px;\" alt=\"\"/><br /><sub><b>Aleksei Tsikov</b></sub></a><br /><a href=\"https://github.com/testing-library/eslint-plugin-jest-dom/issues?q=author%3Aatsikov\" title=\"Bug reports\">🐛</a></td>\n    <td align=\"center\"><a href=\"https://mario.dev\"><img src=\"https://avatars1.githubusercontent.com/u/2677072?v=4?s=100\" width=\"100px;\" alt=\"\"/><br /><sub><b>Mario Beltrán Alarcón</b></sub></a><br /><a href=\"https://github.com/testing-library/eslint-plugin-jest-dom/commits?author=Belco90\" title=\"Documentation\">📖</a></td>\n    <td align=\"center\"><a href=\"https://codepen.io/ariperkkio/\"><img src=\"https://avatars2.githubusercontent.com/u/14806298?v=4?s=100\" width=\"100px;\" alt=\"\"/><br /><sub><b>Ari Perkkiö</b></sub></a><br /><a href=\"https://github.com/testing-library/eslint-plugin-jest-dom/issues?q=author%3AAriPerkkio\" title=\"Bug reports\">🐛</a> <a href=\"https://github.com/testing-library/eslint-plugin-jest-dom/commits?author=AriPerkkio\" title=\"Code\">💻</a> <a href=\"https://github.com/testing-library/eslint-plugin-jest-dom/commits?author=AriPerkkio\" title=\"Tests\">⚠️</a></td>\n    <td align=\"center\"><a href=\"http://www.antn.se\"><img src=\"https://avatars0.githubusercontent.com/u/785676?v=4?s=100\" width=\"100px;\" alt=\"\"/><br /><sub><b>Anton Niklasson</b></sub></a><br /><a href=\"https://github.com/testing-library/eslint-plugin-jest-dom/commits?author=AntonNiklasson\" title=\"Code\">💻</a> <a href=\"https://github.com/testing-library/eslint-plugin-jest-dom/commits?author=AntonNiklasson\" title=\"Tests\">⚠️</a> <a href=\"https://github.com/testing-library/eslint-plugin-jest-dom/commits?author=AntonNiklasson\" title=\"Documentation\">📖</a></td>\n    <td align=\"center\"><a href=\"http://juzerzarif.com\"><img src=\"https://avatars3.githubusercontent.com/u/22772637?v=4?s=100\" width=\"100px;\" alt=\"\"/><br /><sub><b>Juzer Zarif</b></sub></a><br /><a href=\"https://github.com/testing-library/eslint-plugin-jest-dom/commits?author=juzerzarif\" title=\"Code\">💻</a> <a href=\"https://github.com/testing-library/eslint-plugin-jest-dom/commits?author=juzerzarif\" title=\"Tests\">⚠️</a> <a href=\"https://github.com/testing-library/eslint-plugin-jest-dom/issues?q=author%3Ajuzerzarif\" title=\"Bug reports\">🐛</a></td>\n    <td align=\"center\"><a href=\"http://everlong.org/\"><img src=\"https://avatars.githubusercontent.com/u/454175?v=4?s=100\" width=\"100px;\" alt=\"\"/><br /><sub><b>Julien Wajsberg</b></sub></a><br /><a href=\"https://github.com/testing-library/eslint-plugin-jest-dom/commits?author=julienw\" title=\"Code\">💻</a> <a href=\"https://github.com/testing-library/eslint-plugin-jest-dom/commits?author=julienw\" title=\"Tests\">⚠️</a></td>\n  </tr>\n  <tr>\n    <td align=\"center\"><a href=\"https://github.com/G-Rath\"><img src=\"https://avatars.githubusercontent.com/u/3151613?v=4?s=100\" width=\"100px;\" alt=\"\"/><br /><sub><b>Gareth Jones</b></sub></a><br /><a href=\"https://github.com/testing-library/eslint-plugin-jest-dom/commits?author=G-Rath\" title=\"Tests\">⚠️</a> <a href=\"https://github.com/testing-library/eslint-plugin-jest-dom/commits?author=G-Rath\" title=\"Code\">💻</a> <a href=\"https://github.com/testing-library/eslint-plugin-jest-dom/issues?q=author%3AG-Rath\" title=\"Bug reports\">🐛</a></td>\n    <td align=\"center\"><a href=\"https://github.com/huyenltnguyen\"><img src=\"https://avatars.githubusercontent.com/u/25715018?v=4?s=100\" width=\"100px;\" alt=\"\"/><br /><sub><b>Huyen Nguyen</b></sub></a><br /><a href=\"https://github.com/testing-library/eslint-plugin-jest-dom/commits?author=huyenltnguyen\" title=\"Documentation\">📖</a></td>\n    <td align=\"center\"><a href=\"https://github.com/mdotwills\"><img src=\"https://avatars.githubusercontent.com/u/5505611?v=4?s=100\" width=\"100px;\" alt=\"\"/><br /><sub><b>Matthew</b></sub></a><br /><a href=\"https://github.com/testing-library/eslint-plugin-jest-dom/issues?q=author%3Amdotwills\" title=\"Bug reports\">🐛</a> <a href=\"https://github.com/testing-library/eslint-plugin-jest-dom/commits?author=mdotwills\" title=\"Code\">💻</a></td>\n  </tr>\n</table>\n\n<!-- markdownlint-restore -->\n<!-- prettier-ignore-end -->\n\n<!-- ALL-CONTRIBUTORS-LIST:END -->\n\nThis project follows the [all-contributors][all-contributors] specification.\nContributions of any kind welcome!\n\n## LICENSE\n\nMIT\n\n<!-- prettier-ignore-start -->\n[npm]: https://www.npmjs.com\n[node]: https://nodejs.org\n[build-badge]: https://img.shields.io/github/actions/workflow/status/testing-library/eslint-plugin-jest-dom/validate.yml?logo=github&style=flat-square\n[build]: https://github.com/testing-library/eslint-plugin-jest-dom/actions?query=workflow%3Avalidate\n[coverage-badge]: https://img.shields.io/codecov/c/github/testing-library/eslint-plugin-jest-dom.svg?style=flat-square\n[coverage]: https://codecov.io/github/testing-library/eslint-plugin-jest-dom\n[version-badge]: https://img.shields.io/npm/v/eslint-plugin-jest-dom.svg?style=flat-square\n[package]: https://www.npmjs.com/package/eslint-plugin-jest-dom\n[downloads-badge]: https://img.shields.io/npm/dm/eslint-plugin-jest-dom.svg?style=flat-square\n[npmtrends]: http://www.npmtrends.com/eslint-plugin-jest-dom\n[license-badge]: https://img.shields.io/npm/l/eslint-plugin-jest-dom.svg?style=flat-square\n[license]: https://github.com/testing-library/eslint-plugin-jest-dom/blob/main/LICENSE\n[prs-badge]: https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square\n[prs]: http://makeapullrequest.com\n[coc-badge]: https://img.shields.io/badge/code%20of-conduct-ff69b4.svg?style=flat-square\n[coc]: https://github.com/testing-library/eslint-plugin-jest-dom/blob/main/other/CODE_OF_CONDUCT.md\n[emojis]: https://github.com/all-contributors/all-contributors#emoji-key\n[all-contributors]: https://github.com/all-contributors/all-contributors\n[all-contributors-badge]: https://img.shields.io/github/all-contributors/testing-library/eslint-plugin-jest-dom?style=flat-square\n[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\n[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\n[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\n<!-- prettier-ignore-end -->\n","publish_time":1685908984898,"_cnpm_publish_time":1685908984898,"dist-tags":{"latest":"5.10.1"}}