-
-
Notifications
You must be signed in to change notification settings - Fork 22
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
Angular CLI gotcha when an RxJS function is used only in a unit test #14
Comments
I've (only quickly) read your issue and would like to confirm whether or not you've read and followed the Angular CLI recommendations in the README.md. |
Yes, I did, thank you. If I understand correctly, it is about the case when only an application file is using an operator, but not any test file, and your recommendation helps fixing the problem when linting the test files. |
Off the top of my head, I cannot think of an ideal solution to this. The linting of the application and test files uses the same A hacky solution would be to create an Alternatively, you could look into what's involved in getting Angular's CLI to use a different On the plus side, the good news is that this sort of annoyance will be a thing of the past with the lettable/pipeable operators in RxJS 5.5. |
Thanks for your reply, Nicholas. |
@balassy Any stuff in tsconfig? I had a few unused variable rules in there which threw that error. |
I have the following
rxjs.imports.ts
file in an Angular 4 project:I have the following rule in the
tslint.json
file:The following error is thrown when I run
tslint
:I am using
Observable.of(...)
in my code, however only in one single.spec.ts
file. It seems that the error is thrown during linting the application files, because if I remove the following block from thelint
section of the.angular-cli.json
file, the error disappears:Do you have any recommendation on how can I fix this, or this is just another gotcha that would be useful to add to the README?
Thank you!
The text was updated successfully, but these errors were encountered: