Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

testing-library linting #81

Closed
benmvp opened this issue Jan 6, 2020 · 1 comment · Fixed by #82
Closed

testing-library linting #81

benmvp opened this issue Jan 6, 2020 · 1 comment · Fixed by #82
Labels
enhancement New feature or request released

Comments

@benmvp
Copy link
Owner

benmvp commented Jan 6, 2020

🚀 Feature Proposal

testing-library has a linting package called eslint-plugin-testing-library. It's already included in the package.json, but not being used in the eslint.config.js.

Motivation

To follow best practices and anticipate common mistakes when writing tests with Testing Library

Example

See usage with React

@benmvp benmvp added the enhancement New feature or request label Jan 6, 2020
@benmvp benmvp changed the title testing-library linting testing-library linting Jan 6, 2020
@benmvp benmvp closed this as completed in #82 Jan 7, 2020
benmvp added a commit that referenced this issue Jan 7, 2020
## Problem

There was no linting for [`@testing-library/react`](https://testing-library.com/docs/react-testing-library/intro) yet the `package.json` was already installing [`eslint-plugin-testing-library`](https://github.com/Belco90/eslint-plugin-testing-library).


## Solution

Added `'plugin:testing-library/react'` as one of the plugins the `eslint.config.js` extends from to receive the recommended react ESLint rules.

Fixes #81 

BREAKING CHANGE: This is now failing for new lint errors so it's technically a breaking change, although it should be super-duper minor.
@github-actions
Copy link

github-actions bot commented Jan 7, 2020

🎉 This issue has been resolved in version 7.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request released
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant