[MIGRATION] - Fixed lint errors for empty function

This commit is contained in:
VitoAlbano
2024-08-05 23:06:04 +01:00
parent cf175c67b8
commit 1c339a926b
867 changed files with 2147 additions and 2153 deletions

View File

@@ -85,7 +85,7 @@ export default function main(_args: string[], workingDir: string) {
projVersion: packageJson.version,
projName: packageJson.name
},
{},
{ /* empty */ },
(err: any, mdText: string) => {
if (err) {
console.error(err);

View File

@@ -213,7 +213,7 @@ export default function main(_args: string[], workingDir: string) {
projVersion: packageJson.version,
projName: packageJson.name
},
{},
{ /* empty */ },
(err: any, text: string) => {
if (err) {
console.error(err);

View File

@@ -137,5 +137,5 @@ async function checkDiskSpaceFullEnv() {
*/
function sleep(delay: number) {
const start = new Date().getTime();
while (new Date().getTime() < start + delay) {}
while (new Date().getTime() < start + delay) { /* empty */ }
}

View File

@@ -80,7 +80,7 @@ function buildImage(args: PublishArgs, tag: string) {
if (args.verbose) {
logger.info(`Dry-run Perform docker build -t=${args.dockerRepo}:${tag} ${buildArgs} -f=${args.fileName} ${args.pathProject}`);
}
const response = exec('docker', ['build', `-t=${args.dockerRepo}:${tag}`, ...buildArgs, `-f=${args.fileName}`, args.pathProject], {});
const response = exec('docker', ['build', `-t=${args.dockerRepo}:${tag}`, ...buildArgs, `-f=${args.fileName}`, args.pathProject], { /* empty */ });
logger.info(response);
}
@@ -93,7 +93,7 @@ function buildImage(args: PublishArgs, tag: string) {
*/
function tagImage(args: PublishArgs, imageTag: string, newTag: string) {
logger.info(`Perform docker tag... ${args.dockerRepo}:${imageTag} on ${args.dockerRepo}:${newTag}`);
const response = exec('docker', ['tag', `${args.dockerRepo}:${imageTag}`, `${args.dockerRepo}:${newTag}`], {});
const response = exec('docker', ['tag', `${args.dockerRepo}:${imageTag}`, `${args.dockerRepo}:${newTag}`], { /* empty */ });
logger.info(response);
}
@@ -105,7 +105,7 @@ function tagImage(args: PublishArgs, imageTag: string, newTag: string) {
*/
function pullImage(dockerRepo: string, sourceTag: string) {
logger.info(`Perform docker pull... ${dockerRepo}:${sourceTag}`);
const response = exec('docker', ['pull', `${dockerRepo}:${sourceTag}`], {});
const response = exec('docker', ['pull', `${dockerRepo}:${sourceTag}`], { /* empty */ });
logger.info(response);
}
@@ -120,7 +120,7 @@ function pushImage(args: PublishArgs, tag: string) {
logger.info(`Dry-run Perform docker push... ${args.dockerRepo}:${tag}`);
} else {
logger.info(`Perform docker push... ${args.dockerRepo}:${tag}`);
const response = exec('docker', ['push', `${args.dockerRepo}:${tag}`], {});
const response = exec('docker', ['push', `${args.dockerRepo}:${tag}`], { /* empty */ });
logger.info(response);
}
}
@@ -133,7 +133,7 @@ function pushImage(args: PublishArgs, tag: string) {
*/
function cleanImage(args: PublishArgs, tag: string) {
logger.info(`Perform docker clean on tag:${tag}...`);
const response = exec('docker', ['rmi', `-f`, `${args.dockerRepo}:${tag}`], {});
const response = exec('docker', ['rmi', `-f`, `${args.dockerRepo}:${tag}`], { /* empty */ });
logger.info(response);
}

View File

@@ -57,11 +57,11 @@ export const AAE_MICROSERVICES = ['deployment-service', 'modeling-service', 'dmn
async function healthCheck(nameService: string) {
const url = `${args.host}/${nameService}/actuator/health`;
const pathParams = {};
const queryParams = {};
const headerParams = {};
const formParams = {};
const bodyParam = {};
const pathParams = { /* empty */ };
const queryParams = { /* empty */ };
const headerParams = { /* empty */ };
const formParams = { /* empty */ };
const bodyParam = { /* empty */ };
const contentTypes = ['application/json'];
const accepts = ['application/json'];
@@ -98,11 +98,11 @@ async function healthCheck(nameService: string) {
async function getApplications(): Promise<{ list: { entries: any[] } }> {
const url = `${args.host}/deployment-service/v1/applications`;
const pathParams = {};
const queryParams = {};
const headerParams = {};
const formParams = {};
const bodyParam = {};
const pathParams = { /* empty */ };
const queryParams = { /* empty */ };
const headerParams = { /* empty */ };
const formParams = { /* empty */ };
const bodyParam = { /* empty */ };
const contentTypes = ['application/json'];
const accepts = ['application/json'];
@@ -139,11 +139,11 @@ async function getApplications(): Promise<{ list: { entries: any[] } }> {
function getDescriptors() {
const url = `${args.host}/deployment-service/v1/descriptors`;
const pathParams = {};
const queryParams = {};
const headerParams = {};
const formParams = {};
const bodyParam = {};
const pathParams = { /* empty */ };
const queryParams = { /* empty */ };
const headerParams = { /* empty */ };
const formParams = { /* empty */ };
const bodyParam = { /* empty */ };
const contentTypes = ['application/json'];
const accepts = ['application/json'];
@@ -174,11 +174,11 @@ function getDescriptors() {
function getProjects() {
const url = `${args.host}/modeling-service/v1/projects`;
const pathParams = {};
const pathParams = { /* empty */ };
const queryParams = { maxItems: 1000 };
const headerParams = {};
const formParams = {};
const bodyParam = {};
const headerParams = { /* empty */ };
const formParams = { /* empty */ };
const bodyParam = { /* empty */ };
const contentTypes = ['application/json'];
const accepts = ['application/json'];
@@ -210,11 +210,11 @@ function getProjects() {
function getProjectRelease(projectId: string) {
const url = `${args.host}/modeling-service/v1/projects/${projectId}/releases`;
const pathParams = {};
const queryParams = {};
const headerParams = {};
const formParams = {};
const bodyParam = {};
const pathParams = { /* empty */ };
const queryParams = { /* empty */ };
const headerParams = { /* empty */ };
const formParams = { /* empty */ };
const bodyParam = { /* empty */ };
const contentTypes = ['application/json'];
const accepts = ['application/json'];
@@ -245,11 +245,11 @@ function getProjectRelease(projectId: string) {
async function releaseProject(projectId: string) {
const url = `${args.host}/modeling-service/v1/projects/${projectId}/releases`;
const pathParams = {};
const queryParams = {};
const headerParams = {};
const formParams = {};
const bodyParam = {};
const pathParams = { /* empty */ };
const queryParams = { /* empty */ };
const headerParams = { /* empty */ };
const formParams = { /* empty */ };
const bodyParam = { /* empty */ };
const contentTypes = ['application/json'];
const accepts = ['application/json'];
@@ -281,11 +281,11 @@ async function releaseProject(projectId: string) {
function deleteProject(projectId: string) {
const url = `${args.host}/modeling-service/v1/projects/${projectId}`;
const pathParams = {};
const queryParams = {};
const headerParams = {};
const formParams = {};
const bodyParam = {};
const pathParams = { /* empty */ };
const queryParams = { /* empty */ };
const headerParams = { /* empty */ };
const formParams = { /* empty */ };
const bodyParam = { /* empty */ };
const contentTypes = ['application/json'];
const accepts = ['application/json'];
@@ -320,11 +320,11 @@ async function importAndReleaseProject(absoluteFilePath: string) {
const project = await alfrescoJsApiModeler.oauth2Auth.callCustomApi(
`${args.host}/modeling-service/v1/projects/import`,
'POST',
{},
{},
{},
{ /* empty */ },
{ /* empty */ },
{ /* empty */ },
{ file: fileContent },
{},
{ /* empty */ },
['multipart/form-data'],
['application/json']
);
@@ -334,11 +334,11 @@ async function importAndReleaseProject(absoluteFilePath: string) {
return await alfrescoJsApiModeler.oauth2Auth.callCustomApi(
`${args.host}/modeling-service/v1/projects/${project.entry.id}/releases`,
'POST',
{},
{},
{},
{},
{},
{ /* empty */ },
{ /* empty */ },
{ /* empty */ },
{ /* empty */ },
{ /* empty */ },
['application/json'],
['application/json']
);
@@ -358,11 +358,11 @@ async function importAndReleaseProject(absoluteFilePath: string) {
function deleteDescriptor(name: string) {
const url = `${args.host}/deployment-service/v1/descriptors/${name}`;
const pathParams = {};
const queryParams = {};
const headerParams = {};
const formParams = {};
const bodyParam = {};
const pathParams = { /* empty */ };
const queryParams = { /* empty */ };
const headerParams = { /* empty */ };
const formParams = { /* empty */ };
const bodyParam = { /* empty */ };
const contentTypes = ['application/json'];
const accepts = ['application/json'];
@@ -394,10 +394,10 @@ function deleteDescriptor(name: string) {
function deploy(model: any) {
const url = `${args.host}/deployment-service/v1/applications`;
const pathParams = {};
const queryParams = {};
const headerParams = {};
const formParams = {};
const pathParams = { /* empty */ };
const queryParams = { /* empty */ };
const headerParams = { /* empty */ };
const formParams = { /* empty */ };
const bodyParam = model;
const contentTypes = ['application/json'];
const accepts = ['application/json'];

View File

@@ -246,5 +246,5 @@ async function checkEnv(opts: InitAcsEnvArgs) {
*/
function sleep(delay: number) {
const start = new Date().getTime();
while (new Date().getTime() < start + delay) {}
while (new Date().getTime() < start + delay) { /* empty */ }
}

View File

@@ -277,11 +277,11 @@ async function updateLicense(opts: InitApsEnvArgs) {
await alfrescoJsApi.oauth2Auth.callCustomApi(
`${opts.host}/activiti-app/api/enterprise/license`,
'POST',
{},
{},
{},
{ /* empty */ },
{ /* empty */ },
{ /* empty */ },
{ file: fileContent },
{},
{ /* empty */ },
['multipart/form-data'],
['application/json']
);
@@ -364,11 +364,11 @@ async function hasLicense(opts: InitApsEnvArgs): Promise<boolean> {
const license = await alfrescoJsApi.oauth2Auth.callCustomApi(
`${opts.host}/activiti-app/api/enterprise/license`,
'GET',
{},
{},
{},
{},
{},
{ /* empty */ },
{ /* empty */ },
{ /* empty */ },
{ /* empty */ },
{ /* empty */ },
['application/json'],
['application/json']
);
@@ -394,11 +394,11 @@ async function getDefaultApsUsersFromRealm(opts: InitApsEnvArgs) {
const users: any[] = await alfrescoJsApi.oauth2Auth.callCustomApi(
`${opts.host}/auth/admin/realms/alfresco/users`,
'GET',
{},
{ /* empty */ },
{ max: 1000 },
{},
{},
{},
{ /* empty */ },
{ /* empty */ },
{ /* empty */ },
['application/json'],
['application/json']
);
@@ -424,11 +424,11 @@ async function isContentRepoPresent(opts: InitApsEnvArgs, tenantId: number, cont
const contentRepos = await alfrescoJsApi.oauth2Auth.callCustomApi(
`${opts.host}/activiti-app/app/rest/integration/alfresco?tenantId=${tenantId}`,
'GET',
{},
{},
{},
{},
{},
{ /* empty */ },
{ /* empty */ },
{ /* empty */ },
{ /* empty */ },
{ /* empty */ },
['application/json'],
['application/json']
);
@@ -464,10 +464,10 @@ async function addContentRepoWithBasic(opts: InitApsEnvArgs, tenantId: number, n
const content = await alfrescoJsApi.oauth2Auth.callCustomApi(
`${opts.host}/activiti-app/api/enterprise/integration/alfresco`,
'POST',
{},
{},
{},
{},
{ /* empty */ },
{ /* empty */ },
{ /* empty */ },
{ /* empty */ },
body,
['application/json'],
['application/json']
@@ -491,11 +491,11 @@ async function authorizeUserToContentRepo(opts: InitApsEnvArgs, user: any) {
const content = await alfrescoJsApi.oauth2Auth.callCustomApi(
`${opts.host}/activiti-app/app/rest/integration/alfresco`,
'GET',
{},
{},
{},
{},
{},
{ /* empty */ },
{ /* empty */ },
{ /* empty */ },
{ /* empty */ },
{ /* empty */ },
['application/json'],
['application/json']
);
@@ -527,10 +527,10 @@ async function authorizeUserToContentWithBasic(opts: InitApsEnvArgs, username: s
const content = await alfrescoJsApi.oauth2Auth.callCustomApi(
`${opts.host}/activiti-app/api/enterprise/integration/alfresco/${contentId}/account`,
'POST',
{},
{},
{},
{},
{ /* empty */ },
{ /* empty */ },
{ /* empty */ },
{ /* empty */ },
body,
['application/json'],
['application/json']
@@ -569,5 +569,5 @@ async function downloadLicenseFile(apsLicensePath: string) {
*/
function sleep(delay: number) {
const start = new Date().getTime();
while (new Date().getTime() < start + delay) {}
while (new Date().getTime() < start + delay) { /* empty */ }
}

View File

@@ -183,7 +183,7 @@ export default function main(_args: string[], workingDir: string) {
projVersion: packageJson.version,
projName: packageJson.name
},
{},
{ /* empty */ },
(ejsError: any, mdText: string) => {
if (ejsError) {
console.error(ejsError);

View File

@@ -25,7 +25,7 @@ export class CheckEnv {
_alfrescoJsApi: AlfrescoApi;
counter = 0;
constructor(private host: string, private username: string, private password: string, private clientId: string = 'alfresco') {}
constructor(private host: string, private username: string, private password: string, private clientId: string = 'alfresco') { /* empty */ }
async checkEnv() {
try {
@@ -71,6 +71,6 @@ export class CheckEnv {
sleep(delay: number) {
const start = new Date().getTime();
while (new Date().getTime() < start + delay) {}
while (new Date().getTime() < start + delay) { /* empty */ }
}
}

View File

@@ -22,7 +22,7 @@ import { PluginInterface } from './plugin-model';
import { AlfrescoApi, GsSitesApi } from '@alfresco/js-api';
export class GovernanceHealth {
constructor(private pluginInfo: PluginInterface, private alfrescoJsApi: AlfrescoApi) {}
constructor(private pluginInfo: PluginInterface, private alfrescoJsApi: AlfrescoApi) { /* empty */ }
async isRecordManagementAvailable(): Promise<boolean> {
try {

View File

@@ -20,18 +20,18 @@ import { logger } from '../logger';
import { AlfrescoApi } from '@alfresco/js-api';
export class PluginConfiguration {
constructor(private plugInInfo: PluginInterface, private alfrescoJsApi: AlfrescoApi) {}
constructor(private plugInInfo: PluginInterface, private alfrescoJsApi: AlfrescoApi) { /* empty */ }
async getAppConfig(url: string) {
return this.callCustomApi(url);
}
async callCustomApi(url: string) {
const pathParams = {};
const headerParams = {};
const formParams = {};
const bodyParam = {};
const queryParams = {};
const pathParams = { /* empty */ };
const headerParams = { /* empty */ };
const formParams = { /* empty */ };
const bodyParam = { /* empty */ };
const queryParams = { /* empty */ };
const contentTypes = ['application/json'];
const accepts = ['application/json'];
@@ -51,7 +51,7 @@ export class PluginConfiguration {
return response;
} catch (error) {
logger.error(`${this.plugInInfo.host} is not reachable error: `, error);
return {};
return { /* empty */ };
}
}
}

View File

@@ -216,7 +216,7 @@ export const ACTIVITI_CLOUD_APPS: any = {
{ role: 'ACTIVITI_ADMIN', groups: [], users: ['superadminuser', 'processadminuser'] },
{ role: 'ACTIVITI_USER', groups: ['hr', 'sales', 'testgroup'], users: ['hruser'] }
],
infrastructure: { connectors: { restconnector: {} }, bridges: {} },
infrastructure: { connectors: { restconnector: { /* empty */ } }, bridges: { /* empty */ } },
enableLocalDevelopment: true,
variables: {
'process-runtime-service': {