-
Notifications
You must be signed in to change notification settings - Fork 13k
Closed
Labels
BugA bug in TypeScriptA bug in TypeScriptDomain: FormatterThe issue relates to the built-in formatterThe issue relates to the built-in formatterDomain: Organize ImportsIssues with the organize imports featureIssues with the organize imports featureEffort: ModerateRequires experience with the TypeScript codebase, but feasible. Harder than "Effort: Casual".Requires experience with the TypeScript codebase, but feasible. Harder than "Effort: Casual".Fix AvailableA PR has been opened for this issueA PR has been opened for this issueHelp WantedYou can do thisYou can do thisRescheduledThis issue was previously scheduled to an earlier milestoneThis issue was previously scheduled to an earlier milestone
Milestone
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
BugA bug in TypeScriptA bug in TypeScriptDomain: FormatterThe issue relates to the built-in formatterThe issue relates to the built-in formatterDomain: Organize ImportsIssues with the organize imports featureIssues with the organize imports featureEffort: ModerateRequires experience with the TypeScript codebase, but feasible. Harder than "Effort: Casual".Requires experience with the TypeScript codebase, but feasible. Harder than "Effort: Casual".Fix AvailableA PR has been opened for this issueA PR has been opened for this issueHelp WantedYou can do thisYou can do thisRescheduledThis issue was previously scheduled to an earlier milestoneThis issue was previously scheduled to an earlier milestone