chore(core): Lintfix modern packages (#17046)

This commit is contained in:
Iván Ovejero
2025-07-07 14:30:57 +02:00
committed by GitHub
parent 534f34d4c1
commit 7d06a89d4d
14 changed files with 10 additions and 20 deletions

View File

@@ -12,7 +12,6 @@ export function isObjectLiteral(candidate: unknown): candidate is ObjectLiteral
typeof candidate === 'object' &&
candidate !== null &&
!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'
);
}

View File

@@ -33,7 +33,6 @@ export const Config: ClassDecorator = (ConfigClass: Class) => {
);
const classMetadata = globalMetadata.get(ConfigClass);
if (!classMetadata) {
// eslint-disable-next-line n8n-local-rules/no-plain-errors
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 isZodSchema = schema instanceof z.ZodType;
if (type === Object && !isZodSchema) {
// eslint-disable-next-line n8n-local-rules/no-plain-errors
throw new Error(
`Invalid decorator metadata on key "${key as string}" on ${ConfigClass.name}\n Please use explicit typing on all config fields`,
);

View File

@@ -54,7 +54,6 @@ export class AddJsonKeyPinData1659888469333 implements IrreversibleMigration {
}
const newPinDataPerWorkflow = Object.keys(pinDataPerWorkflow).reduce<NewPinnedData>(
// eslint-disable-next-line @typescript-eslint/no-shadow
(newPinDataPerWorkflow, nodeName) => {
let pinDataPerNode = pinDataPerWorkflow[nodeName];

View File

@@ -124,7 +124,6 @@ export class Column {
return this;
}
// eslint-disable-next-line complexity
toOptions(driver: Driver): TableColumnOptions {
const {
name,

View File

@@ -10,7 +10,6 @@ export class MigrateIntegerKeysToString1690000000002 implements IrreversibleMigr
transaction = false as const;
async up(context: MigrationContext) {
// eslint-disable-next-line @typescript-eslint/no-use-before-define
await pruneExecutionsData(context);
const { queryRunner, tablePrefix } = context;

View File

@@ -1001,7 +1001,6 @@ export class ExecutionRepository extends Repository<ExecutionEntity> {
qb.setParameter('value', exactMatch ? value : `%${value}%`);
}
// eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
if (annotationTags?.length || vote) {
// 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');

View File

@@ -1,10 +1,12 @@
import { Container } from '@n8n/di';
import { Service } from '@n8n/di';
import { Container, Service } from '@n8n/di';
import { EventEmitter } from 'node:events';
import { NonMethodError } from '../../errors';
import { MultiMainMetadata } from '../multi-main-metadata';
import { LEADER_TAKEOVER_EVENT_NAME, LEADER_STEPDOWN_EVENT_NAME } from '../multi-main-metadata';
import {
MultiMainMetadata,
LEADER_TAKEOVER_EVENT_NAME,
LEADER_STEPDOWN_EVENT_NAME,
} from '../multi-main-metadata';
import { OnLeaderStepdown, OnLeaderTakeover } from '../on-multi-main-event';
class MockMultiMainSetup extends EventEmitter {

View File

@@ -1,5 +1,4 @@
import { Container } from '@n8n/di';
import { Service } from '@n8n/di';
import { Container, Service } from '@n8n/di';
import { NonMethodError } from '../../errors';
import { OnPubSubEvent } from '../on-pubsub-event';

View File

@@ -1,6 +1,6 @@
import { Container } from '../di';
import { ServiceA } from './fixtures/service-a';
import { ServiceB } from './fixtures/service-b';
import { Container } from '../di';
describe('DI Container', () => {
describe('circular dependency', () => {

View File

@@ -1,4 +1,3 @@
/* eslint-disable @typescript-eslint/no-use-before-define */
import { EventEmitter } from 'events';
import type Imap from 'imap';
import { type ImapMessage } from 'imap';

View File

@@ -1,5 +1,5 @@
/* eslint-disable @typescript-eslint/no-unsafe-member-access */
/* eslint-disable @typescript-eslint/no-use-before-define */
import Imap from 'imap';
import { ConnectionClosedError, ConnectionEndedError, ConnectionTimeoutError } from './errors';

View File

@@ -1,4 +1,3 @@
/* eslint-disable @typescript-eslint/no-use-before-define */
import * as iconvlite from 'iconv-lite';
import * as qp from 'quoted-printable';
import * as utf8 from 'utf8';

View File

@@ -37,7 +37,6 @@ export function createRequireResolver({
throw new ExecutionError(error);
}
// eslint-disable-next-line @typescript-eslint/no-var-requires
return require(request) as unknown;
};
}

View File

@@ -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> {
throw new ApplicationError('Unimplemented');
}