Skip to content

Commit

Permalink
ci (core): Stop disabling linting rules that are explicitly set to `w…
Browse files Browse the repository at this point in the history
…arn` (no-changelog)
  • Loading branch information
netroy committed Nov 9, 2023
1 parent 0468ded commit 683c622
Show file tree
Hide file tree
Showing 25 changed files with 1 addition and 37 deletions.
1 change: 0 additions & 1 deletion packages/cli/src/ActiveExecutions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,6 @@ export class ActiveExecutions {
setTimeout(() => {
// execute on next event loop tick;
this.activeExecutions[executionId].process!.send({
// eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
type: timeout || 'stopExecution',
});
}, 1);
Expand Down
1 change: 0 additions & 1 deletion packages/cli/src/ExternalHooks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@ export class ExternalHooks implements IExternalHooksClass {
}
}

// eslint-disable-next-line @typescript-eslint/no-explicit-any
async run(hookName: string, hookParameters?: any[]): Promise<void> {
const externalHookFunctions: IExternalHooksFunctions = {
dbCollections: Db.collections,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@ export class ExternalSecretsService {
return copiedData;
}

// eslint-disable-next-line @typescript-eslint/no-explicit-any
private unredactRestoreValues(unmerged: any, replacement: any) {
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
for (const [key, value] of Object.entries(unmerged)) {
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/src/ExternalSecrets/providers/vault.ts
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,7 @@ export class VaultProvider extends SecretsProvider {
try {
listResp = await this.#http.request<VaultResponse<VaultSecretList>>({
url: listPath,
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-explicit-any
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
method: 'LIST' as any,
});
} catch {
Expand Down
4 changes: 0 additions & 4 deletions packages/cli/src/Interfaces.ts
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,6 @@ export interface IExternalHooks {

export interface IExternalHooksFileData {
[key: string]: {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
[key: string]: Array<(...args: any[]) => Promise<void>>;
};
}
Expand All @@ -291,7 +290,6 @@ export interface IExternalHooksFunctions {

export interface IExternalHooksClass {
init(): Promise<void>;
// eslint-disable-next-line @typescript-eslint/no-explicit-any
run(hookName: string, hookParameters?: any[]): Promise<void>;
}

Expand Down Expand Up @@ -636,7 +634,6 @@ export interface INodesTypeData {
}

export interface IWorkflowErrorData {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
[key: string]: any;
execution?: {
id?: string;
Expand All @@ -658,7 +655,6 @@ export interface IWorkflowErrorData {

export interface IProcessMessageDataHook {
hook: string;
// eslint-disable-next-line @typescript-eslint/no-explicit-any
parameters: any[];
}

Expand Down
1 change: 0 additions & 1 deletion packages/cli/src/Logger.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,6 @@ export class Logger {
// We are in runtime, so it means we are looking at compiled js files
const logDetails = {} as IDataObject;
if (callsite[2] !== undefined) {
// eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
logDetails.file = basename(callsite[2].getFileName() || '');
const functionName = callsite[2].getFunctionName();
if (functionName) {
Expand Down
3 changes: 0 additions & 3 deletions packages/cli/src/ResponseHelper.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
/* eslint-disable @typescript-eslint/no-explicit-any */

/* eslint-disable @typescript-eslint/no-unsafe-assignment */

import type { Request, Response } from 'express';
import { parse, stringify } from 'flatted';
import picocolors from 'picocolors';
Expand Down
1 change: 0 additions & 1 deletion packages/cli/src/WebhookHelpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
/* eslint-disable @typescript-eslint/no-unsafe-assignment */
/* eslint-disable id-denylist */
/* eslint-disable prefer-spread */
/* eslint-disable @typescript-eslint/prefer-nullish-coalescing */
/* eslint-disable @typescript-eslint/no-unsafe-member-access */
/* eslint-disable @typescript-eslint/restrict-template-expressions */
import type express from 'express';
Expand Down
1 change: 0 additions & 1 deletion packages/cli/src/WorkflowExecuteAdditionalData.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
/* eslint-disable @typescript-eslint/no-unsafe-argument */
/* eslint-disable @typescript-eslint/no-use-before-define */
/* eslint-disable @typescript-eslint/prefer-nullish-coalescing */
/* eslint-disable id-denylist */
/* eslint-disable @typescript-eslint/no-unsafe-member-access */
/* eslint-disable @typescript-eslint/no-unused-vars */
Expand Down
2 changes: 0 additions & 2 deletions packages/cli/src/WorkflowHelpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,11 @@ import type {
IWorkflowExecutionDataProcess,
} from '@/Interfaces';
import { NodeTypes } from '@/NodeTypes';
// eslint-disable-next-line import/no-cycle
import { WorkflowRunner } from '@/WorkflowRunner';
import config from '@/config';
import type { WorkflowEntity } from '@db/entities/WorkflowEntity';
import type { User } from '@db/entities/User';
import omit from 'lodash/omit';
// eslint-disable-next-line import/no-cycle
import { PermissionChecker } from './UserManagement/PermissionChecker';
import { UserService } from './services/user.service';
import type { SharedWorkflow } from '@db/entities/SharedWorkflow';
Expand Down
2 changes: 0 additions & 2 deletions packages/cli/src/WorkflowRunner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,7 @@ import type { Job, JobData, JobResponse } from '@/Queue';

import { Queue } from '@/Queue';
import { decodeWebhookResponse } from '@/helpers/decodeWebhookResponse';
// eslint-disable-next-line import/no-cycle
import * as WorkflowHelpers from '@/WorkflowHelpers';
// eslint-disable-next-line import/no-cycle
import * as WorkflowExecuteAdditionalData from '@/WorkflowExecuteAdditionalData';
import { generateFailedExecutionFromError } from '@/WorkflowHelpers';
import { initErrorHandling } from '@/ErrorReporting';
Expand Down
3 changes: 0 additions & 3 deletions packages/cli/src/WorkflowRunnerProcess.ts
Original file line number Diff line number Diff line change
Expand Up @@ -309,9 +309,7 @@ class WorkflowRunnerProcess {

/**
* Sends hook data to the parent process that it executes them
*
*/
// eslint-disable-next-line @typescript-eslint/no-explicit-any
async sendHookToParentProcess(hook: string, parameters: any[]) {
try {
await sendToParentProcess('processHook', {
Expand Down Expand Up @@ -384,7 +382,6 @@ class WorkflowRunnerProcess {
* @param {string} type The type of data to send
* @param {*} data The data
*/
// eslint-disable-next-line @typescript-eslint/no-explicit-any
async function sendToParentProcess(type: string, data: any): Promise<void> {
return new Promise((resolve, reject) => {
process.send!(
Expand Down
1 change: 0 additions & 1 deletion packages/cli/src/credentials/credentials.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,6 @@ export class CredentialsService {
return copiedData;
}

// eslint-disable-next-line @typescript-eslint/no-explicit-any
private static unredactRestoreValues(unmerged: any, replacement: any) {
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
for (const [key, value] of Object.entries(unmerged)) {
Expand Down
1 change: 0 additions & 1 deletion packages/cli/src/decorators/Authorized.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* eslint-disable @typescript-eslint/ban-types */
/* eslint-disable @typescript-eslint/naming-convention */
import { CONTROLLER_AUTH_ROLES } from './constants';
import type { AuthRoleMetadata } from './types';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,6 @@ export class MessageEventBusDestinationWebhook
}

const parametersToKeyValue = async (
// eslint-disable-next-line @typescript-eslint/no-explicit-any
acc: Promise<{ [key: string]: any }>,
cur: { name: string; value: string; parameterType?: string; inputDataFieldName?: string },
) => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* eslint-disable @typescript-eslint/no-explicit-any */
import { appendFileSync, existsSync, rmSync, renameSync, openSync, closeSync } from 'fs';
import { stat } from 'fs/promises';
import { isMainThread, parentPort } from 'worker_threads';
Expand Down
1 change: 0 additions & 1 deletion packages/cli/src/eventbus/eventBus.controller.ee.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* eslint-disable @typescript-eslint/no-explicit-any */
import express from 'express';
import { eventBus } from './MessageEventBus/MessageEventBus';
import {
Expand Down
1 change: 0 additions & 1 deletion packages/cli/src/executions/executions.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ export interface IGetExecutionsQueryFilter {
retrySuccessId?: string;
status?: ExecutionStatus[];
workflowId?: string;
// eslint-disable-next-line @typescript-eslint/no-explicit-any
waitTill?: FindOperator<any> | boolean;
metadata?: Array<{ key: string; value: string }>;
startedAfter?: string;
Expand Down
1 change: 0 additions & 1 deletion packages/cli/test/integration/eventbus.ee.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,6 @@ test('should have logwriter log messages', async () => {
});
await eventBus.send(testMessage);
await new Promise((resolve) => {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
eventBus.logWriter.worker?.once('message', async (msg: { command: string; data: any }) => {
expect(msg.command).toBe('appendMessageToLog');
expect(msg.data).toBe(true);
Expand Down
1 change: 0 additions & 1 deletion packages/cli/test/integration/shared/testDb.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,6 @@ export async function truncate(collections: CollectionName[]) {
if (typeof collection === 'string') {
await Db.collections[collection].delete({});
} else {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
await Container.get(collection as { new (): Repository<any> }).delete({});
}
}
Expand Down
4 changes: 0 additions & 4 deletions packages/cli/test/integration/workflowHistory.api.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@ describe('GET /workflow-history/:workflowId', () => {
),
);

// eslint-disable-next-line @typescript-eslint/no-explicit-any
const last = versions.sort((a, b) => b.createdAt.valueOf() - a.createdAt.valueOf())[0]! as any;
delete last.nodes;
delete last.connections;
Expand Down Expand Up @@ -101,7 +100,6 @@ describe('GET /workflow-history/:workflowId', () => {
new Array(10).fill(undefined).map(async (_) => createWorkflowHistoryItem(workflow2.id)),
);

// eslint-disable-next-line @typescript-eslint/no-explicit-any
const last = versions.sort((a, b) => b.createdAt.valueOf() - a.createdAt.valueOf())[0]! as any;
delete last.nodes;
delete last.connections;
Expand All @@ -125,7 +123,6 @@ describe('GET /workflow-history/:workflowId', () => {
),
);

// eslint-disable-next-line @typescript-eslint/no-explicit-any
const last = versions.sort((a, b) => b.createdAt.valueOf() - a.createdAt.valueOf())[0]! as any;
delete last.nodes;
delete last.connections;
Expand All @@ -149,7 +146,6 @@ describe('GET /workflow-history/:workflowId', () => {
),
);

// eslint-disable-next-line @typescript-eslint/no-explicit-any
const last = versions.sort((a, b) => b.createdAt.valueOf() - a.createdAt.valueOf())[5]! as any;
delete last.nodes;
delete last.connections;
Expand Down
1 change: 0 additions & 1 deletion packages/cli/test/unit/execution.lifecycle.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ function toIRun(item?: object) {
}

function getDataId(run: IRun, kind: 'binary' | 'json') {
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
return run.data.resultData.runData.myNode[0].data.main[0][0][kind].data.id;
}
Expand Down
1 change: 0 additions & 1 deletion packages/cli/test/unit/services/cache.service.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ describe('cacheService', () => {
};
}
// second mock for our code
// eslint-disable-next-line @typescript-eslint/no-explicit-any
return function (...args: any) {
return new Redis(args);
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ describe('Orchestration Service', () => {
};
}
// second mock for our code
// eslint-disable-next-line @typescript-eslint/no-explicit-any
return function (...args: any) {
return new Redis(args);
};
Expand Down
1 change: 0 additions & 1 deletion packages/cli/test/unit/services/redis.service.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ describe('RedisService', () => {
};
}
// second mock for our code
// eslint-disable-next-line @typescript-eslint/no-explicit-any
return function (...args: any) {
return new Redis(args);
};
Expand Down

0 comments on commit 683c622

Please sign in to comment.