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

Fix @typescript-eslint typescript peer dependency warning #6859

Closed

Conversation

ianschmitz
Copy link
Contributor

Fixes #6834.

Bump @typescript-eslint packages to a newer version that have removed the typescript peer dependency.

@ianschmitz ianschmitz added this to the 3.0 milestone Apr 21, 2019
@ianschmitz ianschmitz added this to In progress in v3 via automation Apr 21, 2019
@ianschmitz
Copy link
Contributor Author

Doh. Not quite this simple. Still a couple warnings left it looks like when checking out the CI logs:

warning "react-scripts > @typescript-eslint/eslint-plugin > tsutils@3.10.0" has unmet peer dependency "typescript@>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev".
warning "react-scripts > pnp-webpack-plugin > ts-pnp@1.1.1" has unmet peer dependency "typescript@*".

@@ -30,8 +30,8 @@
"dependencies": {
"@babel/core": "7.4.3",
"@svgr/webpack": "4.1.0",
"@typescript-eslint/eslint-plugin": "1.6.0",
"@typescript-eslint/parser": "1.6.0",
"@typescript-eslint/eslint-plugin": "1.7.1-alpha.1",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we want to ship an alpha version just to remove some warnings. Can we wait until this is stable and upgrade it after the 3.0 release?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can yes. This is a commit after their 1.7.0 release as they release automatically on commit to master.

@arcanis
Copy link
Contributor

arcanis commented Apr 21, 2019

warning "react-scripts > pnp-webpack-plugin > ts-pnp@1.1.1" has unmet peer dependency "typescript@*".

I've published pnp-webpack-plugin@1.4.3 which should fix the problem (typescript is now an optional peer dependency of ts-pnp; we only were using it for the TS types).

@iansu iansu removed this from In progress in v3 Apr 22, 2019
@iansu iansu modified the milestones: 3.0, 3.x Apr 22, 2019
@ianschmitz
Copy link
Contributor Author

Alright looks like this might be the last one:

warning "react-scripts > @typescript-eslint/eslint-plugin > tsutils@3.10.0" has unmet peer dependency "typescript@>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev".

@bugzpodder bugzpodder modified the milestones: 3.x, 3.1 Jul 23, 2019
@zarsky-broad
Copy link

@ianschmitz can this be moved ahead now that 1.8.0 (and indeed, up through 1.13.0) have been released? Just doing an audit of my project's install warning and came across this.

@ianschmitz
Copy link
Contributor Author

ianschmitz commented Aug 4, 2019

@ianschmitz can this be moved ahead now that 1.8.0 (and indeed, up through 1.13.0) have been released? Just doing an audit of my project's install warning and came across this.

Still getting warnings :(

warning "react-scripts > @typescript-eslint/eslint-plugin > tsutils@3.14.1" has unmet peer dependency "typescript@>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev".

@mrmckeb
Copy link
Contributor

mrmckeb commented Aug 8, 2019

It's probably worth merging this for 3.1 anyway, what do you think @ianschmitz @iansu?

@arcanis
Copy link
Contributor

arcanis commented Aug 8, 2019

Fwiw I don't think using an unsafe pattern known to break under some circumstances (omitting peer dependencies from the manifest) just to remove warnings is a good tradeoff, especially when those warning can already disappear for half the users by using the right feature (npm is also going to implement optional peer dependencies, btw) ...

I should probably bring this to the typescript-eslint project, but since I think they made the change based on CRA I wanted to raise it here as well 🙁

@iansu
Copy link
Contributor

iansu commented Aug 8, 2019

@arcanis thanks for the additional info. I think we should hold off on this since it doesn't actually solve the problem. If this is something that's going to be addressed directly by package managers then maybe we should just wait for that to happen.

@iansu iansu modified the milestones: 3.1, 3.x Aug 8, 2019
@eddiemonge
Copy link
Contributor

@ianschmitz this is outdated so can probably be closed

@laoshaw
Copy link

laoshaw commented Oct 1, 2020

today is 2020.10.01 and I still got below from a fresh create-react-app project:

npm ERR! peer dep missing: typescript@>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta, required by tsutils@3.17.1
npm ERR! peer dep missing: typescript@>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta, required by tsutils@3.17.1

@ianschmitz
Copy link
Contributor Author

@ianschmitz this is outdated so can probably be closed

Agreed. Webpack 5 also includes native pnp support AFAIK, so that will change things.

@ianschmitz ianschmitz closed this Dec 9, 2020
@ianschmitz ianschmitz deleted the typescript-eslint-peerdep branch December 9, 2020 18:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

react-scripts v3 via npm requires a peer of typescript@*
9 participants