Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork2.8k
Why does@typescript-eslint/parser
not use the linted code's TypeScript package#6031
-
RFCIn#3293, I identified a problem where the location of the During development on one of our internal tools, this exact issue cropped up again, causing us to revisit#3293. That led me to wonder... why does In our case, the Additional InfoNo response Before you submit your RFC, please confirm the following. If any of these required steps are not taken, we may not be able to review your RFC. Help us to help you!
|
BetaWas this translation helpful?Give feedback.
All reactions
Replies: 1 comment 1 reply
-
The short answer is no - because we need to use the exact same TS version everywhere and we need to make sure that everyone uses th exact same TS version everywhere, which would be a very high effort project to do, which (frankly) isn't something worth doing to solve for this really rare usecase. We control the parser, we control one eslint plugin. But there are many other plugins that exist using type information. In order to make this world of "consume TS from the file's directory" work we would have to:
Hopefully this helps shed some light on the large complexities that are involved in making the ecosystem work like this. As I said - the cost is monumentally high and has large ongoing maintenance costs. Such a cost is too great to pay to solve the very, very unique problem. Generally the solution would be to colocate your linting install and your code install so they have the exact same version. Failing that ensuring that the TS version is synced / enforced via some CI check should be fine. |
BetaWas this translation helpful?Give feedback.
All reactions
-
I was traveling last week, but wanted to thank you for taking the time to explain this so thoroughly. I realize our situation is atypical, but I wanted to post about it in case it was a simple change, since on the surface it seemed like it could be an improvement. Doesn't sound like it's worth the complexity, though, which is understandable. |
BetaWas this translation helpful?Give feedback.
All reactions
❤️ 1