prefer-promises/dns
UnreleasedConfiguration
rslint.config.ts
Prefer the promise API of Node.js's dns module.
Rule Details
This rule reports calls to the callback DNS API and construction of dns.Resolver.
It follows CommonJS imports, ES module imports, process.getBuiltinModule, and
local aliases, including the node:dns module name.
Examples of incorrect code for this rule:
Examples of correct code for this rule:
The rule also reports getServers() and setServers() on the callback module,
matching upstream behavior. Reading a method without calling it is allowed.
Options
This rule has no options and does not provide automatic fixes or suggestions.