chore(core): Switch import/no-cycle to error level (#15408)

This commit is contained in:
Iván Ovejero
2025-05-23 17:59:48 +02:00
committed by GitHub
parent 7f0c6d62e6
commit 2bd80ced6e
10 changed files with 9 additions and 2 deletions

View File

@@ -486,7 +486,6 @@ const config = (module.exports = {
'@typescript-eslint/restrict-template-expressions': 'off',
'@typescript-eslint/unbound-method': 'off',
'id-denylist': 'off',
'import/no-cycle': 'off',
'import/no-default-export': 'off',
'import/no-extraneous-dependencies': 'off',
'n8n-local-rules/no-uncaught-json-parse': 'off',

View File

@@ -27,7 +27,6 @@ module.exports = {
complexity: 'error',
// TODO: Remove this
'import/no-cycle': 'warn',
'import/extensions': 'warn',
'@typescript-eslint/ban-ts-comment': ['warn', { 'ts-ignore': true }],
'@typescript-eslint/no-explicit-any': 'warn',

View File

@@ -37,6 +37,7 @@ import { userHasScopes } from '@/permissions.ee/check-access';
import type { CredentialRequest, ListQuery } from '@/requests';
import { CredentialsTester } from '@/services/credentials-tester.service';
import { OwnershipService } from '@/services/ownership.service';
// eslint-disable-next-line import/no-cycle
import { ProjectService } from '@/services/project.service.ee';
import { RoleService } from '@/services/role.service';

View File

@@ -6,6 +6,7 @@ import type { IRun, IWorkflowBase, WorkflowExecuteMode } from 'n8n-workflow';
import type { IWorkflowErrorData } from '@/interfaces';
import { OwnershipService } from '@/services/ownership.service';
import { UrlService } from '@/services/url.service';
// eslint-disable-next-line import/no-cycle
import { WorkflowExecutionService } from '@/workflows/workflow-execution.service';
/**

View File

@@ -16,6 +16,7 @@ import { WorkflowStatisticsService } from '@/services/workflow-statistics.servic
import { isWorkflowIdValid } from '@/utils';
import { WorkflowStaticDataService } from '@/workflows/workflow-static-data.service';
// eslint-disable-next-line import/no-cycle
import { executeErrorWorkflow } from './execute-error-workflow';
import { restoreBinaryDataId } from './restore-binary-data-id';
import { saveExecutionProgress } from './save-execution-progress';

View File

@@ -12,6 +12,7 @@ import { UserError, PROJECT_ROOT } from 'n8n-workflow';
import { FolderNotFoundError } from '@/errors/folder-not-found.error';
import type { ListQuery } from '@/requests';
// eslint-disable-next-line import/no-cycle
import { WorkflowService } from '@/workflows/workflow.service';
export interface SimpleFolderNode {

View File

@@ -50,12 +50,14 @@ export class ProjectService {
) {}
private get workflowService() {
// eslint-disable-next-line import/no-cycle
return import('@/workflows/workflow.service').then(({ WorkflowService }) =>
Container.get(WorkflowService),
);
}
private get credentialsService() {
// eslint-disable-next-line import/no-cycle
return import('@/credentials/credentials.service').then(({ CredentialsService }) =>
Container.get(CredentialsService),
);

View File

@@ -35,6 +35,7 @@ import { ActiveExecutions } from '@/active-executions';
import { CredentialsHelper } from '@/credentials-helper';
import { EventService } from '@/events/event.service';
import type { AiEventMap, AiEventPayload } from '@/events/maps/ai.event-map';
// eslint-disable-next-line import/no-cycle
import { getLifecycleHooksForSubExecutions } from '@/execution-lifecycle/execution-lifecycle-hooks';
import { ExecutionDataService } from '@/executions/execution-data.service';
import {

View File

@@ -22,6 +22,7 @@ import { ActiveExecutions } from '@/active-executions';
import config from '@/config';
import { ExecutionNotFoundError } from '@/errors/execution-not-found-error';
import { MaxStalledCountError } from '@/errors/max-stalled-count.error';
// eslint-disable-next-line import/no-cycle
import {
getLifecycleHooksForRegularMain,
getLifecycleHooksForScalingWorker,

View File

@@ -32,6 +32,7 @@ import { validateEntity } from '@/generic-helpers';
import type { ListQuery } from '@/requests';
import { hasSharing } from '@/requests';
import { OwnershipService } from '@/services/ownership.service';
// eslint-disable-next-line import/no-cycle
import { ProjectService } from '@/services/project.service.ee';
import { RoleService } from '@/services/role.service';
import { TagService } from '@/services/tag.service';