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

@@ -1,18 +1,18 @@
import { Container } from 'typedi';
import { randomString } from 'n8n-workflow';
import { Container } from 'typedi';
import type { User } from '@/databases/entities/user';
import { CredentialsRepository } from '@/databases/repositories/credentials.repository';
import { SharedCredentialsRepository } from '@/databases/repositories/shared-credentials.repository';
import { createTeamProject } from '@test-integration/db/projects';
import { randomApiKey, randomName } from '../shared/random';
import * as utils from '../shared/utils/';
import type { CredentialPayload, SaveCredentialFunction } from '../shared/types';
import * as testDb from '../shared/test-db';
import { affixRoleToSaveCredential, createCredentials } from '../shared/db/credentials';
import { addApiKey, createUser, createUserShell } from '../shared/db/users';
import { randomApiKey, randomName } from '../shared/random';
import * as testDb from '../shared/test-db';
import type { CredentialPayload, SaveCredentialFunction } from '../shared/types';
import type { SuperAgentTest } from '../shared/types';
import { createTeamProject } from '@test-integration/db/projects';
import * as utils from '../shared/utils/';
let owner: User;
let member: User;

View File

@@ -1,15 +1,10 @@
import type { User } from '@/databases/entities/user';
import type { ActiveWorkflowManager } from '@/active-workflow-manager';
import type { ExecutionEntity } from '@/databases/entities/execution-entity';
import type { User } from '@/databases/entities/user';
import { Telemetry } from '@/telemetry';
import { mockInstance } from '@test/mocking';
import { createTeamProject } from '@test-integration/db/projects';
import { randomApiKey } from '../shared/random';
import * as utils from '../shared/utils/';
import * as testDb from '../shared/test-db';
import { createUser } from '../shared/db/users';
import {
createManyWorkflows,
createWorkflow,
shareWorkflowWithUsers,
} from '../shared/db/workflows';
import {
createErrorExecution,
createExecution,
@@ -17,11 +12,16 @@ import {
createSuccessfulExecution,
createWaitingExecution,
} from '../shared/db/executions';
import { createUser } from '../shared/db/users';
import {
createManyWorkflows,
createWorkflow,
shareWorkflowWithUsers,
} from '../shared/db/workflows';
import { randomApiKey } from '../shared/random';
import * as testDb from '../shared/test-db';
import type { SuperAgentTest } from '../shared/types';
import { mockInstance } from '@test/mocking';
import { Telemetry } from '@/telemetry';
import { createTeamProject } from '@test-integration/db/projects';
import type { ExecutionEntity } from '@/databases/entities/execution-entity';
import * as utils from '../shared/utils/';
let owner: User;
let user1: User;

View File

@@ -1,10 +1,11 @@
import { setupTestServer } from '@test-integration/utils';
import { createMember, createOwner } from '@test-integration/db/users';
import * as testDb from '../shared/test-db';
import { FeatureNotLicensedError } from '@/errors/feature-not-licensed.error';
import { createTeamProject, getProjectByNameOrFail } from '@test-integration/db/projects';
import { mockInstance } from '@test/mocking';
import { Telemetry } from '@/telemetry';
import { mockInstance } from '@test/mocking';
import { createTeamProject, getProjectByNameOrFail } from '@test-integration/db/projects';
import { createMember, createOwner } from '@test-integration/db/users';
import { setupTestServer } from '@test-integration/utils';
import * as testDb from '../shared/test-db';
describe('Projects in Public API', () => {
const testServer = setupTestServer({ endpointGroups: ['publicApi'] });

View File

@@ -1,13 +1,14 @@
import { Container } from 'typedi';
import type { User } from '@/databases/entities/user';
import { TagRepository } from '@/databases/repositories/tag.repository';
import { randomApiKey } from '../shared/random';
import * as utils from '../shared/utils/';
import * as testDb from '../shared/test-db';
import { createUser } from '../shared/db/users';
import { createTag } from '../shared/db/tags';
import { createUser } from '../shared/db/users';
import { randomApiKey } from '../shared/random';
import * as testDb from '../shared/test-db';
import type { SuperAgentTest } from '../shared/types';
import * as utils from '../shared/utils/';
let owner: User;
let member: User;

View File

@@ -1,16 +1,16 @@
import validator from 'validator';
import { v4 as uuid } from 'uuid';
import validator from 'validator';
import type { User } from '@/databases/entities/user';
import { License } from '@/license';
import { createTeamProject, linkUserToProject } from '@test-integration/db/projects';
import { mockInstance } from '../../shared/mocking';
import { randomApiKey } from '../shared/random';
import * as utils from '../shared/utils/';
import * as testDb from '../shared/test-db';
import { createOwner, createUser, createUserShell } from '../shared/db/users';
import { randomApiKey } from '../shared/random';
import * as testDb from '../shared/test-db';
import type { SuperAgentTest } from '../shared/types';
import { createTeamProject, linkUserToProject } from '@test-integration/db/projects';
import type { User } from '@/databases/entities/user';
import * as utils from '../shared/utils/';
mockInstance(License, {
getUsersLimit: jest.fn().mockReturnValue(-1),

View File

@@ -1,9 +1,10 @@
import { setupTestServer } from '@test-integration/utils';
import * as testDb from '../shared/test-db';
import { createMember, createOwner, getUserById } from '@test-integration/db/users';
import { mockInstance } from '@test/mocking';
import { Telemetry } from '@/telemetry';
import { FeatureNotLicensedError } from '@/errors/feature-not-licensed.error';
import { Telemetry } from '@/telemetry';
import { mockInstance } from '@test/mocking';
import { createMember, createOwner, getUserById } from '@test-integration/db/users';
import { setupTestServer } from '@test-integration/utils';
import * as testDb from '../shared/test-db';
describe('Users in Public API', () => {
const testServer = setupTestServer({ endpointGroups: ['publicApi'] });

View File

@@ -1,8 +1,9 @@
import { setupTestServer } from '@test-integration/utils';
import { FeatureNotLicensedError } from '@/errors/feature-not-licensed.error';
import { createOwner } from '@test-integration/db/users';
import { createVariable, getVariableOrFail } from '@test-integration/db/variables';
import { setupTestServer } from '@test-integration/utils';
import * as testDb from '../shared/test-db';
import { FeatureNotLicensedError } from '@/errors/feature-not-licensed.error';
describe('Variables in Public API', () => {
const testServer = setupTestServer({ endpointGroups: ['publicApi'] });

View File

@@ -1,28 +1,28 @@
import { Container } from 'typedi';
import type { INode } from 'n8n-workflow';
import { Container } from 'typedi';
import { ActiveWorkflowManager } from '@/active-workflow-manager';
import config from '@/config';
import { STARTING_NODES } from '@/constants';
import type { Project } from '@/databases/entities/project';
import type { TagEntity } from '@/databases/entities/tag-entity';
import type { User } from '@/databases/entities/user';
import type { Project } from '@/databases/entities/project';
import { ProjectRepository } from '@/databases/repositories/project.repository';
import { SharedWorkflowRepository } from '@/databases/repositories/shared-workflow.repository';
import { WorkflowHistoryRepository } from '@/databases/repositories/workflow-history.repository';
import { ActiveWorkflowManager } from '@/active-workflow-manager';
import { ExecutionService } from '@/executions/execution.service';
import { ProjectService } from '@/services/project.service';
import { Telemetry } from '@/telemetry';
import { createTeamProject } from '@test-integration/db/projects';
import { randomApiKey } from '../shared/random';
import * as utils from '../shared/utils/';
import * as testDb from '../shared/test-db';
import { mockInstance } from '../../shared/mocking';
import { createTag } from '../shared/db/tags';
import { createUser } from '../shared/db/users';
import { createWorkflow, createWorkflowWithTrigger } from '../shared/db/workflows';
import { createTag } from '../shared/db/tags';
import { mockInstance } from '../../shared/mocking';
import { randomApiKey } from '../shared/random';
import * as testDb from '../shared/test-db';
import type { SuperAgentTest } from '../shared/types';
import { Telemetry } from '@/telemetry';
import { ProjectService } from '@/services/project.service';
import { createTeamProject } from '@test-integration/db/projects';
import * as utils from '../shared/utils/';
mockInstance(Telemetry);