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

Support TypeScript 4.x #41

Open
opl- opened this issue Sep 13, 2020 · 5 comments
Open

Support TypeScript 4.x #41

opl- opened this issue Sep 13, 2020 · 5 comments

Comments

@opl-
Copy link

opl- commented Sep 13, 2020

Versions:

  • prettier-tslint version: 0.4.2

Problem description:

TypeScript has recently released a new update which bumped the major. Unfortunately, TypeScript doesn't adhere to semver (see microsoft/TypeScript#14116). This means that this package needs to update the typescript peerDependency to allow using TypeScript 4.0+ with it.

Suggested solution:

Using 2.5.3 || >=3.0.0 (or simply >=2.5.3 if all versions past v2.5.3 are supported) as the peer dependency version for the typescript package should fix this issue. See https://docs.npmjs.com/files/package.json#dependencies

@hisham
Copy link

hisham commented Dec 28, 2020

+1

1 similar comment
@samrae7
Copy link

samrae7 commented Mar 24, 2021

+1

@hisham
Copy link

hisham commented Jun 30, 2021

Any update on this? I assume this package works fine with ts4 you just get a warning?

@opl-
Copy link
Author

opl- commented Jul 1, 2021

Since TypeScript is declared as a peerDependency, in theory npm should just complain that the peer dependency is unmet, but node should still be able to resolve it to the newer version as long as one is installed.

In practice, you might want to check that prettier-tslint doesn't have its own version of TypeScript (in node_modules/prettier-tslint/node_modules/typescript), as that's what prompted me to open this issue in the first place.

@hisham
Copy link

hisham commented Jul 2, 2021

Thanks @opl- - I ended up moving off of tslint as it's deprecated, and then used prettier-eslint package.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants