prefer-https-urls
July 9, 2026 ยท View on GitHub
๐ Prefer https:// URLs in metadata fields.
๐ผ This rule is enabled in the โ
recommended config.
๐ง This rule is automatically fixable by the --fix CLI option.
Metadata URLs should use https://. An http:// URL is insecure and increasingly unsupported; npm's own documentation uses https:// throughout.
This rule flags http:// URLs in homepage, bugs, repository, and funding (string, url, or array forms) and autofixes them to https://.
Examples
// โ
{
"homepage": "http://example.com"
}
// โ
{
"homepage": "https://example.com"
}