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"
}