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:
Iván Ovejero
2022-12-29 12:20:43 +01:00
committed by GitHub
parent a7868ae77d
commit d9b98fc8be
239 changed files with 772 additions and 714 deletions

View File

@@ -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: 'Cant 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('Cant get data for expression', {
messageTemplate: `Cant get data for expression under %%PARAMETER%% field`,
messageTemplate: 'Cant get data for expression under %%PARAMETER%% field',
functionality: 'pairedItem',
functionOverrides: {
message: 'Cant get data',
@@ -756,7 +756,7 @@ export class WorkflowDataProxy {
if (itemPreviousNode.pairedItem === undefined) {
throw createExpressionError('Cant get data for expression', {
messageTemplate: `Cant get data for expression under %%PARAMETER%% field`,
messageTemplate: 'Cant get data for expression under %%PARAMETER%% field',
functionality: 'pairedItem',
functionOverrides: {
message: 'Cant get data',
@@ -834,10 +834,10 @@ export class WorkflowDataProxy {
});
}
throw createExpressionError('Cant get data for expression', {
messageTemplate: `Cant get data for expression under %%PARAMETER%% field`,
messageTemplate: 'Cant get data for expression under %%PARAMETER%% field',
functionality: 'pairedItem',
functionOverrides: {
message: `Cant get data`,
message: 'Cant 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('Cant get data for expression', {
messageTemplate: `Cant get data for expression under %%PARAMETER%% field`,
messageTemplate: 'Cant get data for expression under %%PARAMETER%% field',
functionality: 'pairedItem',
functionOverrides: {
message: `Cant get data`,
message: 'Cant 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('Cant get data for expression', {
messageTemplate: `Cant get data for expression under %%PARAMETER%% field`,
messageTemplate: 'Cant get data for expression under %%PARAMETER%% field',
functionality: 'pairedItem',
functionOverrides: {
message: `Cant get data`,
message: 'Cant 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('Cant get data for expression', {
messageTemplate: `Cant get data for expression under %%PARAMETER%% field`,
messageTemplate: 'Cant get data for expression under %%PARAMETER%% field',
functionality: 'pairedItem',
functionOverrides: {
message: `Cant get data`,
message: 'Cant get data',
},
nodeCause: nodeBeforeLast,
description: `In node <strong>${nodeBeforeLast!}</strong>, output item ${
@@ -952,11 +952,11 @@ export class WorkflowDataProxy {
if (pairedItem === undefined) {
throw createExpressionError('Cant get data for expression', {
messageTemplate: `Cant get data for expression under %%PARAMETER%% field`,
messageTemplate: 'Cant 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: `Cant get data`,
message: 'Cant 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 didnt supply it)`,
@@ -969,10 +969,11 @@ export class WorkflowDataProxy {
messageTemplate: 'Cant get data for expression under %%PARAMETER%% field',
functionality: 'pairedItem',
functionOverrides: {
message: `Cant get data`,
message: 'Cant 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: 'Cant 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,
});
}