refactor: Impose import/order linting rule across nodes packages (no-changelog) (#12314)

This commit is contained in:
कारतोफ्फेलस्क्रिप्ट™
2024-12-19 18:46:14 +01:00
committed by GitHub
parent 8c635993bd
commit bafac73eb5
1120 changed files with 2677 additions and 2827 deletions

View File

@@ -1,4 +1,5 @@
import type { IDataObject, INode } from 'n8n-workflow';
import { createMockExecuteFunction } from '../../../../test/nodes/Helpers';
import * as mode from '../../v3/actions/mode';

View File

@@ -1,5 +1,4 @@
import get from 'lodash/get';
import type {
IExecuteFunctions,
GenericValue,
@@ -11,9 +10,10 @@ import type {
} from 'n8n-workflow';
import { NodeConnectionType, deepCopy } from 'n8n-workflow';
import { generatePairedItemData } from '../../../utils/utilities';
import { oldVersionNotice } from '@utils/descriptions';
import { generatePairedItemData } from '../../../utils/utilities';
export class MergeV1 implements INodeType {
description: INodeTypeDescription;

View File

@@ -1,5 +1,4 @@
import merge from 'lodash/merge';
import {
type IExecuteFunctions,
type IDataObject,
@@ -11,13 +10,15 @@ import {
NodeConnectionType,
} from 'n8n-workflow';
import { preparePairedItemDataArray } from '@utils/utilities';
import { optionsDescription } from './descriptions';
import type {
ClashResolveOptions,
MatchFieldsJoinMode,
MatchFieldsOptions,
MatchFieldsOutput,
} from './interfaces';
import {
addSourceField,
addSuffixToEntriesKeys,
@@ -28,9 +29,6 @@ import {
selectMergeMethod,
} from './utils';
import { optionsDescription } from './descriptions';
import { preparePairedItemDataArray } from '@utils/utilities';
export class MergeV2 implements INodeType {
description: INodeTypeDescription;

View File

@@ -1,4 +1,8 @@
import { ApplicationError } from 'n8n-workflow';
import assign from 'lodash/assign';
import assignWith from 'lodash/assignWith';
import get from 'lodash/get';
import merge from 'lodash/merge';
import mergeWith from 'lodash/mergeWith';
import type {
GenericValue,
IBinaryKeyData,
@@ -6,15 +10,11 @@ import type {
INodeExecutionData,
IPairedItemData,
} from 'n8n-workflow';
import { ApplicationError } from 'n8n-workflow';
import assign from 'lodash/assign';
import assignWith from 'lodash/assignWith';
import get from 'lodash/get';
import merge from 'lodash/merge';
import mergeWith from 'lodash/mergeWith';
import { fuzzyCompare, preparePairedItemDataArray } from '@utils/utilities';
import type { ClashResolveOptions, MatchFieldsJoinMode, MatchFieldsOptions } from './interfaces';
import { fuzzyCompare, preparePairedItemDataArray } from '@utils/utilities';
type PairToMatch = {
field1: string;

View File

@@ -5,8 +5,8 @@ import type {
INodeTypeDescription,
} from 'n8n-workflow';
import { versionDescription } from './actions/versionDescription';
import { router } from './actions/router';
import { versionDescription } from './actions/versionDescription';
import { loadOptions } from './methods';
export class MergeV3 implements INodeType {

View File

@@ -4,9 +4,10 @@ import {
type INodeProperties,
} from 'n8n-workflow';
import { numberInputsProperty } from '../../helpers/descriptions';
import { updateDisplayOptions } from '@utils/utilities';
import { numberInputsProperty } from '../../helpers/descriptions';
export const properties: INodeProperties[] = [numberInputsProperty];
const displayOptions = {

View File

@@ -1,9 +1,10 @@
import { NodeOperationError } from 'n8n-workflow';
import type { IExecuteFunctions, INodeExecutionData, INodeProperties } from 'n8n-workflow';
import { numberInputsProperty } from '../../helpers/descriptions';
import { preparePairedItemDataArray, updateDisplayOptions } from '@utils/utilities';
import { numberInputsProperty } from '../../helpers/descriptions';
export const properties: INodeProperties[] = [
numberInputsProperty,
{

View File

@@ -1,3 +1,4 @@
import merge from 'lodash/merge';
import type {
IExecuteFunctions,
INodeExecutionData,
@@ -5,12 +6,11 @@ import type {
IPairedItemData,
} from 'n8n-workflow';
import merge from 'lodash/merge';
import type { ClashResolveOptions } from '../../helpers/interfaces';
import { updateDisplayOptions } from '@utils/utilities';
import { clashHandlingProperties, fuzzyCompareProperty } from '../../helpers/descriptions';
import type { ClashResolveOptions } from '../../helpers/interfaces';
import { addSuffixToEntriesKeys, selectMergeMethod } from '../../helpers/utils';
import { updateDisplayOptions } from '@utils/utilities';
export const properties: INodeProperties[] = [
{

View File

@@ -5,13 +5,15 @@ import type {
INodeProperties,
} from 'n8n-workflow';
import { updateDisplayOptions } from '@utils/utilities';
import { clashHandlingProperties, fuzzyCompareProperty } from '../../helpers/descriptions';
import type {
ClashResolveOptions,
MatchFieldsJoinMode,
MatchFieldsOptions,
MatchFieldsOutput,
} from '../../helpers/interfaces';
import { clashHandlingProperties, fuzzyCompareProperty } from '../../helpers/descriptions';
import {
addSourceField,
addSuffixToEntriesKeys,
@@ -20,7 +22,6 @@ import {
findMatches,
mergeMatched,
} from '../../helpers/utils';
import { updateDisplayOptions } from '@utils/utilities';
const multipleMatchesProperty: INodeProperties = {
displayName: 'Multiple Matches',

View File

@@ -1,3 +1,4 @@
import merge from 'lodash/merge';
import {
NodeExecutionOutput,
type IExecuteFunctions,
@@ -6,12 +7,11 @@ import {
type IPairedItemData,
} from 'n8n-workflow';
import merge from 'lodash/merge';
import type { ClashResolveOptions } from '../../helpers/interfaces';
import { updateDisplayOptions } from '@utils/utilities';
import { clashHandlingProperties, numberInputsProperty } from '../../helpers/descriptions';
import type { ClashResolveOptions } from '../../helpers/interfaces';
import { addSuffixToEntriesKeys, selectMergeMethod } from '../../helpers/utils';
import { updateDisplayOptions } from '@utils/utilities';
export const properties: INodeProperties[] = [
numberInputsProperty,

View File

@@ -1,3 +1,5 @@
import alasql from 'alasql';
import type { Database } from 'alasql';
import type {
IDataObject,
IExecuteFunctions,
@@ -7,11 +9,10 @@ import type {
} from 'n8n-workflow';
import { NodeOperationError } from 'n8n-workflow';
import alasql from 'alasql';
import type { Database } from 'alasql';
import { numberInputsProperty } from '../../helpers/descriptions';
import { getResolvables, updateDisplayOptions } from '@utils/utilities';
import { numberInputsProperty } from '../../helpers/descriptions';
export const properties: INodeProperties[] = [
numberInputsProperty,
{

View File

@@ -4,8 +4,8 @@ import * as append from './append';
import * as chooseBranch from './chooseBranch';
import * as combineAll from './combineAll';
import * as combineByFields from './combineByFields';
import * as combineBySql from './combineBySql';
import * as combineByPosition from './combineByPosition';
import * as combineBySql from './combineBySql';
export { append, chooseBranch, combineAll, combineByFields, combineBySql, combineByPosition };

View File

@@ -1,7 +1,8 @@
import type { IExecuteFunctions } from 'n8n-workflow';
import { getNodeInputsData } from '../helpers/utils';
import type { MergeType } from './node.type';
import * as mode from './mode';
import type { MergeType } from './node.type';
import { getNodeInputsData } from '../helpers/utils';
export async function router(this: IExecuteFunctions) {
const inputsData = getNodeInputsData.call(this);

View File

@@ -1,8 +1,8 @@
/* eslint-disable n8n-nodes-base/node-filename-against-convention */
import { NodeConnectionType, type INodeTypeDescription } from 'n8n-workflow';
import { configuredInputs } from '../helpers/utils';
import * as mode from './mode';
import { configuredInputs } from '../helpers/utils';
export const versionDescription: INodeTypeDescription = {
displayName: 'Merge',

View File

@@ -1,4 +1,8 @@
import { ApplicationError, NodeConnectionType, NodeHelpers } from 'n8n-workflow';
import assign from 'lodash/assign';
import assignWith from 'lodash/assignWith';
import get from 'lodash/get';
import merge from 'lodash/merge';
import mergeWith from 'lodash/mergeWith';
import type {
GenericValue,
IBinaryKeyData,
@@ -8,15 +12,11 @@ import type {
INodeParameters,
IPairedItemData,
} from 'n8n-workflow';
import { ApplicationError, NodeConnectionType, NodeHelpers } from 'n8n-workflow';
import assign from 'lodash/assign';
import assignWith from 'lodash/assignWith';
import get from 'lodash/get';
import merge from 'lodash/merge';
import mergeWith from 'lodash/mergeWith';
import { fuzzyCompare, preparePairedItemDataArray } from '@utils/utilities';
import type { ClashResolveOptions, MatchFieldsJoinMode, MatchFieldsOptions } from './interfaces';
import { fuzzyCompare, preparePairedItemDataArray } from '@utils/utilities';
type PairToMatch = {
field1: string;