Skip to content
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

New Rule: prefer-global/timers #339

Open
1 task
benmccann opened this issue Sep 17, 2024 · 0 comments
Open
1 task

New Rule: prefer-global/timers #339

benmccann opened this issue Sep 17, 2024 · 0 comments
Labels
accepted enhancement rule:new A new rule for the package

Comments

@benmccann
Copy link

Rule details

Similar to prefer-global/process it should enforce that setImmediate is imported from node:timers. This is needed in order to ensure Deno compatibility (denoland/deno#17248 (comment))

What type of rule is this?

Warns about a potential problem

Example code

https://nodejs.org/api/timers.html#setimmediatecallback-args

Participation

  • I am willing to submit a pull request to implement this rule.

Additional comments

This probably applies to setInterval and setTimeout as well, which is why I proposed prefer-global/timers as a rule name

@scagood scagood added enhancement accepted rule:new A new rule for the package labels Sep 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accepted enhancement rule:new A new rule for the package
Projects
None yet
Development

No branches or pull requests

2 participants