prefer-global/url
UnreleasedConfiguration
rslint.config.ts
Enforces consistent use of the global URL or the URL export from Node.js's
url module.
Options
"always"(default): use the globalURL."never": useURLfromurlornode:url.
Configure Node.js globals when enabling the rule:
Rule details
With "always", these module references are incorrect:
Use the global instead:
With "never", the global example is incorrect. Import the constructor:
The rule follows static imports, re-exports, destructuring and aliases.
It respects local bindings and configured globals. It does not check
URLSearchParams or provide automatic fixes or suggestions.