ESLint rule to prevent `connectObservable` and `connectFactoryObservable` being used inside components
See original GitHub issueI think that a common pitfall that new-comers will experience is that they may inadvertently use connectObservable
/connectFactoryObservable
from inside a functional component.
I think that we should create a ESLint rule so that developers don’t fall for that mistake. Any volunteers? cough @voliva cough
I think that as a first implementation something that just checks that the connector functions are being called from the “root scope” (not inside a function) should be enough? 🤔
Also, I think that the ESLint rule should be an error, not a warning.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:6 (4 by maintainers)
Top Results From Across the Web
eslint-plugin-rxjs/ban-observables.md at main - GitHub
This rule can be configured so that developers can ban any observable creators they want to avoid in their project. Options. This rule...
Read more >Announcing NgRx Version 12: New operator for Effects ...
NgRx Effects allows you to isolate side effect logic from your components by listening to observable streams to perform some task.
Read more >Rules - ESLint - Pluggable JavaScript Linter
A pluggable and configurable linter tool for identifying and reporting on patterns in JavaScript. Maintain your code quality with ease.
Read more >When should I create a new Subscription for a specific side ...
RxJS is a valuable resource for managing asynchronous operations and should be used to simplify your code (including reducing the number of ...
Read more >Gentle Introduction To ESLint Rules - DEV Community
The team members often forgot to unsubscribe from RxJS observable, ... In the shell, type npx eslint use-let.js to see the result for ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Sure, I’ll give it a go this afternoon!
I’m closing this issue, let’s continue the conversation in that PR/repo. Once again, thanks a lot @voliva !