[ACS-11306] Fixed eslint issues related with unused error and optional chaining

This commit is contained in:
Aleksander Sklorz
2026-03-25 11:02:50 +01:00
parent 921f4db55e
commit b014dfb356
13 changed files with 14 additions and 14 deletions

View File

@@ -116,7 +116,7 @@ test.describe('Mark items as favorites', () => {
await favoritesApi.addFavoritesByIds('file', [fileFavUIId, fileFav1Id, fileFav2Id, fileFav3Id, fileFav4Id]);
await favoritesApi.addFavoriteById('folder', folderId);
await favoritesApi.removeFavoritesByIds(username, [fileNotFav1Id, fileNotFav2Id, fileNotFav3Id, fileNotFav4Id]);
} catch (error) {}
} catch {}
});
test.beforeEach(async ({ personalFiles }) => {

View File

@@ -281,7 +281,7 @@ export class ManageRulesSmartComponent implements OnInit {
try {
await this.folderRuleSetsService.deleteRuleSetLink(this.nodeId, linkedRuleSet.id);
this.folderRuleSetsService.refreshMainRuleSet();
} catch (error) {
} catch {
this.notificationService.showError('ACA_FOLDER_RULES.ERRORS.DELETE_RULE_SET_LINK_FAILED');
}
}

View File

@@ -275,7 +275,7 @@ export class FilesComponent extends PageComponent implements OnInit, OnDestroy {
}
// check the child nodes to show dropped folder
if (event && event.file.options.parentId === this.getParentNodeId()) {
if (event?.file.options.parentId === this.getParentNodeId()) {
this.displayFolderParent(0, event.file.options.path);
return;
}

View File

@@ -122,7 +122,7 @@ export class SearchLibrariesResultsComponent extends PageComponent implements On
if (statusCode === 400) {
this.appHookService.library400Error.next();
}
} catch (e) {}
} catch {}
})
);

View File

@@ -488,7 +488,7 @@ export class ContentManagementService {
} else if (statusCode === 403) {
i18nMessageString = 'APP.MESSAGES.ERRORS.PERMISSION';
}
} catch (err) {
} catch {
/* Do nothing, keep the original message */
}

View File

@@ -75,7 +75,7 @@ describe('NodeActionsService', () => {
new Promise((resolve, reject) => {
if (isForbidden) {
reject(permissionError);
} else if (nameExistingOnDestination && options && options.name === nameExistingOnDestination) {
} else if (nameExistingOnDestination && options?.name === nameExistingOnDestination) {
reject(conflictError);
} else {
resolve('');

View File

@@ -351,7 +351,7 @@ export class NodeActionsService {
error: { statusCode }
} = JSON.parse(err.message);
errStatusCode = statusCode;
} catch (e) {
} catch {
//
}
@@ -477,7 +477,7 @@ export class NodeActionsService {
error: { statusCode }
} = JSON.parse(err.message);
errStatusCode = statusCode;
} catch (e) {
} catch {
//
}

View File

@@ -157,7 +157,7 @@ export class TemplateEffects {
try {
statusCode = JSON.parse(error.message).error.statusCode;
} catch (e) {
} catch {
statusCode = null;
}

View File

@@ -155,7 +155,7 @@ export class PreviewComponent extends PageComponent implements OnInit {
}
await this.router.navigate([this.previewLocation, id]);
} catch (err) {
if (!err || err.status !== 401) {
if (err?.status !== 401) {
await this.router.navigate([this.previewLocation, id]);
}
}

View File

@@ -90,7 +90,7 @@ export class FavoritesPageApi {
}
};
return await Utils.retryCall(favorite);
} catch (error) {}
} catch {}
return isFavorite;
}

View File

@@ -152,7 +152,7 @@ export class FileActionsApi {
const apiCall = async () => {
try {
return (await this.queryNodesNames(searchTerm)).list.pagination.totalItems;
} catch (error) {
} catch {
return 0;
}
};

View File

@@ -45,7 +45,7 @@ export class SharedLinksApi {
expiresAt: expireDate
};
return this.apiService.share.createSharedLink(data);
} catch (error) {
} catch {
return null;
}
}

View File

@@ -31,7 +31,7 @@ type LaunchOptions = Parameters<typeof chromium.launch>[0];
try {
loadEnvFile();
} catch (error) {
} catch {
// .env file is optional, continue without it
}