Compatibility with eslint-plugin-testing-library
See original GitHub issueDescribe the Feature
It would be lovely to verify that our library is compatible with eslint-plugin-testing-library, determine what’s missing and plan the necessary work to make it usable.
Possible Implementations
I’d like avoid creating another plugin based on the existing one. I’d prefer documenting the shortcomings (e.g. lack of screen
if there are rules for that)
Issue Analytics
- State:
- Created 3 years ago
- Comments:9 (8 by maintainers)
Top Results From Across the Web
ESLint Plugin Testing Library Compatibility | React Native ...
Most of the rules of the eslint-plugin-testing-library are compatible with this library except the following: prefer-user-event: userEvent requires a DOM ...
Read more >eslint-plugin-testing-library - npm
This plugin exports several recommended configurations that enforce good practices for specific Testing Library packages. You can find more info ...
Read more >eslint-plugin-testing-library/v5.md at main - migration-guides
ESLint plugin to follow best practices and anticipate common mistakes when writing tests with Testing Library - eslint-plugin-testing-library/v5.md at main ...
Read more >eslint-plugin-testing-library
eslint -plugin-testing-library is an ESLint plugin for Testing Library that helps users to follow best practices and anticipate common mistakes ...
Read more >eslint-plugin-testing-library versions and peer dependencies
Online Peer dependency version tool to search for compatible versions of related NPM packages.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Only this one is relevant now, since we don’t have
screen
queries.With the exception of the following syntaxes, all other rules are valid and compatible with
eslint-plugin-testing-library
.no-debug
: Using the defaultdebug
is seen as a valid syntax, whereas using thedebug
inside therender
method is seen as an invalid syntax, i.e.Luckily,
react-native-testing-library@next
covers this.prefer-wait-for
: This is shown as an invalid syntax the wait method in RNTL iswaitForElement
. A suggestion will be to have an alias forwaitForElement
aswaitFor
. Depending on the state of this (i.e. if on or off),no-wait-for-empty-callback
may be triggeredprefer-screen-queries
. This will require having ascreen
object.