Open mikekreeki opened 6 years ago
Thank you for your feedback, @mikekreeki! Responsible and consistent usage of path aliases makes code cleaner.
From what I can see at https://github.com/palantir/tslint/issues/3654 and https://github.com/palantir/tslint/issues/3364#issuecomment-338920133 it's not enough to have TypeScript AST. It looks like TSLint doesn't run actual module resolution, which is required to distinguish path-aliased local imports from library imports.
I'll dig into TSLint core and try to figure out if architecturally possible to do some kind of lightweight module resolution (w/o full compilation).
Thank you so much. I see big value in this plugin for projects with multiple teams working in the same codebase, we feel the pains in managing that manually and being able to do bundle splitting efficiently.
@electroma, thank you for cool package.
Do you have any updates about this issue?
I wrote a rule myself. It is not as sophisticated but for my use cases it works. You may want to check it out here
Paths appear to work for me without any issues. I'm using the following versions:
Typescript 3.1.6 Tslint 5.11.0 Tslint-forbidden-imports 1.0.9
Awesome plugin, exactly what we were looking for, but the plugin does not seem to resolve import paths which use aliases defined in
tsconfig
.In our project we import like:
With
tsconfig
containing the following: