Skip to content

Imports from paths configured in my tsconfig.json are not recognized as workspace (local) imports #3

Description

@bhalperin

This may be an issue or a feature request.

Example

In the example below, imports from @gh/... and core/... should be in their own group after the library imports section.

tsconfig.json:

"compilerOptions": {
    ....
    "paths": {
        "@gh/shared/*": ["../../libs/shared/src/lib/*"],
        "core/*": ["./src/app/core/*"],
    }
    ....
}

typescript file:

import { HttpClient, HttpErrorResponse } from '@angular/common/http';
import { computed, inject, Service, signal } from '@angular/core';
import { AuthKeys } from '@gh/shared/models';
import { loggedMethod } from '@gh/shared/utils';
import { StoreService } from 'core/services/store/store.service';
import { publicGet, publicPost, refreshPost } from 'core/utils/api';
import { CookieService } from 'ngx-cookie-service';
import { catchError, of, tap } from 'rxjs';

The solution may be to edit the grouping in settings.json and use regex to group these together (not tried yet). I bring it up anyway in case it's an undetected bug, or possible to include this behavior in the core extension logic.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions