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

@@ -2,13 +2,13 @@ import { nanoid } from 'nanoid';
import { ImportCredentialsCommand } from '@/commands/import/credentials';
import { LoadNodesAndCredentials } from '@/load-nodes-and-credentials';
import { setupTestCommand } from '@test-integration/utils/test-command';
import { mockInstance } from '../../shared/mocking';
import * as testDb from '../shared/test-db';
import { getAllCredentials, getAllSharedCredentials } from '../shared/db/credentials';
import { createMember, createOwner } from '../shared/db/users';
import { getPersonalProject } from '../shared/db/projects';
import { createMember, createOwner } from '../shared/db/users';
import * as testDb from '../shared/test-db';
mockInstance(LoadNodesAndCredentials);
const command = setupTestCommand(ImportCredentialsCommand);

View File

@@ -2,13 +2,13 @@ import { nanoid } from 'nanoid';
import { ImportWorkflowsCommand } from '@/commands/import/workflow';
import { LoadNodesAndCredentials } from '@/load-nodes-and-credentials';
import { setupTestCommand } from '@test-integration/utils/test-command';
import { mockInstance } from '../../shared/mocking';
import * as testDb from '../shared/test-db';
import { getAllSharedWorkflows, getAllWorkflows } from '../shared/db/workflows';
import { createMember, createOwner } from '../shared/db/users';
import { getPersonalProject } from '../shared/db/projects';
import { createMember, createOwner } from '../shared/db/users';
import { getAllSharedWorkflows, getAllWorkflows } from '../shared/db/workflows';
import * as testDb from '../shared/test-db';
mockInstance(LoadNodesAndCredentials);
const command = setupTestCommand(ImportWorkflowsCommand);

View File

@@ -1,26 +1,26 @@
import { EntityNotFoundError } from '@n8n/typeorm';
import { Container } from 'typedi';
import { v4 as uuid } from 'uuid';
import { EntityNotFoundError } from '@n8n/typeorm';
import { Reset } from '@/commands/ldap/reset';
import { LoadNodesAndCredentials } from '@/load-nodes-and-credentials';
import { WorkflowRepository } from '@/databases/repositories/workflow.repository';
import { CredentialsRepository } from '@/databases/repositories/credentials.repository';
import { SharedWorkflowRepository } from '@/databases/repositories/shared-workflow.repository';
import { SharedCredentialsRepository } from '@/databases/repositories/shared-credentials.repository';
import { SharedWorkflowRepository } from '@/databases/repositories/shared-workflow.repository';
import { WorkflowRepository } from '@/databases/repositories/workflow.repository';
import { getLdapSynchronizations, saveLdapSynchronization } from '@/ldap/helpers.ee';
import { LdapService } from '@/ldap/ldap.service.ee';
import { LoadNodesAndCredentials } from '@/load-nodes-and-credentials';
import { Push } from '@/push';
import { Telemetry } from '@/telemetry';
import { setupTestCommand } from '@test-integration/utils/test-command';
import { mockInstance } from '../../../shared/mocking';
import { saveCredential } from '../../shared/db/credentials';
import { createTeamProject, findProject, getPersonalProject } from '../../shared/db/projects';
import { createLdapUser, createMember, getUserById } from '../../shared/db/users';
import { createWorkflow } from '../../shared/db/workflows';
import { randomCredentialPayload } from '../../shared/random';
import { saveCredential } from '../../shared/db/credentials';
import { createLdapConfig } from '../../shared/ldap';
import { createTeamProject, findProject, getPersonalProject } from '../../shared/db/projects';
import { randomCredentialPayload } from '../../shared/random';
mockInstance(Telemetry);

View File

@@ -1,13 +1,13 @@
import { Container } from 'typedi';
import { setupTestCommand } from '@test-integration/utils/test-command';
import { mockInstance } from '../../shared/mocking';
import { ClearLicenseCommand } from '@/commands/license/clear';
import { SETTINGS_LICENSE_CERT_KEY } from '@/constants';
import { SettingsRepository } from '@/databases/repositories/settings.repository';
import { License } from '@/license';
import { LoadNodesAndCredentials } from '@/load-nodes-and-credentials';
import { setupTestCommand } from '@test-integration/utils/test-command';
import { mockInstance } from '../../shared/mocking';
mockInstance(LoadNodesAndCredentials);
const license = mockInstance(License);

