{"name":"eslint-plugin-jest-dom","version":"3.1.3","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"],"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","generate-readme-table":"node build/generate-readme-table.js","lint":"kcd-scripts lint","setup":"npm install && npm run validate -s","test":"kcd-scripts test","test:update":"npm test -- --updateSnapshot --coverage","validate":"kcd-scripts validate"},"dependencies":{"@babel/runtime":"^7.9.6","requireindex":"^1.2.0"},"devDependencies":{"kcd-scripts":"^6.0.0"},"peerDependencies":{"eslint":"^7.0.0"},"eslintConfig":{"extends":"./node_modules/kcd-scripts/eslint.js","rules":{"babel/quotes":"off"}},"eslintIgnore":["node_modules","coverage","dist"],"engines":{"node":"^10.12.0 || >=12.0.0","npm":">=6","yarn":">=1"},"gitHead":"808c623ada3ff3d7a1e9f87201fa785b8268ad23","_id":"eslint-plugin-jest-dom@3.1.3","_nodeVersion":"14.5.0","_npmVersion":"6.14.5","dist":{"integrity":"sha512-nENsQnQWSTeImeDlIw0hTEqOx6cHKxcFemytyN5qm1hYnIIDFj4cBxoMGYFanqC92MQs3HPDSYfCSchGJkKeBA==","shasum":"90db9d55806f58eb091fb97f07880a63bdb123c0","tarball":"http://registry-npm.ywwl.com/eslint-plugin-jest-dom/download/eslint-plugin-jest-dom-3.1.3.tgz","fileCount":12,"unpackedSize":36931,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfCdXtCRA9TVsSAnZWagAAEJIP/0LxutyH8IhZVGBuBwFp\ntTb/t3tctxf44TWj+GkL1MsSsQkp7Gh/N+TxuTr8Ed8PSKSZ2uobksjTsbc7\nSR0iYorXT6LyhR7M+kt6pRR/SDc2ePBqbBcmYDrtYPv201/EMU1ueOW/rXym\nGHQ15GIR1yHr6kcWiDzmAiOIMuZv4X3KrJNSGJcOGEvzaX+ha/XWYG0Kp2I4\njMMDRvxO8EXDwwD0raEg6zE3d360WdeEgonGnHL7KYplbpLeZBXCVgP5TUEn\ndOh2VGKTid/enOMTMU0u99rdFEbz5/RTQO310+JZ2tjs5i7m7reZWoCe0xop\nMp13l6/L9WvGaBQOAx5mCjldr/TJZ5EZVWcBcExrfDt0Mykj20drKG1Le/Yp\naoMPWgkJ8ul7lqqLBqOo+dtMsXuC0Z6z5Hbp20UiMw0f/e3XyyPIAiPayraJ\nIPVo4pmm6zuCGEAvDQYqGVdEON9dw7QhAhOX5wGMqLRuePgYem7u6QPAKM5P\nNE1oWzuIdq8KNsnxL/MzjLEUa/wJMr0NDm3v/l0aaTWeDooMHO2m5NRiCQYz\nxEXJL8+J1Cd1qqavkyT/zXFs8fItaMUY+BQ4n3jv1Kib3fuKSsSq81mFdsBy\nxHS00TVqcMUToHRevEXMxdz8DDHOisywfGpdbvclLjkv/1wWLf/hYgg44fJQ\nPbYD\r\n=16cz\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGZsEn4QITpqp1mPs6823gf2zsgnofHMnFh4OZSTAzmNAiARbwhQh1bqd8WSUWoKLfiGPTDP7ZAV8AJWxJLmMPQguw=="}],"size":7312,"noattachment":false,"key":"/eslint-plugin-jest-dom/-/eslint-plugin-jest-dom-3.1.3.tgz"},"maintainers":[{"name":"benmonro","email":"ben.monro@gmail.com"}],"_npmUser":{"name":"benmonro","email":"ben.monro@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/eslint-plugin-jest-dom_3.1.3_1594480108718_0.7959348370453903"},"_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":1594480108842,"_cnpm_publish_time":1594480108842,"dist-tags":{"latest":"5.10.1"}}