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

Messy imports with rxjs-5-to-6-migrate #36

Closed
mxchange opened this issue May 8, 2018 · 1 comment
Closed

Messy imports with rxjs-5-to-6-migrate #36

mxchange opened this issue May 8, 2018 · 1 comment

Comments

@mxchange
Copy link

mxchange commented May 8, 2018

Issues

  • It appends a new line at the start of most imports/files
  • It adds a new line in between
  • It moves rxjs imports to the top
  • It does not add spaces between the brackets

Examples:


import {of as observableOf} from 'rxjs';

import {take} from 'rxjs/operators/take';
import { Injectable } from '@angular/core';
...

import {fromEvent as observableFromEvent} from 'rxjs';

import {map} from 'rxjs/operators/map';

import {takeUntil} from 'rxjs/operators/takeUntil';
import { ChangeDetectionStrategy, Component, EventEmitter, Input, OnDestroy, OnInit, Output } from '@angular/core';
import { Observable } from 'rxjs';

import { UploadFile } from '@core/models';
...

The one about the spaces might be a bit opinionated, but it would be nice to be able to configure, because this is a lot of manual labour to fix, unless someone has a clever script or plugin for webstorm to fix that :)

But the new line thing should definitely not happen.

@mgechev
Copy link
Collaborator

mgechev commented May 8, 2018

Hey @mxchange, the tool doesn't perform automated code formatting. You can use prettier or clang-format once you run the migrations.

@mgechev mgechev closed this as completed May 8, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants