Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

organizeImports will break prettier formatting #49339

Closed
lordgreg opened this issue May 7, 2018 · 1 comment
Closed

organizeImports will break prettier formatting #49339

lordgreg opened this issue May 7, 2018 · 1 comment
Assignees
Labels
javascript JavaScript support issues upstream Issue identified as 'upstream' component related (exists outside of VS Code)

Comments

@lordgreg
Copy link

lordgreg commented May 7, 2018

For better readability, we are using Prettier to show our code like:

import { HttpParams } from '@angular/common/http';
import {
  Component,
  EventEmitter,
  Input,
  OnChanges,
  OnDestroy,
  OnInit,
  Output,
  SimpleChanges,
  ViewChild
} from '@angular/core';
import {
  MatPaginator,
  MatSelectChange,
  MatTableDataSource
} from '@angular/material';

organizeImports breaks the formatting

Steps to Reproduce:

  1. use prettier
  2. use format document function
  3. save so organizeImports steps in.

Result:

import { HttpParams } from '@angular/common/http';
import { Component, EventEmitter, Input, OnChanges, OnDestroy, OnInit, Output, SimpleChanges, ViewChild } from '@angular/core';
import { MatPaginator, MatSelectChange, MatTableDataSource } from '@angular/material';

Should be:

import { HttpParams } from '@angular/common/http';
import {
  Component,
  EventEmitter,
  Input,
  OnChanges,
  OnDestroy,
  OnInit,
  Output,
  SimpleChanges,
  ViewChild
} from '@angular/core';
import {
  MatPaginator,
  MatSelectChange,
  MatTableDataSource
} from '@angular/material';
@mjbvz
Copy link
Collaborator

mjbvz commented May 7, 2018

This issue was moved to microsoft/TypeScript#23931

@mjbvz mjbvz closed this as completed May 7, 2018
@mjbvz mjbvz added the upstream Issue identified as 'upstream' component related (exists outside of VS Code) label May 7, 2018
@vscodebot vscodebot bot locked and limited conversation to collaborators Jun 21, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
javascript JavaScript support issues upstream Issue identified as 'upstream' component related (exists outside of VS Code)
Projects
None yet
Development

No branches or pull requests

2 participants