diff --git a/lib/datasource/docker/index.ts b/lib/datasource/docker/index.ts index 9396fad45482e194e93ce1972ea6ceee19e864f4..3fe4e61f08c1ff4af384cafbcc8a0f715c41bfc1 100644 --- a/lib/datasource/docker/index.ts +++ b/lib/datasource/docker/index.ts @@ -166,10 +166,12 @@ async function getAuthHeaders( logger.debug({ err }); return null; } - if (err.name === 'RequestError' && registry.endsWith('docker.io')) { + // prettier-ignore + if (err.name === 'RequestError' && registry.endsWith('docker.io')) { // lgtm [js/incomplete-url-substring-sanitization] throw new DatasourceError(err); } - if (err.statusCode === 429 && registry.endsWith('docker.io')) { + // prettier-ignore + if (err.statusCode === 429 && registry.endsWith('docker.io')) { // lgtm [js/incomplete-url-substring-sanitization] throw new DatasourceError(err); } if (err.statusCode >= 500 && err.statusCode < 600) { @@ -236,7 +238,8 @@ async function getManifestResponse( ); return null; } - if (err.statusCode === 429 && registry.endsWith('docker.io')) { + // prettier-ignore + if (err.statusCode === 429 && registry.endsWith('docker.io')) { // lgtm [js/incomplete-url-substring-sanitization] throw new DatasourceError(err); } if (err.statusCode >= 500 && err.statusCode < 600) { @@ -381,7 +384,8 @@ async function getTags( ); return null; } - if (err.statusCode === 429 && registry.endsWith('docker.io')) { + // prettier-ignore + if (err.statusCode === 429 && registry.endsWith('docker.io')) { // lgtm [js/incomplete-url-substring-sanitization] logger.warn( { registry, dockerRepository: repository, err }, 'docker registry failure: too many requests' @@ -427,7 +431,8 @@ export function getConfigResponseBeforeRedirectHook(options: any): void { if (options.href && options.headers?.authorization) { const { host } = URL.parse(options.href); - if (host && host.endsWith('blob.core.windows.net')) { + // prettier-ignore + if (host && host.endsWith('blob.core.windows.net')) { // lgtm [js/incomplete-url-substring-sanitization] // docker registry is hosted on Azure blob, redirect url includes authentication. // eslint-disable-next-line no-param-reassign delete options.headers.authorization; diff --git a/lib/datasource/metadata.ts b/lib/datasource/metadata.ts index 947ff33375263aca652eadf3381a7183a09b6603..dbbfb36a02a3d2405edb4b2299aae50b72608fc3 100644 --- a/lib/datasource/metadata.ts +++ b/lib/datasource/metadata.ts @@ -98,12 +98,13 @@ export function addMetaData( }; if ( dep.changelogUrl && - dep.changelogUrl.includes('github.com') && + dep.changelogUrl.includes('github.com') && // lgtm [js/incomplete-url-substring-sanitization] !dep.sourceUrl ) { dep.sourceUrl = dep.changelogUrl; } - if (dep.homepage && dep.homepage.includes('github.com')) { + // prettier-ignore + if (dep.homepage && dep.homepage.includes('github.com')) { // lgtm [js/incomplete-url-substring-sanitization] if (!dep.sourceUrl) { dep.sourceUrl = dep.homepage; } diff --git a/lib/datasource/rubygems/releases.ts b/lib/datasource/rubygems/releases.ts index a7dd6e48abbe81f25f2ff650d6f207090cdf7b0e..b4405774c617bd42696a7400e45d156991265e34 100644 --- a/lib/datasource/rubygems/releases.ts +++ b/lib/datasource/rubygems/releases.ts @@ -14,7 +14,8 @@ export async function getPkgReleases({ for (const registry of registries) { let pkg: ReleaseResult; - if (registry.endsWith('rubygems.org')) { + // prettier-ignore + if (registry.endsWith('rubygems.org')) { // lgtm [js/incomplete-url-substring-sanitization] pkg = await getRubygemsOrgDependency(lookupName); } else { pkg = await getDependency({ dependency: lookupName, registry });