mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 01:56:46 +00:00
refactor: Lint for no unneeded backticks (#5057) (no-changelog)
* ✨ Create rule `no-unneeded-backticks` * 👕 Enable rule * ⚡ Run rule on `cli` * ⚡ Run rule on `core` * ⚡ Run rule on `workflow` * ⚡ Rule rule on `design-system` * ⚡ Run rule on `node-dev` * ⚡ Run rule on `editor-ui` * ⚡ Run rule on `nodes-base`
This commit is contained in:
@@ -404,7 +404,7 @@ export function getContext(
|
||||
key = 'flow';
|
||||
} else if (type === 'node') {
|
||||
if (node === undefined) {
|
||||
throw new Error(`The request data of context type "node" the node parameter has to be set!`);
|
||||
throw new Error('The request data of context type "node" the node parameter has to be set!');
|
||||
}
|
||||
key = `node:${node.name}`;
|
||||
} else {
|
||||
@@ -1071,7 +1071,7 @@ export function nodeIssuesToString(issues: INodeIssues, node?: INode): string[]
|
||||
const nodeIssues = [];
|
||||
|
||||
if (issues.execution !== undefined) {
|
||||
nodeIssues.push(`Execution Error.`);
|
||||
nodeIssues.push('Execution Error.');
|
||||
}
|
||||
|
||||
const objectProperties = ['parameters', 'credentials'];
|
||||
@@ -1092,7 +1092,7 @@ export function nodeIssuesToString(issues: INodeIssues, node?: INode): string[]
|
||||
if (node !== undefined) {
|
||||
nodeIssues.push(`Node Type "${node.type}" is not known.`);
|
||||
} else {
|
||||
nodeIssues.push(`Node Type is not known.`);
|
||||
nodeIssues.push('Node Type is not known.');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -318,7 +318,7 @@ export class Workflow {
|
||||
} else if (type === 'node') {
|
||||
if (node === undefined) {
|
||||
throw new Error(
|
||||
`The request data of context type "node" the node parameter has to be set!`,
|
||||
'The request data of context type "node" the node parameter has to be set!',
|
||||
);
|
||||
}
|
||||
key = `node:${node.name}`;
|
||||
|
||||
@@ -132,7 +132,7 @@ export class WorkflowDataProxy {
|
||||
|
||||
if (!that.runExecutionData?.executionData) {
|
||||
throw new ExpressionError(
|
||||
`The workflow hasn't been executed yet, so you can't reference any context data`,
|
||||
"The workflow hasn't been executed yet, so you can't reference any context data",
|
||||
{
|
||||
runIndex: that.runIndex,
|
||||
itemIndex: that.itemIndex,
|
||||
@@ -283,7 +283,7 @@ export class WorkflowDataProxy {
|
||||
|
||||
if (that.runExecutionData === null) {
|
||||
throw new ExpressionError(
|
||||
`The workflow hasn't been executed yet, so you can't reference any output data`,
|
||||
"The workflow hasn't been executed yet, so you can't reference any output data",
|
||||
{
|
||||
runIndex: that.runIndex,
|
||||
itemIndex: that.itemIndex,
|
||||
@@ -319,7 +319,7 @@ export class WorkflowDataProxy {
|
||||
|
||||
if (taskData.main === null || !taskData.main.length || taskData.main[0] === null) {
|
||||
// throw new Error(`No data found for item-index: "${itemIndex}"`);
|
||||
throw new ExpressionError(`No data found from "main" input.`, {
|
||||
throw new ExpressionError('No data found from "main" input.', {
|
||||
runIndex: that.runIndex,
|
||||
itemIndex: that.itemIndex,
|
||||
});
|
||||
@@ -546,7 +546,7 @@ export class WorkflowDataProxy {
|
||||
|
||||
if (value === undefined && name === 'id') {
|
||||
throw new ExpressionError('save workflow to view', {
|
||||
description: `Please save the workflow first to use $workflow`,
|
||||
description: 'Please save the workflow first to use $workflow',
|
||||
runIndex: that.runIndex,
|
||||
itemIndex: that.itemIndex,
|
||||
failExecution: true,
|
||||
@@ -723,7 +723,7 @@ export class WorkflowDataProxy {
|
||||
message: 'Can’t get data',
|
||||
},
|
||||
nodeCause: nodeBeforeLast,
|
||||
description: `Apologies, this is an internal error. See details for more information`,
|
||||
description: 'Apologies, this is an internal error. See details for more information',
|
||||
causeDetailed: 'Referencing a non-existent output on a node, problem with source data',
|
||||
type: 'internal',
|
||||
});
|
||||
@@ -731,7 +731,7 @@ export class WorkflowDataProxy {
|
||||
|
||||
if (pairedItem.item >= taskData.data!.main[previousNodeOutput]!.length) {
|
||||
throw createExpressionError('Can’t get data for expression', {
|
||||
messageTemplate: `Can’t get data for expression under ‘%%PARAMETER%%’ field`,
|
||||
messageTemplate: 'Can’t get data for expression under ‘%%PARAMETER%%’ field',
|
||||
functionality: 'pairedItem',
|
||||
functionOverrides: {
|
||||
message: 'Can’t get data',
|
||||
@@ -756,7 +756,7 @@ export class WorkflowDataProxy {
|
||||
|
||||
if (itemPreviousNode.pairedItem === undefined) {
|
||||
throw createExpressionError('Can’t get data for expression', {
|
||||
messageTemplate: `Can’t get data for expression under ‘%%PARAMETER%%’ field`,
|
||||
messageTemplate: 'Can’t get data for expression under ‘%%PARAMETER%%’ field',
|
||||
functionality: 'pairedItem',
|
||||
functionOverrides: {
|
||||
message: 'Can’t get data',
|
||||
@@ -834,10 +834,10 @@ export class WorkflowDataProxy {
|
||||
});
|
||||
}
|
||||
throw createExpressionError('Can’t get data for expression', {
|
||||
messageTemplate: `Can’t get data for expression under ‘%%PARAMETER%%’ field`,
|
||||
messageTemplate: 'Can’t get data for expression under ‘%%PARAMETER%%’ field',
|
||||
functionality: 'pairedItem',
|
||||
functionOverrides: {
|
||||
message: `Can’t get data`,
|
||||
message: 'Can’t get data',
|
||||
},
|
||||
nodeCause: nodeBeforeLast,
|
||||
description: `In node ‘<strong>${sourceData.previousNode}</strong>’, output item ${
|
||||
@@ -861,13 +861,13 @@ export class WorkflowDataProxy {
|
||||
|
||||
if (sourceData === null) {
|
||||
throw createExpressionError('Can’t get data for expression', {
|
||||
messageTemplate: `Can’t get data for expression under ‘%%PARAMETER%%’ field`,
|
||||
messageTemplate: 'Can’t get data for expression under ‘%%PARAMETER%%’ field',
|
||||
functionality: 'pairedItem',
|
||||
functionOverrides: {
|
||||
message: `Can’t get data`,
|
||||
message: 'Can’t get data',
|
||||
},
|
||||
nodeCause: nodeBeforeLast,
|
||||
description: `Could not resolve, proably no pairedItem exists`,
|
||||
description: 'Could not resolve, proably no pairedItem exists',
|
||||
type: 'no pairing info',
|
||||
moreInfoLink: true,
|
||||
});
|
||||
@@ -881,12 +881,12 @@ export class WorkflowDataProxy {
|
||||
const previousNodeOutput = sourceData.previousNodeOutput || 0;
|
||||
if (previousNodeOutput >= taskData.data!.main.length) {
|
||||
throw createExpressionError('Can’t get data for expression', {
|
||||
messageTemplate: `Can’t get data for expression under ‘%%PARAMETER%%’ field`,
|
||||
messageTemplate: 'Can’t get data for expression under ‘%%PARAMETER%%’ field',
|
||||
functionality: 'pairedItem',
|
||||
functionOverrides: {
|
||||
message: `Can’t get data`,
|
||||
message: 'Can’t get data',
|
||||
},
|
||||
description: `Item points to a node output which does not exist`,
|
||||
description: 'Item points to a node output which does not exist',
|
||||
causeDetailed: `The sourceData points to a node output ‘${previousNodeOutput}‘ which does not exist on node ‘${sourceData.previousNode}‘ (output node did probably supply a wrong one)`,
|
||||
type: 'invalid pairing info',
|
||||
});
|
||||
@@ -894,10 +894,10 @@ export class WorkflowDataProxy {
|
||||
|
||||
if (pairedItem.item >= taskData.data!.main[previousNodeOutput]!.length) {
|
||||
throw createExpressionError('Can’t get data for expression', {
|
||||
messageTemplate: `Can’t get data for expression under ‘%%PARAMETER%%’ field`,
|
||||
messageTemplate: 'Can’t get data for expression under ‘%%PARAMETER%%’ field',
|
||||
functionality: 'pairedItem',
|
||||
functionOverrides: {
|
||||
message: `Can’t get data`,
|
||||
message: 'Can’t get data',
|
||||
},
|
||||
nodeCause: nodeBeforeLast,
|
||||
description: `In node ‘<strong>${nodeBeforeLast!}</strong>’, output item ${
|
||||
@@ -952,11 +952,11 @@ export class WorkflowDataProxy {
|
||||
|
||||
if (pairedItem === undefined) {
|
||||
throw createExpressionError('Can’t get data for expression', {
|
||||
messageTemplate: `Can’t get data for expression under ‘%%PARAMETER%%’ field`,
|
||||
messageTemplate: 'Can’t get data for expression under ‘%%PARAMETER%%’ field',
|
||||
functionality: 'pairedItem',
|
||||
functionOverrides: {
|
||||
description: `To fetch the data from other nodes that this code needs, more information is needed from the node ‘<strong>${that.activeNodeName}</strong>‘`,
|
||||
message: `Can’t get data`,
|
||||
message: 'Can’t get data',
|
||||
},
|
||||
description: `To fetch the data from other nodes that this expression needs, more information is needed from the node ‘<strong>${that.activeNodeName}</strong>‘`,
|
||||
causeDetailed: `Missing pairedItem data (node ‘${that.activeNodeName}‘ probably didn’t supply it)`,
|
||||
@@ -969,10 +969,11 @@ export class WorkflowDataProxy {
|
||||
messageTemplate: 'Can’t get data for expression under ‘%%PARAMETER%%’ field',
|
||||
functionality: 'pairedItem',
|
||||
functionOverrides: {
|
||||
message: `Can’t get data`,
|
||||
message: 'Can’t get data',
|
||||
},
|
||||
description: `Apologies, this is an internal error. See details for more information`,
|
||||
causeDetailed: `Missing sourceData (probably an internal error)`,
|
||||
description:
|
||||
'Apologies, this is an internal error. See details for more information',
|
||||
causeDetailed: 'Missing sourceData (probably an internal error)',
|
||||
itemIndex,
|
||||
});
|
||||
}
|
||||
@@ -1099,8 +1100,9 @@ export class WorkflowDataProxy {
|
||||
functionOverrides: {
|
||||
message: 'Can’t get data',
|
||||
},
|
||||
description: `Apologies, this is an internal error. See details for more information`,
|
||||
causeDetailed: `Missing sourceData (probably an internal error)`,
|
||||
description:
|
||||
'Apologies, this is an internal error. See details for more information',
|
||||
causeDetailed: 'Missing sourceData (probably an internal error)',
|
||||
runIndex: that.runIndex,
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user