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-config-next pinning to @typescript-eslint/parser@^4.20.0 causing issues upgrading to eslint-plugin-jest@^25.* #30069

Closed
mduleone opened this issue Oct 19, 2021 · 2 comments
Assignees
Labels
bug Issue was opened via the bug report template. Linting Related to `next lint` or ESLint with Next.js.

Comments

@mduleone
Copy link
Contributor

What version of Next.js are you using?

11.1.2

What version of Node.js are you using?

16.10.0

What browser are you using?

Chrome

What operating system are you using?

MacOS 11.6

How are you deploying your application?

Other platform

Describe the Bug

Attempting to upgrade eslint-plugin-jest to its latest version, 25.2.2, which is a major version bump from the previous version, is failing to install on npm install.

We get the following error message

Found: @typescript-eslint/parser@4.29.1
node_modules/@typescript-eslint/parser
  @typescript-eslint/parser@"^4.20.0" from eslint-config-next@11.1.2
  node_modules/eslint-config-next
    dev eslint-config-next@"^11.1.2" from the root project

Could not resolve dependency:
dev eslint-plugin-jest@"^25.2.2" from the root project

Conflicting peer dependency: @typescript-eslint/parser@5.1.0
node_modules/@typescript-eslint/parser
  peer @typescript-eslint/parser@"^5.0.0" from @typescript-eslint/eslint-plugin@5.1.0
  node_modules/@typescript-eslint/eslint-plugin
    peerOptional @typescript-eslint/eslint-plugin@"^4.0.0 || ^5.0.0" from eslint-plugin-jest@25.2.2
    node_modules/eslint-plugin-jest
      dev eslint-plugin-jest@"^25.2.2" from the root project

It seems that eslint-config-next needs to be updated to point to a 5.x version of @typescript-eslint/parser

Expected Behavior

npm install succeeds without a dependency clash

To Reproduce

Attempt to upgrade to eslint-plugin-jest@^25.2.2

@mduleone mduleone added the bug Issue was opened via the bug report template. label Oct 19, 2021
@timneutkens timneutkens added the Linting Related to `next lint` or ESLint with Next.js. label Oct 31, 2021
@housseindjirdeh
Copy link
Collaborator

#29865 upgraded the dep to "^5.0.0".

Please upgrade next to v12.0.5-canary.0 or later to resolve this issue 🎉

@balazsorban44
Copy link
Member

This issue has been automatically locked due to no recent activity. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.

@vercel vercel locked as resolved and limited conversation to collaborators Jan 27, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue was opened via the bug report template. Linting Related to `next lint` or ESLint with Next.js.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants