google / gts

☂️ TypeScript style guide, formatter, and linter.
https://github.com/google/gts
Apache License 2.0
5.09k stars 206 forks source link

Typescript version warning was not fixed #888

Closed NickStafford closed 4 weeks ago

NickStafford commented 5 months ago

Foreword: This relates to an issue that was already opened and subsequently closed (I believe incorrectly). As such I've opened a new issue because I'm not sure whether a comment on the old issue would be picked up. If I'm wrong, then sorry, my mistake, let me know and in future I'll do that.

Issue:

Originally issue #853 reported that just running through the default setup and attempting a lint operation would result in a warning about Typescript versions being unsupported. Example error message:


> gts lint

version: 22
=============

WARNING: You are currently running a version of TypeScript which is not officially supported by @typescript-eslint/typescript-estree.

You may find that it works just fine, or you may not.

SUPPORTED TYPESCRIPT VERSIONS: >=3.3.1 <5.2.0

YOUR TYPESCRIPT VERSION: 5.4.5

Please only submit bug reports when using the officially supported version.

This was closed "fixed" as a result of #859 but it really isn't.

Even just from a "common sense" point of view the fix doesn't line up:

  1. We received an error that we were using a TS version too high for the typescript-eslint/typescript-estree dependency.
  2. A "fix" was committed that bumped the TS version even higher.

Steps to reproduce:

  1. Create a new empty folder
  2. run npm i gts
  3. run npx gts init to create a default template
  4. run npx gts lint

Summary

Previous issue was marked closed even though the issue persisted and no further guidance was given. I'll be honest I'm not really sure that there is a direct fix for this. If it was a personal project I'd downgrade TS version to be in the bounds of the typescript-estree dependency. But I get that as this has already been rolled out for a while with a higher TS version you probably don't want to downgrade and risk messing with people's existing projects.

Perhaps some "official" guidance on whether this is an issue / whether people should be worried about it for newcomers in the comments of this issue might help.

Seeing it closed "fixed" in the original issue made me scratch my head for a minute and doubt whether I'd done something wrong / recheck my dependencies.

tonycoco commented 5 months ago

You are correct. I think one of our commits got out of sync since we can't yet drop support for Node 16/18. I'll leave this reopened until those are done too.

tonycoco commented 1 month ago

@NickStafford the release of v6.0.0 should resolve this. Can you confirm?