fix: import individual rx operators (#8160)

After the switch to lettable operators, we had started importing all operators via `rxjs/operators`. These changes switch us back to only importing the individual ones and add some linting so it doesn't happen in the future.
This commit is contained in:
Kristiyan Kostadinov
2017-11-01 00:05:10 +01:00
committed by Andrew Seguin
parent e0eda5a9ce
commit de8c6e2881
40 changed files with 84 additions and 42 deletions
+2 -2
View File
@@ -128,7 +128,7 @@ class ConfigBuilder {
#### RxJS
When dealing with RxJS operators, import the lettable operator (e.g.
`import {map} from 'rxjs/operators'`), as opposed to using the "patch" imports which pollute the
`import {map} from 'rxjs/operators/map'`), as opposed to using the "patch" imports which pollute the
user's global Observable object (e.g. `import 'rxjs/add/operator/map'`):
```ts
@@ -137,7 +137,7 @@ import 'rxjs/add/operator/map';
someObservable.map(...).subscribe(...);
// YES
import {map} from 'rxjs/operators';
import {map} from 'rxjs/operators/map';
someObservable.pipe(map(...)).subscribe(...);
```