Skip to content
This repository has been archived by the owner on Jan 19, 2019. It is now read-only.

Make TypeScript a peerDependency #265

Merged
merged 2 commits into from
Dec 29, 2018

Conversation

j-f1
Copy link
Collaborator

@j-f1 j-f1 commented Dec 24, 2018

This will make sure users have it installed, preventing an error.

Fixes #264.


```shellsession
$ npm i typescript@~3.1.1 --save-dev

Choose a reason for hiding this comment

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

Does the tilde there really works? Just curious.
I found some problems in the past and now I'm using npm i --save-dev --save-prefix=~ typescript@3.1.1

Copy link
Owner

Choose a reason for hiding this comment

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

it should work fine.
that's the recommended way to signal the version selection prefix.

--save-prefix exists to make it easier to programmatically manipulate the CLI I believe.

@j-f1
Copy link
Collaborator Author

j-f1 commented Dec 25, 2018

I’m wondering: should the peer dependency be in typescript-estree instead since that’s the package that actually needs it?

@armano2
Copy link
Contributor

armano2 commented Dec 25, 2018

@j-f1 we are far behind right typescript-estree right now and this change is not going to be available soon

we will need release of typescript-estree -> typescript-eslint-parser -> eslint-plugin-typescript

@bradzacher
Copy link
Owner

The problem with leaving it up to typescript-estree is that it's a dependency of a dependency.

So when it shows up in the console people won't easily understand what it is and if they should ignore it.

If we have it as a direct peer dep we can better signal the versions we've tested with as well.

@armano2
Copy link
Contributor

armano2 commented Dec 25, 2018

@bradzacher bradzacher merged commit 012b6e6 into bradzacher:master Dec 29, 2018
@j-f1 j-f1 deleted the typescript-peer-dep branch December 29, 2018 23:05
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants