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

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

Closed
btegs opened this issue Feb 28, 2022 · 8 comments · Fixed by #254
Closed

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

btegs opened this issue Feb 28, 2022 · 8 comments · Fixed by #254
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@btegs
Copy link

btegs commented Feb 28, 2022

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
Copy link
Member

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: mightyiam/eslint-config-love#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: #171 (comment)

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. 😁

@theoludwig theoludwig added enhancement New feature or request help wanted Extra attention is needed labels Feb 28, 2022
@btegs
Copy link
Author

btegs commented Mar 1, 2022

@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
Copy link
Author

btegs commented Mar 25, 2022

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?

agilgur5 added a commit to agilgur5/ts-library-base that referenced this issue Jun 14, 2022
Similar to the bottom piece of agilgur5/react-signature-canvas@c70cc5a
- I didn't know ts-standard was a thing and had been using eslint-config-standard-with-typescript and all the deps instead before (which itself was a relatively recent development)

- I had put off adding ts-standard here to this repo/boilerplate due to its conflicts with `tsc`
  - I suspect the conflicts are because of ts-standard's old version of ESLint that may not have brought it in sync with the TS developments around index signatures
    - ts-standard (and the whole standard ecosystem, tbh) have been suffering a bit of lack of maintenance and so have been slow to upgrade etc
      - for a summary, see standard/ts-standard#222 -- I might just tackle some of the remaining tasks myself?
    - and as it doesn't seem like it'll be upgraded anytime too soon, figured I might as well bring it in before I put it off for too long
  - was able to eslint-ignore the 3 conflicts, so think that's good enough as a workaround _for now_
    - it doesn't seem to be that much of a problem _within_ some of my other libraries' codebases (as opposed to just in the config), so think it's ok for now unless it starts to pose more problems

- remove trailing commas per current ts-standard style
  - maybe this is changed in newer versions of standard? since trailing commas are better, but may not have been fully supported before

- remove `package-json-type` dep as it wasn't helping much and also causing type issues due to custom fields
@Mazuh
Copy link

Mazuh commented Jul 5, 2022

@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
Copy link
Member

theoludwig commented Jul 15, 2022

For your information (reference: fastify/fastify-cli#512 (comment)):

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. 😅
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: #222 (comment)
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: #254

@voxpelli
Copy link
Member

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

@mightyiam
Copy link
Member

@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
Copy link
Member

UPDATE: I found some free time to rewrite ts-standard, follow the progress and the future of ts-standard here: #254

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

5 participants