standard / ts-standard

Typescript style guide, linter, and formatter using StandardJS
https://www.npmjs.com/package/ts-standard
MIT License
473 stars 36 forks source link

Can ts-standard use v5.12.1 or higher of @typescript-eslint/parser? #222

Closed btegs closed 2 years ago

btegs commented 2 years ago

As of right now, the version of @typescript-eslint/parser is in the 4.x series, but when I run ts-standard in the command line, I get this warning if I update to a newer version. I would like to use TypeScript 4.5 and above with ts-standard of course:

$ ts-standard && jest --coverage
=============

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 <4.5.0

YOUR TYPESCRIPT VERSION: 4.5.5

Please only submit bug reports when using the officially supported version.
theoludwig commented 2 years ago

Hey! 👋 Thanks for your report.

We need to add support for ESLint v8 in ts-standard to be able to update dependencies to latest including @typescript-eslint/eslint-plugin to v5 so we can support latest TypeScript versions.

To do so, there is this PR to update eslint-config-standard-with-typescript to support ESLint v8: https://github.com/standard/eslint-config-standard-with-typescript/pull/759

Then the hardest part would be to update standard-engine to v15 in ts-standard. standard-engine v15 changed a lot compared to v14. ts-standard codebase is over complicated, it redefines its own "standard-engine" to be promise based by taking the old version of standard-engine still callback based. But in v15, standard-engine is in fact promise based.

The creator/core maintainer of ts-standard is: @toddbluhm but he seems like completely inactive on GitHub.

I already suggested to "rewrite" ts-standard to be simpler and more like semistandard, standardx etc. But no response from @toddbluhm. See: https://github.com/standard/ts-standard/issues/171#issuecomment-921521437

If you want to help, you can try to update standard-engine to v15 (using prereleases) in ts-standard and open a PR, we would really appreciate that. 😁

btegs commented 2 years ago

@Divlo - I see that the PR for the newer ESLint is going through some checks now so I will pull it in once accepted.

As for @toddbluhm and his activity, would he be able to let others take over?

btegs commented 2 years ago

I see that there hasn't been an update from @toddbluhm and this project is stuck needing either a rewrite as there are still blockers with this and newer ESLint and TypeScript. Which makes you wonder... why isn't TypeScript integrated with the main standard package?

Mazuh commented 2 years ago

@btegs I couldn't make this linter work cause this issue is raised to me, do you recommend any kind of workaround? (I'm trying to close this PR attached above as blocked in another project)

theoludwig commented 2 years ago

For your information (reference: https://github.com/fastify/fastify-cli/pull/512#issuecomment-1185844565):

As a contributor/maintainer of ts-standard, I recommend switching to ESLint (using https://github.com/standard/eslint-config-standard-with-typescript). There is no energy and willpower for updating ESLint to v8 in ts-standard currently, no one on the team. :sweat_smile: But if anyone wants to help ts-standard to move things forward, and be simpler than ESLint (like standard for JavaScript), they can take a look at this: https://github.com/standard/ts-standard/issues/222#issuecomment-1054644477 Basically, a rewrite of ts-standard, we accept PRs and will be happy to review them.

EDIT: I found some free time to rewrite ts-standard, follow the progress and the future of ts-standard here: https://github.com/standard/ts-standard/pull/254

voxpelli commented 2 years ago

@mightyiam I thought ts-standard would also get a release and be part of the same CD setup you wanted to have?

mightyiam commented 2 years ago

@mightyiam I thought ts-standard would also get a release and be part of the same CD setup you wanted to have?

Sounds like an interesting idea and an unrelated discussion.

theoludwig commented 2 years ago

UPDATE: I found some free time to rewrite ts-standard, follow the progress and the future of ts-standard here: https://github.com/standard/ts-standard/pull/254