eslint: add no-shadow

This commit is contained in:
Girish Ramakrishnan
2026-02-18 08:18:37 +01:00
parent 4d3e9dc49b
commit 4ed6fbbd74
40 changed files with 250 additions and 249 deletions
+7 -7
View File
@@ -199,11 +199,11 @@ async function waitForLocations(locations, progressCallback) {
}
}
function makeWildcard(fqdn) {
assert.strictEqual(typeof fqdn, 'string');
function makeWildcard(recordFqdn) {
assert.strictEqual(typeof recordFqdn, 'string');
// if the fqdn is like *.example.com, this function will do nothing
const parts = fqdn.split('.');
const parts = recordFqdn.split('.');
parts[0] = '*';
return parts.join('.');
}
@@ -262,15 +262,15 @@ async function registerLocations(locations, options, progressCallback) {
if (ipv4) {
await registerLocation(location, options, 'A', ipv4);
} else {
const [error, values] = await safe(getDnsRecords(location.subdomain, location.domain, 'A'));
if (!error && values.length) await safe(removeDnsRecords(location.subdomain, location.domain, 'A', values), { debug });
const [aError, aValues] = await safe(getDnsRecords(location.subdomain, location.domain, 'A'));
if (!aError && aValues.length) await safe(removeDnsRecords(location.subdomain, location.domain, 'A', aValues), { debug });
}
if (ipv6) {
await registerLocation(location, options, 'AAAA', ipv6);
} else {
const [error, values] = await safe(getDnsRecords(location.subdomain, location.domain, 'AAAA'));
if (!error && values.length) await safe(removeDnsRecords(location.subdomain, location.domain, 'AAAA', values), { debug });
const [aaaaError, aaaaValues] = await safe(getDnsRecords(location.subdomain, location.domain, 'AAAA'));
if (!aaaaError && aaaaValues.length) await safe(removeDnsRecords(location.subdomain, location.domain, 'AAAA', aaaaValues), { debug });
}
});
}