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 #23931

Closed
mjbvz opened this issue May 7, 2018 · 2 comments
Closed

organizeImports will break prettier formatting #23931

mjbvz opened this issue May 7, 2018 · 2 comments
Labels
Duplicate An existing issue was already created

Comments

@mjbvz
Copy link
Contributor

mjbvz commented May 7, 2018

From @lordgreg on May 7, 2018 7:34

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';

Copied from original issue: microsoft/vscode#49339

@mhegazy
Copy link
Contributor

mhegazy commented May 7, 2018

Duplicate of #22991

@mhegazy mhegazy marked this as a duplicate of #22991 May 7, 2018
@mhegazy mhegazy added the Duplicate An existing issue was already created label May 7, 2018
@typescript-bot
Copy link
Collaborator

Automatically closing this issue for housekeeping purposes. The issue labels indicate that it is unactionable at the moment or has already been addressed.

@microsoft microsoft locked and limited conversation to collaborators Jul 31, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Duplicate An existing issue was already created
Projects
None yet
Development

No branches or pull requests

3 participants