ReactiveX / rxjs-tslint

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

Incorrectly imports constants as functions #27

Open 0x-r4bbit opened 6 years ago

0x-r4bbit commented 6 years ago

Before

import { never } from 'rxjs/observable/never

After

import { NEVER as never } from 'rxjs';

^ This shouldn't be.

benlesh commented 6 years ago

this should be:

import { NEVER } fromrxjs'``

and then usage is just:

NEVER (not never() or NEVER())

mgechev commented 6 years ago

This will require the development of a new rule in order to be properly solved. Not sure if I'll be able to work on this in the next a couple of weeks.

cartant commented 6 years ago

Something to watch out for is that empty can be passed a scheduler argument, so simply replacing the call with the constant could change behaviour.