When writing tests using find* commands, I immediately got some confusing ESLint errors, not knowing whether there was something wrong with these Cypress commands, their types, or something in my environment.
Adding these ESLint rule overrides to my configuration fixed my issue.
Suggested solution:
Please add some documentation on the official Cypress Testing Library docs site — ESLint is extremely common in most projects these days, and many engineers may not know whether overriding these rules is the prescribed way to handle these errors or not — adding a quick section about this would save people hours of digging.
Problem description:
I configured Cypress Testing Library in my Typescript/ESLint repo using the standard instructions on the docs site: https://testing-library.com/docs/cypress-testing-library/intro/
When writing tests using
find*
commands, I immediately got some confusing ESLint errors, not knowing whether there was something wrong with these Cypress commands, their types, or something in my environment.After about an hour of searching for a solution, out of sheer chance, I stumbled on the
.eslintrc
file in this repo's own test directory: https://github.com/testing-library/cypress-testing-library/blob/main/cypress/.eslintrcAdding these ESLint rule overrides to my configuration fixed my issue.
Suggested solution:
Please add some documentation on the official Cypress Testing Library docs site — ESLint is extremely common in most projects these days, and many engineers may not know whether overriding these rules is the prescribed way to handle these errors or not — adding a quick section about this would save people hours of digging.
Thank you!