eslint/typescript-eslint-parser

Question: How to get access type variables from scope

armano2 opened this issue · 4 comments

I'm unsure if its supported yet, but in eslint scope contains informations about variables declared in it, but i'm unable to find types.

we have node: TSTypeParameterDeclaration -> TSTypeParameter but rather than iterating over all of them and checking if scope is same i don't see easier way to do so.

it will be nice if we could extend scopeManager and add information about this there.

If i'm wrong please correct me :>

It's not supported yet. We need design.

I think that we should expose parserServices to access type information. (https://eslint.org/docs/developer-guide/working-with-custom-parsers)

For sure it will help writing rules, thank you :)

This issue has been migrated to the new project here: typescript-eslint/typescript-eslint#19

Thanks!