cypress-testing-library
cypress-testing-library copied to clipboard
Mention ESLint configuration in docs
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/.eslintrc
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.
Thank you!
I want to second this - I had the same problem and didn't know how to solve until I found this issue :/