Version of TypeScript not officially supported by typescript-eslint-parser

Viewed 17978

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
foo@16.17.12 /Users/llaporte/workspace/foo
├── @types/angular-animate@1.5.9
├── @types/angular-gettext@2.1.32
├── @types/angular-material@1.1.58
├── @types/angular-sanitize@1.3.7
├── @types/angular-ui-router@1.1.40
├── @types/angular@1.6.43
├── @types/es6-shim@0.31.35
├── @types/jasmine@2.8.6
├── @types/jquery@2.0.49
├── @types/ramda@0.25.51
├── @types/underscore.string@0.0.30
├── @types/underscore@1.8.7
├── @types/urijs@1.15.36
├── @typescript-eslint/eslint-plugin@4.14.2
├── @typescript-eslint/parser@4.14.2
├── grunt-bar@1.2.0 (git+http://xxx/xxx/grunt-bar.git#a6b7624aeea9ea324e92a9e8971feb67ab9d0346)
└── typescript@4.1.3

EDIT: grunt version

I am using an "old" version of grunt:

> grunt --version
grunt-cli v0.1.13
grunt v0.4.5
4 Answers
// .eslintrc.json

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

Source: Github issue comment

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.

yarn add -D @typescript-eslint/typescript-estree
Related