Open
Description
Hey.
I am currently working on an nx project. Where in the tsconfig something like that is configured:
"compilerOptions": {
"paths": {
"@auth/feature-auth": ["libs/auth/feature-auth/src/index.ts"],
"@employee-view/api": ["libs/employee-view/api/src/index.ts"],
"@employee-view/shared": ["libs/employee-view/shared/src/index.ts"],
"@shared/map": ["libs/shared/map/src/index.ts"],
"@ui-library/*": ["libs/ui-library/src/lib/*"],
}
}
Then in the code somewhere in the project there is an import like:
import { ZipCodeUtilsService } from '../../../../../shared/map/src/lib/services/zip-code-utils.service';
Which could be shortened to
import { ZipCodeUtilsService } from '@shared/map';
I guess I want something similar to what my IDE is doing.
Currently my IDE (WebStorm) shows a suggestion like that, but I guess thats WebStorm specific. And I can't run eslint --fix to do that:
Is that already possible with a eslint rule or is that a possible improvement to this package? (I guess it would fit into import/no-useless-path-segments)