Skip to content

New Rule: prefer-global/timers #339

Open
@benmccann

Description

@benmccann

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions