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

Jest is automatically in scope. Do not import "jest" in Config file. #1333

Closed
SalahAdDin opened this issue Jan 23, 2023 · 1 comment
Closed

Comments

@SalahAdDin
Copy link

The documentation says we need to import the correct type for the configuration object if we are working with Typescript.

However, when we import it, the linter complains about it:
Screenshot_20230123_135811

Is this normal?

Dev packages:

"@testing-library/dom": "8.20.0",
    "@testing-library/jest-dom": "5.16.5",
    "@testing-library/react": "13.4.0",
    "@testing-library/user-event": "14.4.3",
    "@trivago/prettier-plugin-sort-imports": "4.0.0",
    "@types/jest": "29.2.6",
    "@types/node": "18.11.18",
    "@types/react": "18.0.27",
    "@types/react-dom": "18.0.10",
    "@typescript-eslint/eslint-plugin": "5.48.2",
    "@typescript-eslint/parser": "5.48.2",
    "eslint": "8.32.0",
    "eslint-config-airbnb": "19.0.4",
    "eslint-config-airbnb-typescript": "17.0.0",
    "eslint-config-prettier": "8.6.0",
    "eslint-import-resolver-typescript": "3.5.3",
    "eslint-plugin-import": "2.27.5",
    "eslint-plugin-jest-dom": "4.0.3",
    "eslint-plugin-jsx-a11y": "6.7.1",
    "eslint-plugin-prettier": "4.2.1",
    "eslint-plugin-react": "7.32.1",
    "eslint-plugin-testing-library": "5.9.1",
    "husky": "8.0.3",
    "jest": "29.3.1",
    "jest-environment-jsdom": "29.3.1",
    "jest-watch-typeahead": "2.2.1",
    "lint-staged": "13.1.0",
    "msw": "0.49.3",
    "prettier": "2.8.3",
    "ts-jest": "29.0.5",
    "ts-node": "10.9.1",
    "typescript": "4.9.4",
    "web-vitals": "3.1.1"
@SimenB
Copy link
Member

SimenB commented Jan 23, 2023

eslint-plugin-jest is missing from your list, so I don't know which version you're using. That said, the rule was removed in version 27 of this plugin: #1220

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