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
+5 -5
View File
@@ -110,10 +110,10 @@ async function clientSearch(client, dn, searchOptions) {
const ldapObjects = [];
result.on('searchEntry', entry => ldapObjects.push(entry.object));
result.on('error', error => reject(new BoxError(BoxError.EXTERNAL_ERROR, `search error: ${error.message}`)));
result.on('error', searchError => reject(new BoxError(BoxError.EXTERNAL_ERROR, `search error: ${searchError.message}`)));
result.on('end', function (result) {
if (result.status !== 0) return reject(new BoxError(BoxError.EXTERNAL_ERROR, 'Server returned status ' + result.status));
result.on('end', function (searchResult) {
if (searchResult.status !== 0) return reject(new BoxError(BoxError.EXTERNAL_ERROR, 'Server returned status ' + searchResult.status));
resolve(ldapObjects);
});
@@ -481,7 +481,7 @@ async function syncGroupMembers(config, progressCallback) {
const userIds = [];
for (const memberDn of ldapGroupMembers) {
const [ldapError, result] = await safe(ldapGetByDN(config, memberDn));
const [ldapError, memberResult] = await safe(ldapGetByDN(config, memberDn));
if (ldapError) {
debug(`syncGroupMembers: Group ${ldapGroup.name} failed to get ${memberDn}: %o`, ldapError);
continue;
@@ -489,7 +489,7 @@ async function syncGroupMembers(config, progressCallback) {
debug(`syncGroupMembers: Group ${ldapGroup.name} has member object ${memberDn}`);
const username = result[config.usernameField]?.toLowerCase();
const username = memberResult[config.usernameField]?.toLowerCase();
if (!username) continue;
const [getError, userObject] = await safe(users.getByUsername(username));