Closed
Description
Nested type declarations can be "deeply imported" in typescript, in a bit awkward syntax, see:
microsoft/TypeScript#39935
Currently both the plugin and the builtin import order rule ignores these lines, which is rather unfortunate, since editors insert autoimports below the last "import-like" line:
import { Store } from '@ngrx/store';
import { BehaviorSubject, combineLatest } from 'rxjs';
import { ViewModels } from 'src/generated/api-services-generated-new';
import { ApiCallStatus } from 'src/tools-new/api-action-statuses.reducer';
import { IToolsState } from 'src/tools-new/tools.reducer';
import Search = Models.Dashboard.Search;
import IUserStats = Models.Dashboard.IUserStats; // <--- this is not the same as a type redeclaration
An autoimport will insert the new import { foo } from './foo'
below the last line, which will be ignored by the sorter. Any new imports will land under the last import, further piling up the problematic (unsortable) lines.
I can understand, if this can / should be considered a problem with the code editor (vscode in my case) though. What's your opinion?
Metadata
Metadata
Assignees
Labels
No labels