ReactiveX / rxjs-tslint

TSLint rules targeting RxJS
MIT License
309 stars 41 forks source link

fix mix #6

Open elvisbegovic opened 6 years ago

elvisbegovic commented 6 years ago

For unknown reasons one file in my code contains this code (certainly months ago when update to pipeable manually I omit this ... it compile = i forget)

import "rxjs/add/operator/distinctUntilChanged";
...
this.form.get('iban').valueChanges.pipe(takeUntil(<Observable<any>> this.ngUnsubscribe))
      .distinctUntilChanged()
      .subscribe(this.onChange_iban.bind(this));

When running tslint my migrate-rxjs.tslint.json nothing change ^^ Is it relevant to fix this kind of code too?

benlesh commented 6 years ago

I've tried this locally and I didn't have an issue. Do you have a minimal file that reproduces the issue?

elvisbegovic commented 6 years ago

if you compile this green cli6rc4 project issue6.zip with this rxjs-tslint and say it's normal behavior please close issue

FYI: all is inside app.component.ts

I was thinking here outdated will be removed and distinctUntilChange will move inside pipe() with correct path import but ok...

Airblader commented 6 years ago

I'm having the same issue that rxjs-5-to-6-migrate only converted the first operator to using pipe, but left all other chained operators untouched (which breaks the build due to changed imports)

geogramdotcom commented 6 years ago

same issue for me. Im having to move all my .map operators by hand

Airblader commented 6 years ago

What ended up working for me was running the command multiple times.