Description
I'm not really a pro at Eslint nor Typescript Compiler, but I did notice this strange behaviour
To me it seems that "type aware" linting isn't really fully working.
For example if we import something from a gts
file, whatever we imported, the @typescript-eslint/parser won't be aware of it's types
Here is a link to a fork where I setup a test with reproduction:
vstefanovic97@70235ac
This is my theory on why this is happening (though I might be wrong):
Right now we rely on @typescript-eslint/parser to do everything and we just forward options to it, but if we just rely on it, it will generate a Typescript Program
w/o including any of our gts
files. It seems like we need to create our own typescript Program
with a custom CompilerHost
that will know how to read gts
files.
For context, terminology like Program
and CompilerHost
are from https://github.com/microsoft/TypeScript/wiki/Using-the-Compiler-API, and typescript-eslint
supports us providing it a program
in it's options so that seems like the way to go to me at least