View File

@@ -1,23 +1,23 @@
import { Container } from 'typedi';
import { Reset } from '@/commands/user-management/reset';
import { CredentialsEntity } from '@/databases/entities/credentials-entity';
import { CredentialsRepository } from '@/databases/repositories/credentials.repository';
import { SettingsRepository } from '@/databases/repositories/settings.repository';
import { SharedCredentialsRepository } from '@/databases/repositories/shared-credentials.repository';
import { SharedWorkflowRepository } from '@/databases/repositories/shared-workflow.repository';
import { UserRepository } from '@/databases/repositories/user.repository';
import { LoadNodesAndCredentials } from '@/load-nodes-and-credentials';
import { NodeTypes } from '@/node-types';
import { SharedWorkflowRepository } from '@/databases/repositories/shared-workflow.repository';
import { SharedCredentialsRepository } from '@/databases/repositories/shared-credentials.repository';
import { CredentialsRepository } from '@/databases/repositories/credentials.repository';
import { CredentialsEntity } from '@/databases/entities/credentials-entity';
import { SettingsRepository } from '@/databases/repositories/settings.repository';
import { UserRepository } from '@/databases/repositories/user.repository';
import { setupTestCommand } from '@test-integration/utils/test-command';
import { mockInstance } from '../../shared/mocking';
import * as testDb from '../shared/test-db';
import { encryptCredentialData, saveCredential } from '../shared/db/credentials';
import { getPersonalProject } from '../shared/db/projects';
import { createMember, createUser } from '../shared/db/users';
import { createWorkflow } from '../shared/db/workflows';
import { getPersonalProject } from '../shared/db/projects';
import { encryptCredentialData, saveCredential } from '../shared/db/credentials';
import { randomCredentialPayload } from '../shared/random';
import * as testDb from '../shared/test-db';
mockInstance(LoadNodesAndCredentials);
mockInstance(NodeTypes);

View File

@@ -1,10 +1,10 @@
import { LoadNodesAndCredentials } from '@/load-nodes-and-credentials';
import { UpdateWorkflowCommand } from '@/commands/update/workflow';
import { LoadNodesAndCredentials } from '@/load-nodes-and-credentials';
import { setupTestCommand } from '@test-integration/utils/test-command';
import * as testDb from '../../shared/test-db';
import { createWorkflowWithTrigger, getAllWorkflows } from '../../shared/db/workflows';
import { mockInstance } from '../../../shared/mocking';
import { createWorkflowWithTrigger, getAllWorkflows } from '../../shared/db/workflows';
import * as testDb from '../../shared/test-db';
mockInstance(LoadNodesAndCredentials);
const command = setupTestCommand(UpdateWorkflowCommand);

View File

@@ -2,18 +2,18 @@ import { BinaryDataService } from 'n8n-core';
import { Worker } from '@/commands/worker';
import config from '@/config';
import { ExternalSecretsManager } from '@/external-secrets/external-secrets-manager.ee';
import { MessageEventBus } from '@/eventbus/message-event-bus/message-event-bus';
import { LogStreamingEventRelay } from '@/events/log-streaming-event-relay';
import { ExternalHooks } from '@/external-hooks';
import { ExternalSecretsManager } from '@/external-secrets/external-secrets-manager.ee';
import { License } from '@/license';
import { LoadNodesAndCredentials } from '@/load-nodes-and-credentials';
import { ScalingService } from '@/scaling/scaling.service';
import { OrchestrationHandlerWorkerService } from '@/services/orchestration/worker/orchestration.handler.worker.service';
import { OrchestrationWorkerService } from '@/services/orchestration/worker/orchestration.worker.service';
import { License } from '@/license';
import { ExternalHooks } from '@/external-hooks';
import { ScalingService } from '@/scaling/scaling.service';
import { setupTestCommand } from '@test-integration/utils/test-command';
import { mockInstance } from '../../shared/mocking';
import { LogStreamingEventRelay } from '@/events/log-streaming-event-relay';
config.set('executions.mode', 'queue');
config.set('binaryDataManager.availableModes', 'filesystem');