refactor(core): Enable import/order eslint rule (#10794)

This commit is contained in:
Tomi Turtiainen
2024-09-12 19:07:18 +03:00
committed by GitHub
parent 6530620e9d
commit 5156313074
569 changed files with 3019 additions and 2523 deletions

View File

@@ -3,8 +3,8 @@
/* eslint-disable @typescript-eslint/no-unsafe-member-access */
/* eslint-disable @typescript-eslint/no-unsafe-assignment */
import { GlobalConfig } from '@n8n/config';
import { WorkflowExecute } from 'n8n-core';
import type {
IDataObject,
IExecuteData,
@@ -33,11 +33,12 @@ import {
Workflow,
WorkflowHooks,
} from 'n8n-workflow';
import { Container } from 'typedi';
import config from '@/config';
import { ActiveExecutions } from '@/active-executions';
import config from '@/config';
import { CredentialsHelper } from '@/credentials-helper';
import { ExecutionRepository } from '@/databases/repositories/execution.repository';
import { ExternalHooks } from '@/external-hooks';
import type {
IPushDataExecutionFinished,
@@ -48,30 +49,29 @@ import type {
} from '@/interfaces';
import { NodeTypes } from '@/node-types';
import { Push } from '@/push';
import * as WorkflowHelpers from '@/workflow-helpers';
import { findSubworkflowStart, isWorkflowIdValid } from '@/utils';
import { PermissionChecker } from './user-management/permission-checker';
import { ExecutionRepository } from '@/databases/repositories/execution.repository';
import { WorkflowStatisticsService } from '@/services/workflow-statistics.service';
import { SecretsHelper } from './secrets-helpers';
import { OwnershipService } from './services/ownership.service';
import { findSubworkflowStart, isWorkflowIdValid } from '@/utils';
import * as WorkflowHelpers from '@/workflow-helpers';
import { WorkflowRepository } from './databases/repositories/workflow.repository';
import type { AiEventMap, AiEventPayload } from './events/ai-event-map';
import { EventService } from './events/event.service';
import { restoreBinaryDataId } from './execution-lifecycle-hooks/restore-binary-data-id';
import { saveExecutionProgress } from './execution-lifecycle-hooks/save-execution-progress';
import {
determineFinalExecutionStatus,
prepareExecutionDataForDbUpdate,
updateExistingExecution,
} from './execution-lifecycle-hooks/shared/shared-hook-functions';
import { restoreBinaryDataId } from './execution-lifecycle-hooks/restore-binary-data-id';
import { toSaveSettings } from './execution-lifecycle-hooks/to-save-settings';
import { Logger } from './logger';
import { saveExecutionProgress } from './execution-lifecycle-hooks/save-execution-progress';
import { WorkflowStaticDataService } from './workflows/workflow-static-data.service';
import { WorkflowRepository } from './databases/repositories/workflow.repository';
import { SecretsHelper } from './secrets-helpers';
import { OwnershipService } from './services/ownership.service';
import { UrlService } from './services/url.service';
import { WorkflowExecutionService } from './workflows/workflow-execution.service';
import type { AiEventMap, AiEventPayload } from './events/ai-event-map';
import { EventService } from './events/event.service';
import { GlobalConfig } from '@n8n/config';
import { SubworkflowPolicyChecker } from './subworkflows/subworkflow-policy-checker.service';
import { PermissionChecker } from './user-management/permission-checker';
import { WorkflowExecutionService } from './workflows/workflow-execution.service';
import { WorkflowStaticDataService } from './workflows/workflow-static-data.service';
export function objectToError(errorObject: unknown, workflow: Workflow): Error {
// TODO: Expand with other error types