WARNING: Unsupported version of TypeScript

Created on 1 November 2024, 4 months ago

Any chance of fixing or suppressing the below? It could make contributors think something's wrong when it isn't, and it's distracting either way.

$ npm run lint:eslint
> vite-template-redux@0.0.0 lint:fix
> eslint --fix .

=============

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

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

=============
šŸ“Œ Task
Status

Active

Version

0.0

Component

Code

Created by

šŸ‡ŗšŸ‡øUnited States traviscarden

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

  • Issue created by @traviscarden
  • šŸ‡®šŸ‡³India shyam_bhatt Gujarat
  • Merge request !403Updated typescript to fix the issue. ā†’ (Open) created by shyam_bhatt
  • Pipeline finished with Failed
    4 months ago
    Total: 174s
    #335925
  • šŸ‡®šŸ‡³India shyam_bhatt Gujarat
  • šŸ‡³šŸ‡±Netherlands balintbrews Amsterdam, NL

    While the warning is harmless in our case, I agree that it may be confusing and distracting.

    Let's not downgrade the TypeScript version. Instead, can we please see if we can update to a newer version of typescript-eslint? We could also set warnOnUnsupportedTypeScriptVersion to false in our ESLint config, but let's try to avoid that.

  • šŸ‡®šŸ‡³India shyam_bhatt Gujarat

    @balintbrews The issue is already listed on the StackOverflow.

    This is a known issue since (at the time of writing) typescript 5.1.3 is not supported. We can either downgrade your version of typescript to match the required version, or wait until support for typescript 5.1.3 is released by the eslint team

  • šŸ‡³šŸ‡±Netherlands balintbrews Amsterdam, NL

    That question on StackOverflow is quite old, and it also shows that the Next.js team was not super concerned about the warning either. šŸ˜Š

    typescript-eslint has support for the latest stable version of TypeScript, 5.6, since its v8.10.0. If we're changing version numbers to get rid of this warning, I would rather get us upgraded to newer versions than going backwards.

    @shyam_bhatt, are you up for giving this a try?

  • šŸ‡³šŸ‡±Netherlands balintbrews Amsterdam, NL
  • šŸ‡®šŸ‡³India shyam_bhatt Gujarat

    yes @balintbrews, I will try once as per your latest comment.

  • Status changed to Needs work 8 days ago
  • šŸ‡§šŸ‡ŖBelgium wim leers Ghent šŸ‡§šŸ‡ŖšŸ‡ŖšŸ‡ŗ

    Note that TypeScript 5.8 shipped 4 days ago: https://devblogs.microsoft.com/typescript/announcing-typescript-5-8/ ā€” but not all of our other packages might like that.

    Let's move step-by-step. Moving from our current TypeScript 5.4.5 to 5.6 (as @balintbrews alluded to in #7) seems like a worthwhile intermediary step.

  • šŸ‡®šŸ‡³India meghasharma

    Working on it.

  • Pipeline finished with Failed
    7 days ago
    Total: 187s
    #440741
  • šŸ‡®šŸ‡³India meghasharma

    I have upgraded TypeScript to version 5.6.3 as per the discussion.
    Verified with: npx tsc --version and npm list typescript
    Ran npm install to ensure dependencies are correctly installed

  • šŸ‡®šŸ‡³India meghasharma

    After running npm run lint:eslint, I still see the same warning that was present earlier:
    Should we now check if we can update to a newer version of @typescript-eslint to resolve this?

  • šŸ‡§šŸ‡ŖBelgium wim leers Ghent šŸ‡§šŸ‡ŖšŸ‡ŖšŸ‡ŗ

    Should we now check if we can update to a newer version of @typescript-eslint to resolve this?

    Yes, please! šŸ™

  • šŸ‡³šŸ‡±Netherlands balintbrews Amsterdam, NL

    Just noting here that at one point we should also migrate to ESLint 9 and its new configuration format, but we can leave that to another issue.

  • šŸ‡§šŸ‡ŖBelgium wim leers Ghent šŸ‡§šŸ‡ŖšŸ‡ŖšŸ‡ŗ

    ā€¦ unless it's easier to do :D

  • Pipeline finished with Failed
    6 days ago
    Total: 177s
    #441733
  • šŸ‡®šŸ‡³India meghasharma

    I have updated @typescript-eslint/eslint-plugin and @typescript-eslint/parser to 8.26.0 as per the issue requirement.
    Installed versions:
    @typescript-eslint/eslint-plugin: 8.26.0
    @typescript-eslint/parser: 8.26.0

    After updating, I ran npm run lint:eslint and encountered the following error:

  • First commit to issue fork.
  • šŸ‡¦šŸ‡ŗAustralia tinarey

    I could replicate the issue. The problem is dependencies:

    Running `npm ls @typescript-eslint/eslint-plugin` shows these:

    @drupal/experience_builder@0.0.0 /Users/tina/Sites/PNX/drupal-contrib/experience_builder/ui
    ā”œā”€ā”€ @typescript-eslint/eslint-plugin@8.26.0
    ā”œā”€ā”¬ eslint-config-react-app@7.0.1
    ā”‚ ā”œā”€ā”€ @typescript-eslint/eslint-plugin@5.62.0
    ā”‚ ā””ā”€ā”¬ eslint-plugin-jest@25.7.0
    ā”‚   ā””ā”€ā”€ @typescript-eslint/eslint-plugin@8.26.0 deduped invalid: "^4.0.0 || ^5.0.0" from node_modules/eslint-plugin-jest
    ā””ā”€ā”¬ typescript-eslint@7.18.0
      ā””ā”€ā”€ @typescript-eslint/eslint-plugin@7.18.0

    typescript-eslint can be updated (done in MR), but eslint-config-react-app doesn't have an update (yet? might be abandonned). I've added an override which seems to work (peerDependencies didn't work), but that may need a follow up task to remove when we can.
    Otherwise we may be able to use eslint-plugin-react instead.

    I now get linting errors as expected:

    ...experience_builder/ui/src/hooks/useCopyPasteComponents.ts
      65:14  warning  'err' is defined but never used  @typescript-eslint/no-unused-vars
    
    ...experience_builder/ui/src/services/componentAndLayout.ts
      55:18  warning  'err' is defined but never used  @typescript-eslint/no-unused-vars
  • Pipeline finished with Failed
    about 21 hours ago
    Total: 1712s
    #445269
  • šŸ‡§šŸ‡ŖBelgium wim leers Ghent šŸ‡§šŸ‡ŖšŸ‡ŖšŸ‡ŗ
Production build 0.71.5 2024