ni / javascript-styleguide

JavaScript and TypeScript Style Guide
MIT License
9 stars 9 forks source link

Upgrade @typescript-eslint/eslint-plugin @typescript-eslint/parser #150

Open TrevorKarjanis opened 3 months ago

TrevorKarjanis commented 3 months ago

After upgrading to Angular 17, the following warning is received when running the linter.

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.4.5
Please only submit bug reports when using the officially supported version.

This is because @typescript-eslint/eslint-plugin @typescript-eslint/parser are incompatible with TypeScript@5.4.5. This is not an npm dependency. It is defined at runtime in @typescript-eslint/typescript-estree.

These packages, version ^5.62.0, are peer dependencies of @ni/eslint-config-typescript, so upgrading them requires forcing the install. @typescript-eslint/typescript-estree@7.2 supports <5.5, so a minimal upgrade of @typescript-eslint/eslint-plugin@7.2 @typescript-eslint/parser@7.2 would be required.

Have we considered upgrading them, or why have they not been upgraded?

rajsite commented 3 months ago

Have we considered upgrading them, or why have they not been upgraded?

No specific reason I'm aware. Don't have a rennovate integration so would be manual. Looking at the getting started today they don't even pull from the scoped packages like we are which is interesting: https://typescript-eslint.io/getting-started/

Edit: Ahh we are on the "legacy" eslint configuration: https://typescript-eslint.io/getting-started/legacy-eslint-setup

jattasNI commented 3 months ago

We agreed we should fix this soon. May need to do a bit of testing to ensure the new packages don't change the behavior of any rules in unexpected ways.