diff --git a/ApplicationScanner/utils/applicationService.ts b/ApplicationScanner/utils/applicationService.ts index 7dd9d848d7..2645e333ac 100644 --- a/ApplicationScanner/utils/applicationService.ts +++ b/ApplicationScanner/utils/applicationService.ts @@ -78,7 +78,7 @@ export default { return promise; }, - sshScanApplicationSecurity: async security => { + sshScanApplicationSecurity: async (security: $TSFixMe) => { let securityDir: $TSFixMe = 'application_security_dir'; securityDir = await createDir(securityDir); @@ -120,7 +120,7 @@ export default { throw error; }); - audit.stdout.on('data', data => { + audit.stdout.on('data', (data: $TSFixMe) => { const strData: $TSFixMe = data.toString(); auditOutput += strData; }); @@ -216,7 +216,7 @@ export default { }); }, - scanApplicationSecurity: async security => { + scanApplicationSecurity: async (security: $TSFixMe) => { let securityDir: $TSFixMe = 'application_security_dir'; securityDir = await createDir(securityDir); @@ -262,7 +262,7 @@ export default { throw error; }); - audit.stdout.on('data', data => { + audit.stdout.on('data', (data: $TSFixMe) => { const strData: $TSFixMe = data.toString(); auditOutput += strData; }); diff --git a/Backend/api/Component.ts b/Backend/api/Component.ts index a976d71a52..b05f64d02a 100755 --- a/Backend/api/Component.ts +++ b/Backend/api/Component.ts @@ -345,7 +345,7 @@ router.post( if (monitorStatus && monitorStatus.length) { const uptimePercents: $TSFixMe = await Promise.all( - monitorStatus.map(async probe => { + monitorStatus.map(async (probe: $TSFixMe) => { const { uptimePercent }: $TSFixMe = await MonitorService.calculateTime( probe.statuses, @@ -746,7 +746,7 @@ router.get( { path: 'resourceCategory', select: 'name' }, ]; await Promise.all( - allComponents.map(async component => { + allComponents.map(async (component: $TSFixMe) => { const componentErrorTrackers: $TSFixMe = await ErrorTrackerService.findBy({ query: { diff --git a/Backend/api/ErrorTracker.ts b/Backend/api/ErrorTracker.ts index 18f3873cd2..a36bbdbdf4 100644 --- a/Backend/api/ErrorTracker.ts +++ b/Backend/api/ErrorTracker.ts @@ -983,7 +983,7 @@ router.post( // get the list of team members await Promise.all( - teamMemberId.map(async teamMemberUserId => { + teamMemberId.map(async (teamMemberUserId: $TSFixMe) => { // check if in organization let member: $TSFixMe; try { @@ -1133,7 +1133,7 @@ router.post( // get the list of team members await Promise.all( - teamMemberId.map(async teamMemberUserId => { + teamMemberId.map(async (teamMemberUserId: $TSFixMe) => { // check if in organization let member: $TSFixMe; try { diff --git a/Backend/test/monitor.test.ts b/Backend/test/monitor.test.ts index f8a28bb174..da8240d3de 100755 --- a/Backend/test/monitor.test.ts +++ b/Backend/test/monitor.test.ts @@ -1317,7 +1317,7 @@ describe('Monitor API - Tests Project Seats With SubProjects', function (): void await MonitorService.hardDeleteBy({ projectId }); await Promise.all( - monitorDataArray.map(async monitor => { + monitorDataArray.map(async (monitor: $TSFixMe) => { await request .post(`/monitor/${projectId}`) .set('Authorization', authorization) diff --git a/Backend/test/resourceCategory.test.ts b/Backend/test/resourceCategory.test.ts index b67f692f46..24ccff7f3e 100644 --- a/Backend/test/resourceCategory.test.ts +++ b/Backend/test/resourceCategory.test.ts @@ -682,7 +682,7 @@ describe('Resource Category API - Check pagination for 12 resource categories', const authorization: string = `Basic ${token}`; const createdMonitorCategories: $TSFixMe = monitorCategories.map( - async resourceCategoryName => { + async (resourceCategoryName: $TSFixMe) => { const sentRequests: $TSFixMe = await request .post(`/resourceCategory/${projectId}`) diff --git a/Backend/test/scheduledEvent.test.ts b/Backend/test/scheduledEvent.test.ts index 7492b1e1fc..8e9327e39c 100644 --- a/Backend/test/scheduledEvent.test.ts +++ b/Backend/test/scheduledEvent.test.ts @@ -137,7 +137,7 @@ describe('Scheduled event API', function (): void { const createdScheduledEvents: $TSFixMe = scheduledEvents.map( - async scheduledEvent => { + async (scheduledEvent: $TSFixMe) => { const sentRequests: $TSFixMe = await request .post( diff --git a/Backend/test/scheduledEventNote.test.ts b/Backend/test/scheduledEventNote.test.ts index ba8464a81c..9dad87173d 100644 --- a/Backend/test/scheduledEventNote.test.ts +++ b/Backend/test/scheduledEventNote.test.ts @@ -172,7 +172,7 @@ describe('Scheduled Event Note', function (): void { const createdScheduledEventNotes: $TSFixMe = scheduledEventNotes.map( - async scheduledEventNote => { + async (scheduledEventNote: $TSFixMe) => { const sentRequests: $TSFixMe = await request .post( diff --git a/Backend/workers/subscription.ts b/Backend/workers/subscription.ts index 10812f433d..751e3a3741 100644 --- a/Backend/workers/subscription.ts +++ b/Backend/workers/subscription.ts @@ -9,7 +9,7 @@ import AlertService from '../Services/alertService'; import { IS_SAAS_SERVICE } from '../config/server'; const handleFetchingUnpaidSubscriptions: Function = async ( - startAfter + startAfter: $TSFixMe ): void => { if (startAfter) { return await stripe.subscriptions.list({ @@ -36,7 +36,7 @@ const _this: $TSFixMe = { * THE SERVICE TO ALERT PROJECT OWNERS BY MAIL WILL ALSO RUN IN THE BACKGROUND */ - handleUnpaidSubscription: async startAfter => { + handleUnpaidSubscription: async (startAfter: $TSFixMe) => { if (IS_SAAS_SERVICE) { const subscriptions: $TSFixMe = await handleFetchingUnpaidSubscriptions(startAfter); diff --git a/CommonServer/Services/EmailTemplateService.ts b/CommonServer/Services/EmailTemplateService.ts index d4aa163238..d955f08293 100755 --- a/CommonServer/Services/EmailTemplateService.ts +++ b/CommonServer/Services/EmailTemplateService.ts @@ -132,7 +132,7 @@ export default class Service { const select: string = 'projectId subject body emailType allowedVariables'; const templates: $TSFixMe = await Promise.all( - defaultTemplate.map(async template => { + defaultTemplate.map(async (template: $TSFixMe) => { const emailTemplate: $TSFixMe = await this.findOneBy({ query: { projectId: projectId, diff --git a/CommonServer/Services/MonitorService.ts b/CommonServer/Services/MonitorService.ts index 3bf13caa08..c1e3dd82a6 100755 --- a/CommonServer/Services/MonitorService.ts +++ b/CommonServer/Services/MonitorService.ts @@ -862,7 +862,7 @@ export default class Service { const selectSchedule: $TSFixMe = '_id name slug projectId createdById monitorsIds escalationIds createdAt isDefault userIds'; const monitorsWithSchedules: $TSFixMe = await Promise.all( - monitorsWithStatus.map(async monitor => { + monitorsWithStatus.map(async (monitor: $TSFixMe) => { const monitorSchedules: $TSFixMe = await ScheduleService.findBy({ query: { monitorIds: monitor._id }, @@ -982,7 +982,7 @@ export default class Service { const selectSchedule: $TSFixMe = '_id name slug projectId createdById monitorsIds escalationIds createdAt isDefault userIds'; const monitorsWithSchedules: $TSFixMe = await Promise.all( - monitorsWithStatus.map(async monitor => { + monitorsWithStatus.map(async (monitor: $TSFixMe) => { const monitorSchedules: $TSFixMe = await ScheduleService.findBy( { query: { monitorIds: monitor._id }, diff --git a/CommonServer/Services/ProbeService.ts b/CommonServer/Services/ProbeService.ts index 62f2a14ce3..936cbd8a2f 100755 --- a/CommonServer/Services/ProbeService.ts +++ b/CommonServer/Services/ProbeService.ts @@ -618,7 +618,7 @@ public async incidentResolveOrAcknowledge(data, allCriteria): void { // } } await Promise.all( - incidentsV1.map(async incident => { + incidentsV1.map(async (incident: $TSFixMe) => { if ( incident.probes && incident.probes.length > 0 && @@ -663,7 +663,7 @@ public async incidentResolveOrAcknowledge(data, allCriteria): void { }) ); - await forEach(incidentsV2, async incident => { + await forEach(incidentsV2, async (incident: $TSFixMe) => { const trueArray: $TSFixMe = []; const falseArray: $TSFixMe = []; @@ -793,7 +793,7 @@ public async updateProbeStatus(probeId: $TSFixMe): void { let matchedCriterion: $TSFixMe; if (con && con.length) { - eventOccurred = some(con, condition => { + eventOccurred = some(con, (condition: $TSFixMe) => { let stat: $TSFixMe = true; if ( condition && @@ -863,7 +863,7 @@ public async updateProbeStatus(probeId: $TSFixMe): void { let eventOccurred: $TSFixMe = false; let matchedCriterion: $TSFixMe; if (conditions && conditions.length) { - eventOccurred = some(conditions, condition => { + eventOccurred = some(conditions, (condition: $TSFixMe) => { let response: $TSFixMe = false; let respAnd: $TSFixMe = false, respOr = false, diff --git a/CommonServer/Services/ProjectService.ts b/CommonServer/Services/ProjectService.ts index 0d169e7595..503e78ffa5 100755 --- a/CommonServer/Services/ProjectService.ts +++ b/CommonServer/Services/ProjectService.ts @@ -229,13 +229,13 @@ public async deleteBy(query, userId, cancelSub = true): void { ]); await Promise.all( - monitors.map(async monitor => { + monitors.map(async (monitor: $TSFixMe) => { await MonitorService.deleteBy({ _id: monitor._id }, userId); }) ); await Promise.all( - schedules.map(async schedule => { + schedules.map(async (schedule: $TSFixMe) => { await ScheduleService.deleteBy({ _id: schedule._id }); }) ); @@ -247,7 +247,7 @@ public async deleteBy(query, userId, cancelSub = true): void { } await Promise.all( - statusPages.map(async statusPage => { + statusPages.map(async (statusPage: $TSFixMe) => { await StatusPageService.deleteBy({ _id: statusPage._id, }); @@ -255,7 +255,7 @@ public async deleteBy(query, userId, cancelSub = true): void { ); await Promise.all( - components.map(async component => { + components.map(async (component: $TSFixMe) => { await componentService.deleteBy( { _id: component._id }, userId @@ -563,7 +563,7 @@ public async exitProject(projectId, userId, deletedById, saveUserSeat): void { query: { _id: userId }, select: 'email', }); - domains.domains.forEach(async domain => { + domains.domains.forEach(async (domain: $TSFixMe) => { if (user_member.email.indexOf(domain) > -1) { count++; } @@ -629,7 +629,7 @@ public async getAllProjects(skip, limit): void { }); projects = await Promise.all( - projects.map(async project => { + projects.map(async (project: $TSFixMe) => { // get both sub-project users and project users let users: $TSFixMe = await TeamService.getTeamMembersBy({ parentProjectId: project._id, @@ -701,7 +701,7 @@ public async getUserProjects(userId, skip, limit): void { // add project monitors const projects: $TSFixMe = await Promise.all( - allProjects.map(async project => { + allProjects.map(async (project: $TSFixMe) => { // get both sub-project users and project users let users: $TSFixMe = []; if (project.parentProjectId) { @@ -715,7 +715,7 @@ public async getUserProjects(userId, skip, limit): void { const select: $TSFixMe = 'createdAt name email tempEmail isVerified sso jwtRefreshToken companyName companyRole companySize referral companyPhoneNumber onCallAlert profilePic twoFactorAuthEnabled stripeCustomerId timeZone lastActive disabled paymentFailedDate role isBlocked adminNotes deleted deletedById alertPhoneNumber tempAlertPhoneNumber tutorial identification source isAdminMode'; users = await Promise.all( - project.users.map(async user => { + project.users.map(async (user: $TSFixMe) => { const foundUser: $TSFixMe = await UserService.findOneBy({ query: { _id: user.userId, @@ -756,7 +756,7 @@ public async restoreBy(query: $TSFixMe): void { ); let subscription: $TSFixMe; await Promise.all( - projectOwners.map(async projectOwner => { + projectOwners.map(async (projectOwner: $TSFixMe) => { const owner: $TSFixMe = await UserService.findOneBy({ query: { _id: projectOwner.userId }, select: 'stripeCustomerId', @@ -830,7 +830,7 @@ public async searchProjects(query, skip, limit): void { let projects: $TSFixMe = await this.findBy({ query, limit, skip, select }); projects = await Promise.all( - projects.map(async project => { + projects.map(async (project: $TSFixMe) => { // get both sub-project users and project users let users: $TSFixMe = await TeamService.getTeamMembersBy({ parentProjectId: project._id, diff --git a/CommonServer/Services/StatusPageService.ts b/CommonServer/Services/StatusPageService.ts index 78f7646d69..af8b7fb1af 100755 --- a/CommonServer/Services/StatusPageService.ts +++ b/CommonServer/Services/StatusPageService.ts @@ -591,7 +591,7 @@ public async deleteBy(query: Query, userId: ObjectID): void { populate: populateSubscriber, }); await Promise.all( - subscribers.map(async subscriber => { + subscribers.map(async (subscriber: $TSFixMe) => { await SubscriberService.deleteBy( { _id: subscriber._id }, userId diff --git a/CommonServer/Services/SubscriberService.ts b/CommonServer/Services/SubscriberService.ts index 296a324c90..0fd8c2a78c 100755 --- a/CommonServer/Services/SubscriberService.ts +++ b/CommonServer/Services/SubscriberService.ts @@ -379,7 +379,7 @@ export default class Service { let subscriber: $TSFixMe = await this.findBy({ query, select: '_id' }); if (subscriber && subscriber.length > 1) { const subscribers: $TSFixMe = await Promise.all( - subscriber.map(async subscriber => { + subscriber.map(async (subscriber: $TSFixMe) => { const subscriberId: $TSFixMe = subscriber._id; subscriber = await this.updateOneBy( { _id: subscriberId, deleted: true }, diff --git a/CommonServer/Utils/Process.ts b/CommonServer/Utils/Process.ts index 743ec161ab..c8b517d658 100644 --- a/CommonServer/Utils/Process.ts +++ b/CommonServer/Utils/Process.ts @@ -4,12 +4,12 @@ process.on('exit', () => { logger.info('Server Shutting Shutdown'); }); -process.on('unhandledRejection', err => { +process.on('unhandledRejection', (err: $TSFixMe) => { logger.error('Unhandled rejection in server process occurred'); logger.error(err); }); -process.on('uncaughtException', err => { +process.on('uncaughtException', (err: $TSFixMe) => { logger.error('Uncaught exception in server process occurred'); logger.error(err); }); diff --git a/ContainerScanner/utils/containerService.ts b/ContainerScanner/utils/containerService.ts index 5a0e713bfa..c72933ba08 100644 --- a/ContainerScanner/utils/containerService.ts +++ b/ContainerScanner/utils/containerService.ts @@ -62,7 +62,7 @@ export default { return promise; }, - scanContainerSecurity: async security => { + scanContainerSecurity: async (security: $TSFixMe) => { const { imagePath, imageTags }: $TSFixMe = security; const testPath: $TSFixMe = imageTags ? `${imagePath}:${imageTags}` diff --git a/DataIngestor/services/probeService.ts b/DataIngestor/services/probeService.ts index 508b172754..367812ecfd 100755 --- a/DataIngestor/services/probeService.ts +++ b/DataIngestor/services/probeService.ts @@ -618,7 +618,7 @@ export default { } } - await forEach(incidentsV2, async incident => { + await forEach(incidentsV2, async (incident: $TSFixMe) => { const trueArray: $TSFixMe = []; const falseArray: $TSFixMe = []; @@ -842,7 +842,7 @@ export default { let eventOccurred: $TSFixMe = false; let matchedCriterion: $TSFixMe; if (conditions && conditions.length) { - eventOccurred = some(conditions, condition => { + eventOccurred = some(conditions, (condition: $TSFixMe) => { let response: $TSFixMe = false; let respAnd: $TSFixMe = false, respOr = false, diff --git a/JavaScriptSDK/src/listener.ts b/JavaScriptSDK/src/listener.ts index c965b9e9ee..17f5ec2194 100644 --- a/JavaScriptSDK/src/listener.ts +++ b/JavaScriptSDK/src/listener.ts @@ -86,7 +86,7 @@ public clearTimeline(eventId: $TSFixMe): void { private _setUpDomListener(): void { Object.keys(window).forEach((key: $TSFixMe) => { if (/^on(keypress|click)/.test(key)) { - window.addEventListener(key.slice(2), event => { + window.addEventListener(key.slice(2), (event: $TSFixMe) => { if (!this.keypressTimeout) { // confirm the event is new if (this.lastEvent === event) { diff --git a/JavaScriptSDK/src/tracker.ts b/JavaScriptSDK/src/tracker.ts index 8041b8e73c..c18268864d 100644 --- a/JavaScriptSDK/src/tracker.ts +++ b/JavaScriptSDK/src/tracker.ts @@ -184,14 +184,14 @@ class ErrorTracker { } private _setUpNodeErrorListener(): void { process - .on('uncaughtException', err => { + .on('uncaughtException', (err: $TSFixMe) => { // display for the user //eslint-disable-next-line no-console console.info(`${err}`); // any uncaught error this._manageErrorNode(err); }) - .on('unhandledRejection', err => { + .on('unhandledRejection', (err: $TSFixMe) => { // display this for the user //eslint-disable-next-line no-console console.info(`UnhandledPromiseRejectionWarning: ${err.stack}`); diff --git a/LighthouseRunner/workers/urlMonitors.ts b/LighthouseRunner/workers/urlMonitors.ts index 3758c7e0eb..8833036b3e 100755 --- a/LighthouseRunner/workers/urlMonitors.ts +++ b/LighthouseRunner/workers/urlMonitors.ts @@ -57,7 +57,7 @@ const lighthouseFetch: Function = (url: URL): void => { }, 300000); lighthouseWorker.send(url); - lighthouseWorker.on('message', async result => { + lighthouseWorker.on('message', async (result: $TSFixMe) => { await processLighthouseScan(result); }); diff --git a/Probe/workers/kubernetesMonitors.ts b/Probe/workers/kubernetesMonitors.ts index 70f1b167f9..bcff5f3d53 100644 --- a/Probe/workers/kubernetesMonitors.ts +++ b/Probe/workers/kubernetesMonitors.ts @@ -399,14 +399,14 @@ export default { // handle deployment output let desiredDeployment: $TSFixMe = 0, - readyDeployment = 0; + readyDeployment: $TSFixMe = 0; const unhealthyDeployments: $TSFixMe = [], - healthyDeployments = [], - allDeployments = [], - unhealthyDeploymentData = [], - healthyDeploymentData = [], - allDeploymentData = []; + healthyDeployments: $TSFixMe = [], + allDeployments: $TSFixMe = [], + unhealthyDeploymentData: $TSFixMe = [], + healthyDeploymentData: $TSFixMe = [], + allDeploymentData: $TSFixMe = []; deploymentOutput.items.forEach( (item: $TSFixMe) => { @@ -735,7 +735,7 @@ function loadPodOutput(configPath, namespace): void { cwd: process.cwd(), shell: true, }); - podCommandOutput.stdout.on('data', data => { + podCommandOutput.stdout.on('data', (data: $TSFixMe) => { const strData: $TSFixMe = data.toString(); podOutput += strData; }); @@ -758,7 +758,7 @@ function loadJobOutput(configPath, namespace): void { cwd: process.cwd(), shell: true, }); - jobCommandOutput.stdout.on('data', data => { + jobCommandOutput.stdout.on('data', (data: $TSFixMe) => { const strData: $TSFixMe = data.toString(); jobOutput += strData; }); @@ -781,7 +781,7 @@ function loadServiceOutput(configPath, namespace): void { cwd: process.cwd(), shell: true, }); - serviceCommandOutput.stdout.on('data', data => { + serviceCommandOutput.stdout.on('data', (data: $TSFixMe) => { const strData: $TSFixMe = data.toString(); serviceOutput += strData; }); @@ -804,7 +804,7 @@ function loadDeploymentOutput(configPath, namespace): void { cwd: process.cwd(), shell: true, }); - deploymentCommandOutput.stdout.on('data', data => { + deploymentCommandOutput.stdout.on('data', (data: $TSFixMe) => { const strData: $TSFixMe = data.toString(); deploymentOutput += strData; }); @@ -827,7 +827,7 @@ function loadStatefulsetOutput(configPath, namespace): void { cwd: process.cwd(), shell: true, }); - statefulsetCommandOutput.stdout.on('data', data => { + statefulsetCommandOutput.stdout.on('data', (data: $TSFixMe) => { const strData: $TSFixMe = data.toString(); statefulsetOutput += strData; }); diff --git a/ScriptRunner/workers/scriptMonitors.ts b/ScriptRunner/workers/scriptMonitors.ts index 01d83e1183..542dc23ca8 100644 --- a/ScriptRunner/workers/scriptMonitors.ts +++ b/ScriptRunner/workers/scriptMonitors.ts @@ -4,7 +4,7 @@ import { run as runScript } from '../Utils/scriptSandbox'; // it collects all monitors then ping them one by one to store their response export default { - run: async monitor => { + run: async (monitor: $TSFixMe) => { if (monitor && monitor.type === 'script') { if (monitor.data.script) { const code: $TSFixMe = monitor.data.script; // redundant now but may be expanded in future diff --git a/StatusPage/index.ts b/StatusPage/index.ts index d7387a18e0..72f97cef56 100755 --- a/StatusPage/index.ts +++ b/StatusPage/index.ts @@ -287,7 +287,7 @@ function decodeAndSave(content: $TSFixMe, filePath: $TSFixMe): void { cwd: process.cwd(), shell: true, }); - commandOutput.stdout.on('data', data => { + commandOutput.stdout.on('data', (data: $TSFixMe) => { const strData: $TSFixMe = data.toString(); output += strData; }); diff --git a/Tests/enterprise-tests/admin-dashboard/CreateUser.test.ts b/Tests/enterprise-tests/admin-dashboard/CreateUser.test.ts index 6c34df38f3..caa3d20cee 100644 --- a/Tests/enterprise-tests/admin-dashboard/CreateUser.test.ts +++ b/Tests/enterprise-tests/admin-dashboard/CreateUser.test.ts @@ -7,7 +7,7 @@ import 'should'; // user credentials const userEmail: Email = utils.generateRandomBusinessEmail(); const password: string = '1234567890'; -let browser: $TSFixMe, page; +let browser: $TSFixMe, page: $TSFixMe; const masterAdmin: $TSFixMe = { email: 'masteradmin@hackerbay.io', password: '1234567890', diff --git a/Tests/enterprise-tests/admin-dashboard/SmsLog.test.ts b/Tests/enterprise-tests/admin-dashboard/SmsLog.test.ts index 9e1cc2e27c..d3088992c6 100644 --- a/Tests/enterprise-tests/admin-dashboard/SmsLog.test.ts +++ b/Tests/enterprise-tests/admin-dashboard/SmsLog.test.ts @@ -401,7 +401,7 @@ describe('SMS Logs', () => { // await init.pageClick(page, '#smsLogSetting'); // // enable logs - // await init.page$Eval(page, 'input[name=smsStatusToggler]', e => + // await init.page$Eval(page, 'input[name=smsStatusToggler]', (e: $TSFixMe) => // e.click() // ); diff --git a/Tests/saas-tests/dashboard/Billing.test.ts b/Tests/saas-tests/dashboard/Billing.test.ts index 1e6002feee..b8e8f55a9a 100644 --- a/Tests/saas-tests/dashboard/Billing.test.ts +++ b/Tests/saas-tests/dashboard/Billing.test.ts @@ -125,7 +125,7 @@ describe('Project Setting: Change Plan', () => { 'should update project account when admin recharge account', async (done: $TSFixMe) => { let balance: $TSFixMe = 0, - creditedBalance = 0; + creditedBalance: $TSFixMe = 0; await page.goto(utils.DASHBOARD_URL); await init.pageWaitForSelector(page, '#projectSettings', { visible: true, diff --git a/Tests/saas-tests/dashboard/IncidentNotification.test.ts b/Tests/saas-tests/dashboard/IncidentNotification.test.ts index 24d25c6551..3c83b429e0 100644 --- a/Tests/saas-tests/dashboard/IncidentNotification.test.ts +++ b/Tests/saas-tests/dashboard/IncidentNotification.test.ts @@ -763,7 +763,7 @@ describe('Incident Created test', () => { // await init.pageWaitForSelector(page, '#closeIncident_0', { // visible: true, // }); - // await init.page$Eval(page, '#closeIncident_0', elem => elem.click()); + // await init.page$Eval(page, '#closeIncident_0', (elem: $TSFixMe) => elem.click()); // await init.pageWaitForSelector(page, '#closeIncidentButton_0'); // await init.page$Eval(page, '#closeIncidentButton_0',e=>e.click()); // const elementHandle: $TSFixMe = await init.page$(page, '#modal-ok'); diff --git a/Tests/saas-tests/dashboard/IncidentSubProject.test.ts b/Tests/saas-tests/dashboard/IncidentSubProject.test.ts index 5671870e67..4f069dacc1 100755 --- a/Tests/saas-tests/dashboard/IncidentSubProject.test.ts +++ b/Tests/saas-tests/dashboard/IncidentSubProject.test.ts @@ -415,7 +415,7 @@ describe('Incident API With SubProjects', () => { // test( // 'should get incident timeline and paginate for incident timeline in sub-project', - // async done => { + // async (done: $TSFixMe) => { // const internalNote: string = utils.generateRandomString(); // const type: string = 'internal'; // await init.loginUser(newUser, page); @@ -432,7 +432,7 @@ describe('Incident API With SubProjects', () => { // visible: true, // timeout: init.timeout, // }); - // await init.page$Eval(page, `#incident_0`, e => e.click()); + // await init.page$Eval(page, `#incident_0`, (e: $TSFixMe) => e.click()); // await init.pageWaitForSelector(page, '#incident_0', { // visible: true, // timeout: init.timeout, @@ -441,7 +441,7 @@ describe('Incident API With SubProjects', () => { // await init.gotoTab(utils.incidentTabIndexes.BASIC, page); // for (let i: $TSFixMe = 0; i < 10; i++) { - // await init.page$Eval(page, `#add-${type}-message`, e => + // await init.page$Eval(page, `#add-${type}-message`, (e: $TSFixMe) => // e.click() // ); // await init.pageWaitForSelector( @@ -488,7 +488,7 @@ describe('Incident API With SubProjects', () => { // expect(countIncidentTimelines).toEqual(10); - // await init.page$Eval(page, '#btnTimelineNext', e => e.click()); + // await init.page$Eval(page, '#btnTimelineNext', (e: $TSFixMe) => e.click()); // await init.pageWaitForSelector(page, '.ball-beat', { // visible: true, // timeout: init.timeout, @@ -503,7 +503,7 @@ describe('Incident API With SubProjects', () => { // countIncidentTimelines = incidentTimelineRows.length; // expect(countIncidentTimelines).toEqual(5); - // await init.page$Eval(page, '#btnTimelinePrev', e => e.click()); + // await init.page$Eval(page, '#btnTimelinePrev', (e: $TSFixMe) => e.click()); // await init.pageWaitForSelector(page, '.ball-beat', { // visible: true, // timeout: init.timeout, diff --git a/package.json b/package.json index 05350fb8b1..5378756f20 100644 --- a/package.json +++ b/package.json @@ -33,7 +33,7 @@ "uninstall": "docker stop $(docker ps -a -q) && docker rm $(docker ps -a -q)", "delete-all-local-branches": "git branch | grep -v 'master' | xargs git branch -D", "lint": "ejslint home/views/*.ejs && eslint '**/*.ts' -c .eslintrc.json --ignore-path .eslintignore", - "fix-lint": "eslint '**/*.ts' -c .eslintrc.json --ignore-path .eslintignore --fix", + "fix-lint": "eslint --fix '**/*.ts' -c .eslintrc.json --ignore-path .eslintignore", "fix": "npm run fix-lint", "build": "docker-compose --env-file ./docker-enterprise.env build", "build-dev": "docker-compose --env-file ./docker-enterprise.env -f docker-compose.dev.yml build $npm_config_services",