Skip to content

eslint-config-next pinning to @typescript-eslint/parser@^4.20.0 causing issues upgrading to eslint-plugin-jest@^25.* #30069

@mduleone

Description

@mduleone

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/[email protected]
node_modules/@typescript-eslint/parser
  @typescript-eslint/parser@"^4.20.0" from [email protected]
  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/[email protected]
node_modules/@typescript-eslint/parser
  peer @typescript-eslint/parser@"^5.0.0" from @typescript-eslint/[email protected]
  node_modules/@typescript-eslint/eslint-plugin
    peerOptional @typescript-eslint/eslint-plugin@"^4.0.0 || ^5.0.0" from [email protected]
    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

Metadata

Metadata

Labels

LintingRelated to `next lint` or ESLint with Next.js.bugIssue was opened via the bug report template.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions