mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 18:12:04 +00:00
chore(core): Lintfix modern packages (#17046)
This commit is contained in:
@@ -12,7 +12,6 @@ export function isObjectLiteral(candidate: unknown): candidate is ObjectLiteral
|
|||||||
typeof candidate === 'object' &&
|
typeof candidate === 'object' &&
|
||||||
candidate !== null &&
|
candidate !== null &&
|
||||||
!Array.isArray(candidate) &&
|
!Array.isArray(candidate) &&
|
||||||
// eslint-disable-next-line @typescript-eslint/no-restricted-types
|
(Object.getPrototypeOf(candidate) as object)?.constructor?.name === 'Object'
|
||||||
(Object.getPrototypeOf(candidate) as Object)?.constructor?.name === 'Object'
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -33,7 +33,6 @@ export const Config: ClassDecorator = (ConfigClass: Class) => {
|
|||||||
);
|
);
|
||||||
const classMetadata = globalMetadata.get(ConfigClass);
|
const classMetadata = globalMetadata.get(ConfigClass);
|
||||||
if (!classMetadata) {
|
if (!classMetadata) {
|
||||||
// eslint-disable-next-line n8n-local-rules/no-plain-errors
|
|
||||||
throw new Error('Invalid config class: ' + ConfigClass.name);
|
throw new Error('Invalid config class: ' + ConfigClass.name);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -106,7 +105,6 @@ export const Env =
|
|||||||
const type = Reflect.getMetadata('design:type', target, key) as PropertyType;
|
const type = Reflect.getMetadata('design:type', target, key) as PropertyType;
|
||||||
const isZodSchema = schema instanceof z.ZodType;
|
const isZodSchema = schema instanceof z.ZodType;
|
||||||
if (type === Object && !isZodSchema) {
|
if (type === Object && !isZodSchema) {
|
||||||
// eslint-disable-next-line n8n-local-rules/no-plain-errors
|
|
||||||
throw new Error(
|
throw new Error(
|
||||||
`Invalid decorator metadata on key "${key as string}" on ${ConfigClass.name}\n Please use explicit typing on all config fields`,
|
`Invalid decorator metadata on key "${key as string}" on ${ConfigClass.name}\n Please use explicit typing on all config fields`,
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -54,7 +54,6 @@ export class AddJsonKeyPinData1659888469333 implements IrreversibleMigration {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const newPinDataPerWorkflow = Object.keys(pinDataPerWorkflow).reduce<NewPinnedData>(
|
const newPinDataPerWorkflow = Object.keys(pinDataPerWorkflow).reduce<NewPinnedData>(
|
||||||
// eslint-disable-next-line @typescript-eslint/no-shadow
|
|
||||||
(newPinDataPerWorkflow, nodeName) => {
|
(newPinDataPerWorkflow, nodeName) => {
|
||||||
let pinDataPerNode = pinDataPerWorkflow[nodeName];
|
let pinDataPerNode = pinDataPerWorkflow[nodeName];
|
||||||
|
|
||||||
|
|||||||
@@ -124,7 +124,6 @@ export class Column {
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
// eslint-disable-next-line complexity
|
|
||||||
toOptions(driver: Driver): TableColumnOptions {
|
toOptions(driver: Driver): TableColumnOptions {
|
||||||
const {
|
const {
|
||||||
name,
|
name,
|
||||||
|
|||||||
@@ -10,7 +10,6 @@ export class MigrateIntegerKeysToString1690000000002 implements IrreversibleMigr
|
|||||||
transaction = false as const;
|
transaction = false as const;
|
||||||
|
|
||||||
async up(context: MigrationContext) {
|
async up(context: MigrationContext) {
|
||||||
// eslint-disable-next-line @typescript-eslint/no-use-before-define
|
|
||||||
await pruneExecutionsData(context);
|
await pruneExecutionsData(context);
|
||||||
|
|
||||||
const { queryRunner, tablePrefix } = context;
|
const { queryRunner, tablePrefix } = context;
|
||||||
|
|||||||
@@ -1001,7 +1001,6 @@ export class ExecutionRepository extends Repository<ExecutionEntity> {
|
|||||||
qb.setParameter('value', exactMatch ? value : `%${value}%`);
|
qb.setParameter('value', exactMatch ? value : `%${value}%`);
|
||||||
}
|
}
|
||||||
|
|
||||||
// eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
|
|
||||||
if (annotationTags?.length || vote) {
|
if (annotationTags?.length || vote) {
|
||||||
// If there is a filter by one or multiple tags or by vote - we need to join the annotations table
|
// If there is a filter by one or multiple tags or by vote - we need to join the annotations table
|
||||||
qb.innerJoin('execution.annotation', 'annotation');
|
qb.innerJoin('execution.annotation', 'annotation');
|
||||||
|
|||||||
@@ -1,10 +1,12 @@
|
|||||||
import { Container } from '@n8n/di';
|
import { Container, Service } from '@n8n/di';
|
||||||
import { Service } from '@n8n/di';
|
|
||||||
import { EventEmitter } from 'node:events';
|
import { EventEmitter } from 'node:events';
|
||||||
|
|
||||||
import { NonMethodError } from '../../errors';
|
import { NonMethodError } from '../../errors';
|
||||||
import { MultiMainMetadata } from '../multi-main-metadata';
|
import {
|
||||||
import { LEADER_TAKEOVER_EVENT_NAME, LEADER_STEPDOWN_EVENT_NAME } from '../multi-main-metadata';
|
MultiMainMetadata,
|
||||||
|
LEADER_TAKEOVER_EVENT_NAME,
|
||||||
|
LEADER_STEPDOWN_EVENT_NAME,
|
||||||
|
} from '../multi-main-metadata';
|
||||||
import { OnLeaderStepdown, OnLeaderTakeover } from '../on-multi-main-event';
|
import { OnLeaderStepdown, OnLeaderTakeover } from '../on-multi-main-event';
|
||||||
|
|
||||||
class MockMultiMainSetup extends EventEmitter {
|
class MockMultiMainSetup extends EventEmitter {
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
import { Container } from '@n8n/di';
|
import { Container, Service } from '@n8n/di';
|
||||||
import { Service } from '@n8n/di';
|
|
||||||
|
|
||||||
import { NonMethodError } from '../../errors';
|
import { NonMethodError } from '../../errors';
|
||||||
import { OnPubSubEvent } from '../on-pubsub-event';
|
import { OnPubSubEvent } from '../on-pubsub-event';
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
|
import { Container } from '../di';
|
||||||
import { ServiceA } from './fixtures/service-a';
|
import { ServiceA } from './fixtures/service-a';
|
||||||
import { ServiceB } from './fixtures/service-b';
|
import { ServiceB } from './fixtures/service-b';
|
||||||
import { Container } from '../di';
|
|
||||||
|
|
||||||
describe('DI Container', () => {
|
describe('DI Container', () => {
|
||||||
describe('circular dependency', () => {
|
describe('circular dependency', () => {
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
/* eslint-disable @typescript-eslint/no-use-before-define */
|
|
||||||
import { EventEmitter } from 'events';
|
import { EventEmitter } from 'events';
|
||||||
import type Imap from 'imap';
|
import type Imap from 'imap';
|
||||||
import { type ImapMessage } from 'imap';
|
import { type ImapMessage } from 'imap';
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/* eslint-disable @typescript-eslint/no-unsafe-member-access */
|
/* eslint-disable @typescript-eslint/no-unsafe-member-access */
|
||||||
/* eslint-disable @typescript-eslint/no-use-before-define */
|
|
||||||
import Imap from 'imap';
|
import Imap from 'imap';
|
||||||
|
|
||||||
import { ConnectionClosedError, ConnectionEndedError, ConnectionTimeoutError } from './errors';
|
import { ConnectionClosedError, ConnectionEndedError, ConnectionTimeoutError } from './errors';
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
/* eslint-disable @typescript-eslint/no-use-before-define */
|
|
||||||
import * as iconvlite from 'iconv-lite';
|
import * as iconvlite from 'iconv-lite';
|
||||||
import * as qp from 'quoted-printable';
|
import * as qp from 'quoted-printable';
|
||||||
import * as utf8 from 'utf8';
|
import * as utf8 from 'utf8';
|
||||||
|
|||||||
@@ -37,7 +37,6 @@ export function createRequireResolver({
|
|||||||
throw new ExecutionError(error);
|
throw new ExecutionError(error);
|
||||||
}
|
}
|
||||||
|
|
||||||
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
|
||||||
return require(request) as unknown;
|
return require(request) as unknown;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -394,7 +394,6 @@ export abstract class TaskRunner extends EventEmitter {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
||||||
async executeTask(_taskParams: TaskParams, _signal: AbortSignal): Promise<TaskResultData> {
|
async executeTask(_taskParams: TaskParams, _signal: AbortSignal): Promise<TaskResultData> {
|
||||||
throw new ApplicationError('Unimplemented');
|
throw new ApplicationError('Unimplemented');
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user