-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Document why there's no parserOptions.typescriptLocation
#4102
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I don't know of one. @bradzacher might. However, my gut instinct is that you don't want to do this. TypeScript versions often have slight differences in edge cases that can cause contradictory information between typescript-eslint rules and editor information. For example:
Either way, we should definitely document this recommendation somewhere. 😄 |
We don't want to do this because it makes life really complicated. TypeScript must be imported in three places:
If we allow users to specify a path for typescript then we need to ensure every single TS import in this project respects that, and we need to make sure every 3rd party plugin that we don't control also respects that. The system works by simply using nodes standard module resolution to import the TS version it you installed. This is why we only have a peer dependency on TS - so that you can control the exact version of TS you are using. |
Oh @loynoir would it be inoffensive to you if we kept this open as a documentation ticket? We should add this to our docs somewhere. Fun fact, we just pushed a very early version of the new http://typescript-eslint.io in #4105 🚀 and are about to start a docs overhaul! |
parserOptions.typescriptLocation
?parserOptions.typescriptLocation
I'm OK with it. :) |
Scenario
Using typescript > 4.5.0, but not yet officially supported by
eslint
.Is there a way to specific typescript location for
typescript-eslint
, so no need to modify package.json?Additional Infomation
The text was updated successfully, but these errors were encountered: