-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
feat(eslint): rule for sync$() #5638
Conversation
👷 Deploy request for qwik-insights pending review.Visit the deploys page to approve it
|
]); | ||
|
||
return context.getScope().through.some(scopeVar => | ||
scopeVar.identifier.name === variable && browserAPIs.has(variable) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Won't this run into trouble when you do { const document = "foo"; sync$(() => document)}
?
Since all these are global and globals aren added to the scope array (see the bundles here), would it instead be possible to just check if it's using only globals?
You could even check if they're browser globals but since it would crash immediately for undefined globals I think that's not necessary.
Hi @Lemon2311 are you still working on this or is it abandoned? |
Hello @gioboa, I haven`t looked into this more since this draft. I saw u assigned @ahmaddonishyar to the issue so I suppose not for now, if he doesn`t fix it I can give it another go then. |
👷 Deploy request for qwik-insights pending review.Visit the deploys page to approve it
|
@Lemon2311do you need an help to finalise this PR? |
@gioboa if you want you can continue from where I left off, if not i can look into it in a few days. |
Unfortunately I don't have the possibility to look at it in the next days, I'm so sorry |
@gioboa send me as an example merge #5455, but since then @mhevery in #5572 refactored the code as all the ruleTesters were just placed inside qwik.unit.ts. I made this changes, implemented the noSyncClosure rule, but I can`t seem to find where he moved the ruleTester implemetations so that I can include my test for the noSyncClosure rule.