Open
Description
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