feat(lint): add avoid_async_emit rule with tests and documentation#4585
feat(lint): add avoid_async_emit rule with tests and documentation#4585Katekko wants to merge 5 commits intofelangel:masterfrom
Conversation
|
Hello @felangel I've implemented the avoid_async_emit lint rule based on the open issue regarding unguarded emit calls inside async methods. This rule helps ensure emit is properly guarded with isClosed checks to prevent potential runtime issues. Please review and let me know if any adjustments are needed! ps. This is my first time contributing a lint rule. Please let me know if there are any improvements I can make or if there's a better approach I should follow. |
felangel
left a comment
There was a problem hiding this comment.
Thanks so much for the PR! I haven't thoroughly reviewed the code yet but at first glance I think changes are needed since this lint rule should apply to both Bloc and Cubit instances. Currently it looks like this is implemented to ignore Bloc instances entirely.
…nt tests for Bloc
|
You were right—I needed to include Bloc as well. I updated the condition in handleIdentifier to check for both Cubit and Bloc tokens. Thanks for pointing it out! |
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
Great job, bro, you were amazing. |
|
Just wanted to say this is still very much on my radar -- I need to get #4562 merged first and then this is next on my list to review and get merged. Thanks so much for taking the time to contribution! 💙 |
|
Sorry for the delay! This is next on my todo list and I'm hoping to get this reviewed and merged in the next few days. |
Hey man, how's it going? Do you have any idea when this awesome feature will be merged? |
Sorry for the delay! Hoping to have some time this week to clean this up and get it landed but at first glance I don't think it's ready to land as-is. |
Status
READY
Breaking Changes
NO
Description
Type of Change