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

eslint testing-library in conflict with cypress-testing-library #226

Open
dominikabieder opened this issue Jul 21, 2022 · 1 comment
Open

Comments

@dominikabieder
Copy link

I've followed the instructions from testing-library, but no matter what I have, eslint seems to reject each and every function (findByRole, findByLabelText, findByText, findByDisplayValue).

Any idea how to get rid of these?

Screenshot 2022-07-21 at 12 42 02

I've added to commands.ts
import "@testing-library/cypress/add-commands";

in package.json I have
"@testing-library/cypress": "8.0.3",

in tsconfig.json

"compilerOptions": {
  "types": ["cypress", "@testing-library/cypress", "node"]
  },
  "include": ["src", "**/*.ts" ],

in .eslintrc.json

 "plugins": [
    "@typescript-eslint",
    "react-hooks",
    "prettier",
    "testing-library",
    "jest-dom",
    "cypress"
  ],
  "extends": [
    "plugin:react/recommended",
    "plugin:@typescript-eslint/recommended",
    "prettier",
    "plugin:testing-library/react",
    "plugin:jest-dom/recommended",
    "plugin:cypress/recommended"
  ],
@thenderson55
Copy link

Same issue - I have commented out "plugin:testing-library/react" for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants