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

View File

@@ -124,9 +124,9 @@ async function pullImage(imageRef) {
reject(new BoxError(layerError.message.includes('no space') ? BoxError.FS_ERROR : BoxError.DOCKER_ERROR, layerError.message));
});
stream.on('error', function (error) { // this is only hit for stream error and not for some download error
debug(`error pulling image ${imageRef}: %o`, error);
reject(new BoxError(BoxError.DOCKER_ERROR, error.message));
stream.on('error', function (streamError) { // this is only hit for stream error and not for some download error
debug(`error pulling image ${imageRef}: %o`, streamError);
reject(new BoxError(BoxError.DOCKER_ERROR, streamError.message));
});
});
}
@@ -166,9 +166,9 @@ async function buildImage(dockerImage, sourceArchiveFilePath) {
resolve();
});
stream.on('error', (error) => {
debug(`buildImage: error building image ${dockerImage}: %o`, error);
reject(new BoxError(BoxError.DOCKER_ERROR, error.message));
stream.on('error', (streamError) => {
debug(`buildImage: error building image ${dockerImage}: %o`, streamError);
reject(new BoxError(BoxError.DOCKER_ERROR, streamError.message));
});
});
}
@@ -255,8 +255,8 @@ async function getAddressesForPort53() {
const addresses = [];
for (const phy of physicalDevices) {
const [error, output] = await safe(shell.spawn('ip', ['-f', 'inet', '-j', 'addr', 'show', 'dev', phy.name, 'scope', 'global'], { encoding: 'utf8' }));
if (error) continue;
const [ipError, output] = await safe(shell.spawn('ip', ['-f', 'inet', '-j', 'addr', 'show', 'dev', phy.name, 'scope', 'global'], { encoding: 'utf8' }));
if (ipError) continue;
const inet = safe.JSON.parse(output) || [];
for (const r of inet) {
const address = safe.query(r, 'addr_info[0].local');
@@ -584,7 +584,7 @@ async function createSubcontainer(app, name, cmd, options) {
}
const appEnv = [];
Object.keys(app.env).forEach(function (name) { appEnv.push(`${name}=${app.env[name]}`); });
Object.keys(app.env).forEach(function (envName) { appEnv.push(`${envName}=${app.env[envName]}`); });
let memoryLimit = apps.getMemoryLimit(app);