Search code examples
typescript-eslintnext.js13

A version of TypeScript which is not officially supported by @typescript-eslint/typescript-estree


Right after I initialized a Next.js project using the command below,

npx create-next-app@latest \
hello \
--typescript \
--no-tailwind \
--eslint \
--app \
--no-src-dir \
--import-alias "@/*"

and then I got the following warning when npx run lint

$ npx eslint .
=============

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

YOUR TYPESCRIPT VERSION: 5.1.3

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

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

May I know how to fix this warning? Is this some misconfiguration by create-next-app?


Solution

  • This is a known issue since (at the time of writing) typescript 5.1.3 is not supported. You 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 (you can track this here)