Search code examples
reactjstypescripteslint

Parsing error: DeprecationError: 'originalKeywordKind' has been deprecated since v5.0.0 and can no longer be used


When upgrading an existing React project I'm getting the following error at line 0 of every .tsx file.

Parsing error: DeprecationError: 'originalKeywordKind' has been deprecated since v5.0.0 and can no longer be used. Use 'identifierToKeywordKind(identifier)' instead.

How can I diagnose and remove the error?


Solution

  • Having updated libs:

    @typescript-eslint/eslint-plugin
    @typescript-eslint/parser
    

    to versions 6.x resolved the problem.

    See https://github.com/typescript-eslint/typescript-eslint/issues/7155#issuecomment-1692384149 for additional details.