{"repo":"testing-library/eslint-plugin-testing-library","free":true,"listed":false,"github":"https://github.com/testing-library/eslint-plugin-testing-library","clone":"git clone https://github.com/testing-library/eslint-plugin-testing-library.git","description":"ESLint plugin to follow best practices and anticipate common mistakes when writing tests with Testing Library","language":"TypeScript","stars":1063,"topics":["eslint","eslint-plugin","javascript","development","testing-library","best-practices","dom","angular","react","vue"],"license":"MIT","category":"ui-components","readme_excerpt":"eslint-plugin-testing-library ESLint plugin to follow best practices and anticipate common mistakes when writing tests with Testing Library --- [![Package version][version-badge]][version-url] [![eslint-remote-tester][eslint-remote-tester-badge]][eslint-remote-tester-workflow] [![eslint-plugin-testing-library][package-health-badge]][package-health-url] [![MIT License][license-badge]][license-url] [![PRs Welcome][pr-badge]][pr-url] [![All Contributors][all-contributors-badge]](#contributors-) Prerequisites To use this plugin, you must have Node.js ( ^18.18.0 , ^20.9.0 , or =21.1.0 ) installed. Installation You'll first need to install ESLint. Next, install eslint-plugin-testing-library : Note: If you installed ESLint globally (using the -g flag) then you must also install eslint-plugin-testing-library globally. Migrating You can find detailed guides for migrating eslint-plugin-testing-library in the migration guide docs: - Migration guide for v4 - Migration guide for v5 - Migration guide for v6 - Migration guide for v7 Usage Add testing-library to the plugins section of your .eslintrc.js configuration file. You can omit the eslint-plugin- prefix: Then configure the rules you want to use within rules property of your .eslintrc : Run the plugin only against test files With the default setup mentioned before, eslint-plugin-testing-library will be run against your whole codebase. If you want to run this plugin only against your tests files, you have the following options: ESLint o","default_branch":null,"files":null,"tree":[],"storefront":"/r/testing-library","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/testing-library/eslint-plugin-testing-library/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}