When working with Angular and the Angular CLI, one might import an RxJS Observable as:

import { Observable } from 'rxjs';

Later, running TSLint reports This import is blacklisted, import a submodule instead.

Quick fix

To fix the error reported by TSLint, simply change

import { Observable } from 'rxjs';

to

import { Observable } from 'rxjs/Observable';

Now, run TSLint and the error should be gone! However, this change may have created compilation error(s), potentially requiring importing some operators.

Import operators (as necessary)

After making this change, some operators may need to be imported. Here’s how to import map:

import 'rxjs/add/operator/map';

Extra

This blacklisted import can be found in tslint.json as:

{
  "rules": {
    "import-blacklist": [true, "rxjs"]
  }
}