-
-
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
What's the recommended method for using rxjs-add in a modularized Angular app? #30
Comments
The options for the rule look fine. There is no real recommendation regarding those. However, if you are using the Angular CLI you should follow the configuration recommendations in the README or look at what was done in the included example. My figuring out what's happening is close to impossible, but I do have some questions that you can ask yourself and investigate:
Hope that's helpful. |
I think my issue is similar to #33 I saw what you wrote on that Issue and I've tried the following: In my
This gets rid of the Any ideas why the linter isn't picking up the usage in the actual class? This isn't really a big deal, imo. Just a nice to fix, fix. |
The problem is that it's very difficult to see the whole context. I'm not even sure what the class you mention looks like or what the usage of Basically, the three-pass linting that's in the CLI makes dealing with a single imports file a little tricky - doable, but somewhat tricky. However, it makes diagnosing problems almost impossible. I think that the only way these sorts of things could be addressable would be if the problem could be reproduced - in a fork - using the CLI example that's in this repo. All I can suggest - without a repro - is that you do what's mentioned in the README:
|
Closing this, as without a repro, there's not much I can do. However, I realise that I didn't ask whether or not you were using TSLint's
|
I've used this package along with this configuration here in my tslint.json:
It has worked perfectly so far, with a centralized
rxjs.imports
file to keep track of all the operators and observable methods.However, since I've refactored into using an ngModule style of file structure (for lazy loading and just tidier file structures), the
Unused patched observable in ./src/rxjs.imports.ts: fromEvent
errors are firing off falsely.Here's the article I used to modularize: https://medium.com/@motcowley/angular-folder-structure-d1809be95542.
The structure now looks like this for
src/app
What kind of configuration do I need to make in order to point them to my modules?
Mind you, the app works perfectly. It's just the allowUnused rules that are falsely firing.
The text was updated successfully, but these errors were encountered: