feat(typescript-estree): add strict type mapping to parserServices.esTreeNodeToTSNodeMap#1382
feat(typescript-estree): add strict type mapping to parserServices.esTreeNodeToTSNodeMap#1382bradzacher merged 11 commits intotypescript-eslint:masterfrom armano2:esTreeNodeToTSNodeMap
parserServices.esTreeNodeToTSNodeMap#1382Conversation
This comment has been minimized.
This comment has been minimized.
|
there are a lot of places that I just dropped in Instead of using an excludes, I think it would be a good idea to strictly type the Also for For the getter on WDYT? |
|
@bradzacher type mapping is added, i'm unsure if we should expose it to plugins |
bradzacher
left a comment
There was a problem hiding this comment.
I was actually thinking we should do something like this, but I was too lazy to go through the parser logic and pull out the mapping. So thanks!
I think this is a good idea, and I like the idea of removing the manual conversion as I wouldn't be surprised if we got it wrong around the place.
Could you also run the no-unnecessary-type-arguments rule to fix up any manual annotations that are now unnecessary?
bradzacher
left a comment
There was a problem hiding this comment.
LGTM - one question then I'm happy for this to merge.
parserServices.esTreeNodeToTSNodeMap
|
There wasn't a bug before, just relaxed types; so switching this to a feat, it's an enhancement and strictification of the types we already provided. |
I'm unsure if we actually want this change and if place where type is defined is good one.
i was also thinking about name:
ParserServicesConvertibleTypesrules that will have to be updated to use more strict types instead of Node:
@bradzacher what do you think about this?
for example in
prefer-regexp-execfunctionisStringTypeis used to check type but as argument it acceptsTSESTree.Nodeand it shouldTSESTree.LeftHandSideExpression