These two ESLint plugins could be useful to improve consistency in how your team is using React Testing Library:
- Install the dependencies:
- Update ESLint config, .eslintrc.json:
All jest-dom rules are enabled in the recommended configuration, and all are fixable.
The testing-library recommended configuration doesn’t have many rules, so I’ve enabled a few more, that match our codebase. Unfortunately, there aren’t many fixable rules.
#Resources