Closed
Description
TS Template added by @mjbvz
TypeScript Version: 4.1.0-dev.20200918
Search Terms
- organize imports
- VSCode Version: 1.49.1 (user setup)
- OS Version: Windows_NT x64 10.0.19041
I am not 100% sure what is the exact scenario how to reproduce this, but it happens 90% of the time. When I press ALT+SHIFT+O (Organize Imports), I get plenty of spacing in my imports.
The rules for organizing these imports seem to be all over the place, which one ends up on their own line? etc.
I always have to clean up manually.
These imports:
import {
ChangeDetectionStrategy,
Component,
ContentChild,
EventEmitter,
Input,
Output,
TemplateRef,
AfterViewInit,
ChangeDetectorRef,
HostBinding,
ElementRef,
ViewChild
} from '@angular/core';
import { Resource, ClickableResource } from '@models/resource';
import { newGuid } from '@utility/string';
import { DragulaService } from 'ng2-dragula';
Become:
import {
AfterViewInit, ChangeDetectionStrategy,
ChangeDetectorRef, Component,
ContentChild,
ElementRef, EventEmitter,
HostBinding, Input,
Output,
TemplateRef,
ViewChild
} from '@angular/core';
import { ClickableResource, Resource } from '@models/resource';
import { newGuid } from '@utility/string';
import { DragulaService } from 'ng2-dragula';
Video of what is happeining.
spacing-incorrect.zip
Does this issue occur when all extensions are disabled?: Yes
Metadata
Metadata
Assignees
Labels
A bug in TypeScriptThe issue relates to the built-in formatterIssues with the organize imports featureRequires experience with the TypeScript codebase, but feasible. Harder than "Effort: Casual".A PR has been opened for this issueYou can do thisThis issue was previously scheduled to an earlier milestone