mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 10:02:05 +00:00
refactor: Integrate consistent-type-imports in BE packages (no-changelog) (#5270)
This commit is contained in:
@@ -9,6 +9,7 @@ module.exports = {
|
||||
...sharedOptions(__dirname),
|
||||
|
||||
rules: {
|
||||
'@typescript-eslint/consistent-type-imports': 'error',
|
||||
'import/order': 'off', // TODO: remove this
|
||||
},
|
||||
};
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import * as tmpl from '@n8n_io/riot-tmpl';
|
||||
import { DateTime, Duration, Interval } from 'luxon';
|
||||
|
||||
import {
|
||||
import type {
|
||||
IExecuteData,
|
||||
INode,
|
||||
INodeExecutionData,
|
||||
@@ -20,12 +20,8 @@ import type { Workflow } from './Workflow';
|
||||
|
||||
// eslint-disable-next-line import/no-cycle
|
||||
import { extend, hasExpressionExtension, hasNativeMethod } from './Extensions';
|
||||
import {
|
||||
ExpressionChunk,
|
||||
ExpressionCode,
|
||||
joinExpression,
|
||||
splitExpression,
|
||||
} from './Extensions/ExpressionParser';
|
||||
import type { ExpressionChunk, ExpressionCode } from './Extensions/ExpressionParser';
|
||||
import { joinExpression, splitExpression } from './Extensions/ExpressionParser';
|
||||
import { extendTransform } from './Extensions/ExpressionExtension';
|
||||
import { extendedFunctions } from './Extensions/ExtendedFunctions';
|
||||
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
/* eslint-disable @typescript-eslint/unbound-method */
|
||||
/* eslint-disable @typescript-eslint/explicit-member-accessibility */
|
||||
import {
|
||||
DateTime,
|
||||
import type {
|
||||
DateTimeFormatOptions,
|
||||
DateTimeUnit,
|
||||
Duration,
|
||||
@@ -9,6 +8,7 @@ import {
|
||||
DurationObjectUnits,
|
||||
LocaleOptions,
|
||||
} from 'luxon';
|
||||
import { DateTime } from 'luxon';
|
||||
import type { ExtensionMap } from './Extensions';
|
||||
|
||||
type DurationUnit =
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* @jest-environment jsdom
|
||||
*/
|
||||
|
||||
import { ExtensionMap } from './Extensions';
|
||||
import type { ExtensionMap } from './Extensions';
|
||||
|
||||
function format(value: number, extraArgs: unknown[]): string {
|
||||
const [locales = 'en-US', config = {}] = extraArgs as [
|
||||
|
||||
@@ -15,7 +15,7 @@ import type { WorkflowActivationError } from './WorkflowActivationError';
|
||||
import type { WorkflowOperationError } from './WorkflowErrors';
|
||||
import type { NodeApiError, NodeOperationError } from './NodeErrors';
|
||||
import type { ExpressionError } from './ExpressionError';
|
||||
import { PathLike } from 'fs';
|
||||
import type { PathLike } from 'fs';
|
||||
|
||||
export interface IAdditionalCredentialOptions {
|
||||
oauth2?: IOAuth2Options;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* eslint-disable @typescript-eslint/explicit-module-boundary-types */
|
||||
import { ILogger, LogTypes } from './Interfaces';
|
||||
import type { ILogger, LogTypes } from './Interfaces';
|
||||
|
||||
let logger: ILogger | undefined;
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { DateTime } from 'luxon';
|
||||
import { INodeCredentials } from './Interfaces';
|
||||
import type { DateTime } from 'luxon';
|
||||
import type { INodeCredentials } from './Interfaces';
|
||||
|
||||
// ===============================
|
||||
// General Enums And Interfaces
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
/* eslint-disable @typescript-eslint/no-unsafe-assignment */
|
||||
// eslint-disable-next-line max-classes-per-file
|
||||
import { parseString } from 'xml2js';
|
||||
import { IDataObject, INode, IStatusCodeMessages, JsonObject } from './Interfaces';
|
||||
import type { IDataObject, INode, IStatusCodeMessages, JsonObject } from './Interfaces';
|
||||
|
||||
/**
|
||||
* Top-level properties where an error message can be found in an API response.
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
import get from 'lodash.get';
|
||||
import isEqual from 'lodash.isequal';
|
||||
|
||||
import {
|
||||
import type {
|
||||
IContextObject,
|
||||
INode,
|
||||
INodeCredentialDescription,
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
/* eslint-disable @typescript-eslint/no-shadow */
|
||||
/* eslint-disable no-param-reassign */
|
||||
/* eslint-disable no-underscore-dangle */
|
||||
import { IDataObject, IObservableObject } from './Interfaces';
|
||||
import type { IDataObject, IObservableObject } from './Interfaces';
|
||||
|
||||
interface IObservableOptions {
|
||||
ignoreEmptyOnFirstChild?: boolean;
|
||||
|
||||
@@ -13,7 +13,7 @@ import get from 'lodash.get';
|
||||
import merge from 'lodash.merge';
|
||||
import set from 'lodash.set';
|
||||
|
||||
import {
|
||||
import type {
|
||||
ICredentialDataDecryptedObject,
|
||||
ICredentialsDecrypted,
|
||||
IHttpRequestOptions,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import {
|
||||
import type {
|
||||
IConnection,
|
||||
INode,
|
||||
INodeNameIndex,
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
/* eslint-disable no-continue */
|
||||
/* eslint-disable no-restricted-syntax */
|
||||
|
||||
import {
|
||||
import type {
|
||||
IConnections,
|
||||
IExecuteResponsePromiseData,
|
||||
IGetExecuteTriggerFunctions,
|
||||
@@ -49,7 +49,7 @@ import {
|
||||
IRunNodeResponse,
|
||||
NodeParameterValueType,
|
||||
} from './Interfaces';
|
||||
import { IDeferredPromise } from './DeferredPromise';
|
||||
import type { IDeferredPromise } from './DeferredPromise';
|
||||
|
||||
import * as NodeHelpers from './NodeHelpers';
|
||||
import * as ObservableObject from './ObservableObject';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { INode } from './Interfaces';
|
||||
import type { INode } from './Interfaces';
|
||||
import { ExecutionBaseError } from './NodeErrors';
|
||||
|
||||
interface WorkflowActivationErrorOptions {
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
import { DateTime, Duration, Interval, Settings } from 'luxon';
|
||||
import * as jmespath from 'jmespath';
|
||||
|
||||
import {
|
||||
import type {
|
||||
IDataObject,
|
||||
IExecuteData,
|
||||
INodeExecutionData,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import {
|
||||
import type {
|
||||
IWorkflowBase,
|
||||
IWorkflowExecuteHooks,
|
||||
IWorkflowHooksOptionalParameters,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import {
|
||||
import type {
|
||||
INodeProperties,
|
||||
INodePropertyOptions,
|
||||
INodePropertyCollection,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { BinaryFileType } from './Interfaces';
|
||||
import type { BinaryFileType } from './Interfaces';
|
||||
|
||||
export type Primitives = string | number | boolean | bigint | symbol | null | undefined;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user