eslint-plugin-jest icon indicating copy to clipboard operation
eslint-plugin-jest copied to clipboard

feat: upgrade `@typescript-eslint/utils` to v6

Open SimenB opened this issue 2 years ago • 7 comments

There are so many breaking changes in v6 I don't think we'll be able to properly support v5 and v6 at the same time...

I started here and just ended up frustrated 😛 @G-Rath I dunno if you wanna give it a whack?

SimenB avatar Jul 13 '23 14:07 SimenB

@SimenB just to check, do we need to support both or move to v6 right now? I'm still triaging the new major and so far it looks like everything still works fine from a consumer POV but want to double check I've not missed something.

G-Rath avatar Jul 14 '23 20:07 G-Rath

I'd prefer to have CI verify it works with both, but there is no rush at all. It's totally fine to stay on the old version for now

SimenB avatar Jul 25 '23 21:07 SimenB

ooc if this linter plugin isn't updated to the new version and @typescript-eslint/*@6 is used in a linting setup, will that cause problems with both versions being installed and potentially used simultaneously?

I ask because the newer version has some desirable stuff in it like code to leverage the TS projects service... would be very helpful for larger repos.

quantizor avatar Aug 18 '23 18:08 quantizor

You can use v6 of the plugin already

SimenB avatar Aug 19 '23 06:08 SimenB

You can use v6 of the plugin already

Oh, what is this PR doing then?

quantizor avatar Aug 19 '23 11:08 quantizor

Any updates on this? It's starting to cause some downstream issues with packages that depend on v6 of the parser.

> npm ci
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR! 
npm ERR! While resolving: [email protected]
npm ERR! Found: @typescript-eslint/[email protected]
npm ERR! node_modules/@typescript-eslint/parser
npm ERR!   peer @typescript-eslint/parser@"^5.0.0" from @typescript-eslint/[email protected]
npm ERR!   node_modules/@typescript-eslint/eslint-plugin
npm ERR!     peerOptional @typescript-eslint/eslint-plugin@"^5.0.0 || ^6.0.0" from eslint-plugin-jest@[2](https://github.com/readmeio/readme/actions/runs/6028891616/job/16357165874?pr=9956#step:4:2)7.2.[3](https://github.com/readmeio/readme/actions/runs/6028891616/job/16357165874?pr=9956#step:4:3)
npm ERR!     node_modules/eslint-plugin-jest
npm ERR!       eslint-plugin-jest@"^27.2.3" from @readme/[email protected]
npm ERR!       node_modules/@readme/eslint-config
npm ERR!         dev @readme/eslint-config@"^12.2.0" from the root project
npm ERR!         2 more (@readme/react, @readme/schema-form)
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer @typescript-eslint/parser@"^6" from [email protected]
npm ERR! node_modules/eslint-plugin-typescript-sort-keys
npm ERR!   dev eslint-plugin-typescript-sort-keys@"^3.0.0" from the root project
npm ERR!   eslint-plugin-typescript-sort-keys@"^3.0.0" from @readme/[email protected]
npm ERR!   node_modules/@readme/eslint-config
npm ERR!     dev @readme/eslint-config@"^12.2.0" from the root project
npm ERR!     2 more (@readme/react, @readme/schema-form)
npm ERR! 
npm ERR! Conflicting peer dependency: @typescript-eslint/[email protected]
npm ERR! node_modules/@typescript-eslint/parser
npm ERR!   peer @typescript-eslint/parser@"^6" from [email protected]
npm ERR!   node_modules/eslint-plugin-typescript-sort-keys
npm ERR!     dev eslint-plugin-typescript-sort-keys@"^3.0.0" from the root project
npm ERR!     eslint-plugin-typescript-sort-keys@"^3.0.0" from @readme/[email protected]
npm ERR!     node_modules/@readme/eslint-config
npm ERR!       dev @readme/eslint-config@"^12.2.0" from the root project
npm ERR!       2 more (@readme/react, @readme/schema-form)
npm ERR! 
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR! 
npm ERR! See /home/runner/.npm/eresolve-report.txt for a full report.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/runner/.npm/_logs/2023-08-30T18_5[4](https://github.com/readmeio/readme/actions/runs/6028891616/job/16357165874?pr=9956#step:4:5)_06_1[5](https://github.com/readmeio/readme/actions/runs/6028891616/job/16357165874?pr=9956#step:4:6)1Z-debug-0.log

We can solve this with a npm ci --force but that's less than ideal.

erunion avatar Aug 30 '23 18:08 erunion

That's not because of eslint-plugin-jest - we are compatible with v6; my works eslint config is using it without issue along with on other projects internally.

This looks like a problem with npms peer resolution logic - I can reproduce this a few different ways, such as by installing eslint-plugin-typescript-sort-keys@2 (which'll install @typescript-eslint/parser v5) and then installing eslint-plugin-jest. That will result in a peer error seemingly because we support v6 - so it looks like npm tries to upgrade @typescript-eslint/parser and then fails because of eslint-plugin-typescript-sort-keys.

G-Rath avatar Aug 30 '23 19:08 G-Rath

:tada: This issue has been resolved in version 28.0.0-next.3 :tada:

The release is available on:

Your semantic-release bot :package::rocket:

github-actions[bot] avatar Mar 22 '24 19:03 github-actions[bot]

:tada: This issue has been resolved in version 28.0.0 :tada:

The release is available on:

Your semantic-release bot :package::rocket:

github-actions[bot] avatar Apr 06 '24 08:04 github-actions[bot]