19

I inherited an old AngularJs application which use the legacy tools: bower and grunt.

When I run grunt serve --reload, I have the following warning message:

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

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

SUPPORTED TYPESCRIPT VERSIONS: ~2.3.2

YOUR TYPESCRIPT VERSION: 2.2.2

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

It is weird because I use a recent version of Typescript:

tsc --version
Version 4.1.3

I make the assumption that typescript is installed locally. Is it possible?

How can I check the installed tool versions (tsc and eslint)?

How to upgrade? Does it worth it?

EDIT: Dependency list

> npm list
[email protected] /Users/llaporte/workspace/foo
├── @types/[email protected]
├── @types/[email protected]
├── @types/[email protected]
├── @types/[email protected]
├── @types/[email protected]
├── @types/[email protected]
├── @types/[email protected]
├── @types/[email protected]
├── @types/[email protected]
├── @types/[email protected]
├── @types/[email protected]
├── @types/[email protected]
├── @types/[email protected]
├── @typescript-eslint/[email protected]
├── @typescript-eslint/[email protected]
├── [email protected] (git+http://xxx/xxx/grunt-bar.git#a6b7624aeea9ea324e92a9e8971feb67ab9d0346)
└── [email protected]

EDIT: grunt version

I am using an "old" version of grunt:

> grunt --version
grunt-cli v0.1.13
grunt v0.4.5
1
  • It's communicable disease that'll never go away. Commented May 19, 2021 at 18:11

4 Answers 4

23
// .eslintrc.json

"parserOptions": {
    "warnOnUnsupportedTypeScriptVersion": false
},

Source: Github issue comment

Sign up to request clarification or add additional context in comments.

1 Comment

This way you disable all warning regarding the Typescript version
4

This is an old issue but still popping in because some dependencies in your project use an old version of

`@typescript-eslint/******@***.***`

Even CRA still install it, that doesn't means CRA or any other builder(webpack or grunt) should be downgrade to use that dependecy.

Instead as suggest and worked for me, meanwhile that library should be removed/upgraded from any builder still using it, is to add this in package.json:

"resolutions": {
  "@typescript-eslint/typescript-estree": "5.9.0"
}

basically telling the compiler to use version 5.9.0 of typescript-estree

or to "upgrade" the underling library.

Comments

-1

This warning already been fixed

https://github.com/facebook/create-react-app/issues/7255

1 Comment

The solution that the repo maintainer offered is an ability, which is ridiculous. Personally I am just going back to plain ESLint. this is the 3rd time in two years I have spent an entire night screwing around with this issue. If it takes hours to find out how install an npm package without errors, or to have to ignore a message, then something is wrong, and you cannot say its been fixed. Also, if you read the repo, they don't say fixed, they say moving forward we will deal with it by you being able to figure out all the correct versions you need for your dependencies.
-3
yarn add -D @typescript-eslint/typescript-estree

1 Comment

Please add how/why this would be helpful.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.