👕 Fix lint issue

This commit is contained in:
Jan Oberhauser
2020-10-22 15:46:03 +02:00
parent 5b7efd67ca
commit 40c2acd77b
491 changed files with 4045 additions and 3936 deletions

View File

@@ -114,7 +114,7 @@ export class Expression {
const runData: IRunExecutionData = {
resultData: {
runData: {},
}
},
};
return this.getParameterValue(parameterValue, runData, runIndex, itemIndex, node.name, connectionInputData) as boolean | number | string | undefined;
@@ -144,7 +144,7 @@ export class Expression {
const runData: IRunExecutionData = {
resultData: {
runData: {},
}
},
};
// Resolve the "outer" main values

View File

@@ -1,10 +1,10 @@
import {
IContextObject,
INodeCredentialDescription,
INode,
INodeCredentialDescription,
INodeExecutionData,
INodeIssues,
INodeIssueObjectProperty,
INodeIssues,
INodeParameters,
INodeProperties,
INodePropertyCollection,
@@ -238,11 +238,11 @@ export function getSpecialNodeParameters(nodeType: INodeType) {
options: [
{
name: 'Minutes',
value: 'minutes'
value: 'minutes',
},
{
name: 'Hours',
value: 'hours'
value: 'hours',
},
],
default: 'hours',
@@ -346,7 +346,7 @@ export function displayParameterPath(nodeValues: INodeParameters, parameter: INo
if (path !== '') {
resolvedNodeValues = get(
nodeValues,
path,
path
) as INodeParameters;
}
@@ -355,7 +355,7 @@ export function displayParameterPath(nodeValues: INodeParameters, parameter: INo
if (path && path.split('.').indexOf('parameters') === 0) {
nodeValuesRoot = get(
nodeValues,
'parameters',
'parameters'
) as INodeParameters;
}
@@ -998,7 +998,7 @@ export function addToIssuesIfMissing(foundIssues: INodeIssues, nodeProperties: I
export function getParameterValueByPath(nodeValues: INodeParameters, parameterName: string, path: string) {
return get(
nodeValues,
path ? path + '.' + parameterName : parameterName,
path ? path + '.' + parameterName : parameterName
);
}

View File

@@ -4,11 +4,11 @@ import {
IConnections,
IGetExecuteTriggerFunctions,
INode,
INodes,
INodeExecuteFunctions,
INodeExecutionData,
INodeIssues,
INodeParameters,
INodes,
INodeType,
INodeTypes,
IPollFunctions,
@@ -129,7 +129,7 @@ export class Workflow {
returnConnection[connectionInfo.node][connectionInfo.type][connectionInfo.index].push({
node: sourceNode,
type,
index: parseInt(inputIndex, 10)
index: parseInt(inputIndex, 10),
});
}
}

View File

@@ -63,7 +63,7 @@ export class WorkflowDataProxy {
}
return contextData[name];
}
},
});
}
@@ -101,7 +101,7 @@ export class WorkflowDataProxy {
}
return returnValue;
}
},
});
}
@@ -252,7 +252,7 @@ export class WorkflowDataProxy {
}
return Reflect.get(target, name, receiver);
}
},
});
}
@@ -269,7 +269,7 @@ export class WorkflowDataProxy {
return new Proxy({}, {
get(target, name, receiver) {
return process.env[name.toString()];
}
},
});
}
@@ -298,7 +298,7 @@ export class WorkflowDataProxy {
// @ts-ignore
return that.workflow[name.toString()];
}
},
});
}
@@ -316,7 +316,7 @@ export class WorkflowDataProxy {
return new Proxy({}, {
get(target, name, receiver) {
return that.nodeDataGetter(name.toString());
}
},
});
}
@@ -375,7 +375,7 @@ export class WorkflowDataProxy {
}
return Reflect.get(target, name, receiver);
}
},
});
}
}

View File

@@ -1,7 +1,7 @@
import {
INodeType,
INodeTypes,
INodeTypeData,
INodeTypes,
} from '../src';
export interface INodeTypesObject {
@@ -38,10 +38,10 @@ class NodeTypesClass implements INodeTypes {
name: 'value2',
type: 'string',
default: 'default-value2',
}
]
}
}
},
],
},
},
},
'test.setMulti': {
sourcePath: '',
@@ -86,13 +86,13 @@ class NodeTypesClass implements INodeTypes {
default: '',
placeholder: 'The string value to write in the property.',
},
]
],
},
],
},
]
}
}
],
},
},
},
};

View File

@@ -1,8 +1,8 @@
import {
NodeHelpers,
INodeParameters,
INodeProperties,
NodeHelpers,
} from '../src';
describe('Workflow', () => {
@@ -178,7 +178,7 @@ describe('Workflow', () => {
displayOptions: {
show: {
boolean1: [
true
true,
],
},
},
@@ -230,7 +230,7 @@ describe('Workflow', () => {
displayOptions: {
hide: {
boolean1: [
true
true,
],
},
},
@@ -278,7 +278,7 @@ describe('Workflow', () => {
displayOptions: {
show: {
boolean1: [
true
true,
],
},
},
@@ -327,7 +327,7 @@ describe('Workflow', () => {
displayOptions: {
show: {
mode: [
'mode1'
'mode1',
],
},
},
@@ -373,7 +373,7 @@ describe('Workflow', () => {
displayOptions: {
show: {
string1: [
'default string1'
'default string1',
],
},
},
@@ -386,7 +386,7 @@ describe('Workflow', () => {
displayOptions: {
show: {
boolean1: [
true
true,
],
},
},
@@ -437,7 +437,7 @@ describe('Workflow', () => {
displayOptions: {
show: {
string1: [
'default string1'
'default string1',
],
},
},
@@ -450,7 +450,7 @@ describe('Workflow', () => {
displayOptions: {
show: {
boolean1: [
true
true,
],
},
},
@@ -498,7 +498,7 @@ describe('Workflow', () => {
displayOptions: {
show: {
mode: [
'mode1'
'mode1',
],
},
},
@@ -546,7 +546,7 @@ describe('Workflow', () => {
displayOptions: {
show: {
mode: [
'mode2'
'mode2',
],
},
},
@@ -591,7 +591,7 @@ describe('Workflow', () => {
displayOptions: {
show: {
mode: [
'mode2'
'mode2',
],
},
},
@@ -711,7 +711,7 @@ describe('Workflow', () => {
values: {
number: [
{
number1: 1
number1: 1,
},
],
},
@@ -794,7 +794,7 @@ describe('Workflow', () => {
values: {
number: {
number1: 1,
}
},
},
},
},
@@ -902,8 +902,8 @@ describe('Workflow', () => {
number1: 1,
},
singleString: {
string1: 'value1'
}
string1: 'value1',
},
},
},
},
@@ -915,7 +915,7 @@ describe('Workflow', () => {
number1: 1,
},
singleString: {
string1: 'value1'
string1: 'value1',
},
},
},
@@ -926,7 +926,7 @@ describe('Workflow', () => {
number1: 1,
},
singleString: {
string1: 'value1'
string1: 'value1',
},
},
},
@@ -938,7 +938,7 @@ describe('Workflow', () => {
number1: 1,
},
singleString: {
string1: 'value1'
string1: 'value1',
},
},
},
@@ -949,7 +949,7 @@ describe('Workflow', () => {
number1: 1,
},
singleString: {
string1: 'value1'
string1: 'value1',
},
},
},
@@ -1040,8 +1040,8 @@ describe('Workflow', () => {
number1: 1,
collection1: [
{
string1: 'value1'
}
string1: 'value1',
},
],
},
],
@@ -1057,8 +1057,8 @@ describe('Workflow', () => {
number1: 1,
collection1: [
{
string1: 'value1'
}
string1: 'value1',
},
],
},
],
@@ -1072,8 +1072,8 @@ describe('Workflow', () => {
number1: 1,
collection1: [
{
string1: 'value1'
}
string1: 'value1',
},
],
},
],
@@ -1088,8 +1088,8 @@ describe('Workflow', () => {
number1: 1,
collection1: [
{
string1: 'value1'
}
string1: 'value1',
},
],
},
],
@@ -1103,8 +1103,8 @@ describe('Workflow', () => {
number1: 1,
collection1: [
{
string1: 'value1'
}
string1: 'value1',
},
],
},
],
@@ -1140,7 +1140,7 @@ describe('Workflow', () => {
displayOptions: {
show: {
mode: [
'mode1'
'mode1',
],
},
},
@@ -1231,7 +1231,7 @@ describe('Workflow', () => {
displayOptions: {
show: {
'/mode': [
'mode1'
'mode1',
],
},
},
@@ -1322,7 +1322,7 @@ describe('Workflow', () => {
displayOptions: {
show: {
'/mode': [
'mode2'
'mode2',
],
},
},
@@ -1405,7 +1405,7 @@ describe('Workflow', () => {
displayOptions: {
show: {
'/mode': [
'mode1'
'mode1',
],
},
},
@@ -1481,7 +1481,7 @@ describe('Workflow', () => {
displayOptions: {
show: {
'/mode': [
'mode2'
'mode2',
],
},
},
@@ -1558,7 +1558,7 @@ describe('Workflow', () => {
displayOptions: {
show: {
'/mode': [
'mode1'
'mode1',
],
},
},
@@ -1577,7 +1577,7 @@ describe('Workflow', () => {
values: [
{
string1: 'own string1',
}
},
],
},
},
@@ -1587,7 +1587,7 @@ describe('Workflow', () => {
values: [
{
string1: 'own string1',
}
},
],
},
defaultsTrue: {
@@ -1595,7 +1595,7 @@ describe('Workflow', () => {
values: [
{
string1: 'own string1',
}
},
],
},
},
@@ -1604,7 +1604,7 @@ describe('Workflow', () => {
values: [
{
string1: 'own string1',
}
},
],
},
defaultsTrue: {
@@ -1612,7 +1612,7 @@ describe('Workflow', () => {
values: [
{
string1: 'own string1',
}
},
],
},
},
@@ -1648,7 +1648,7 @@ describe('Workflow', () => {
displayOptions: {
show: {
'/mode': [
'mode2'
'mode2',
],
},
},
@@ -1668,7 +1668,7 @@ describe('Workflow', () => {
{
string1: 'own string1',
number1: 0,
}
},
],
},
},
@@ -1740,7 +1740,7 @@ describe('Workflow', () => {
displayOptions: {
show: {
mode: [
'mode1'
'mode1',
],
},
},
@@ -1838,8 +1838,8 @@ describe('Workflow', () => {
nodeValues: {
collection1: [
{
string1: 'value1'
}
string1: 'value1',
},
],
},
},
@@ -1848,15 +1848,15 @@ describe('Workflow', () => {
defaultsFalse: {
collection1: [
{
string1: 'value1'
}
string1: 'value1',
},
],
},
defaultsTrue: {
collection1: [
{
string1: 'value1'
}
string1: 'value1',
},
],
},
},
@@ -1864,15 +1864,15 @@ describe('Workflow', () => {
defaultsFalse: {
collection1: [
{
string1: 'value1'
}
string1: 'value1',
},
],
},
defaultsTrue: {
collection1: [
{
string1: 'value1'
}
string1: 'value1',
},
],
},
},
@@ -1912,8 +1912,8 @@ describe('Workflow', () => {
nodeValues: {
collection1: [
{
string1: 'default string1'
}
string1: 'default string1',
},
],
},
},
@@ -1923,14 +1923,14 @@ describe('Workflow', () => {
collection1: [
{
string1: 'default string1',
}
},
],
},
defaultsTrue: {
collection1: [
{
string1: 'default string1',
}
},
],
},
},
@@ -1939,14 +1939,14 @@ describe('Workflow', () => {
collection1: [
{
string1: 'default string1',
}
},
],
},
defaultsTrue: {
collection1: [
{
string1: 'default string1',
}
},
],
},
},
@@ -2650,7 +2650,7 @@ describe('Workflow', () => {
},
],
nodeValues: {
mainOption: 'option2'
mainOption: 'option2',
},
},
output: {

View File

@@ -30,7 +30,7 @@ describe('Workflow', () => {
parameters: {
value1: 'value1Node1',
value2: 'value2Node1',
}
},
},
output: {
value1: 'value1Node1',
@@ -93,7 +93,7 @@ describe('Workflow', () => {
{
value2a: '={{$node.Node1.data.value1 + \'Node1\'}}',
value2b: '={{$node.Node1.data.value1 + \'Node1\'}}',
}
},
],
level1c: {
value2a: {
@@ -105,10 +105,10 @@ describe('Workflow', () => {
value5a: '={{$node.Node1.data.value1 + \'Node1\'}}',
value5b: '={{$node.Node1.data.value1 + \'Node1\'}}',
},
}
]
},
],
},
}
},
} as INodeParameters,
},
output: {
@@ -117,7 +117,7 @@ describe('Workflow', () => {
{
value2a: '={{$node.NewName.data.value1 + \'Node1\'}}',
value2b: '={{$node.NewName.data.value1 + \'Node1\'}}',
}
},
],
level1c: {
value2a: {
@@ -129,10 +129,10 @@ describe('Workflow', () => {
value5a: '={{$node.NewName.data.value1 + \'Node1\'}}',
value5b: '={{$node.NewName.data.value1 + \'Node1\'}}',
},
}
]
},
],
},
}
},
},
},
];
@@ -164,9 +164,9 @@ describe('Workflow', () => {
value1: 'value1Node1',
value2: 'value2Node1',
},
}
},
],
connections: {}
connections: {},
},
output: {
nodes: [
@@ -176,9 +176,9 @@ describe('Workflow', () => {
value1: 'value1Node1',
value2: 'value2Node1',
},
}
},
],
connections: {}
connections: {},
},
},
{
@@ -381,9 +381,9 @@ describe('Workflow', () => {
node: 'Node5',
type: 'main',
index: 0,
}
]
]
},
],
],
},
Node3: {
main: [
@@ -510,9 +510,9 @@ describe('Workflow', () => {
value1: '={{$node.Node1.data.value1 + \'Node1\'}}',
value2: '={{$node.Node1.data.value2 + \' - \' + $node.Node1.data.value2}}',
},
}
},
],
connections: {}
connections: {},
},
output: {
nodes: [
@@ -529,9 +529,9 @@ describe('Workflow', () => {
value1: '={{$node.Node1New.data.value1 + \'Node1\'}}',
value2: '={{$node.Node1New.data.value2 + \' - \' + $node.Node1New.data.value2}}',
},
}
},
],
connections: {}
connections: {},
},
},
];
@@ -590,16 +590,16 @@ describe('Workflow', () => {
Node1: {
parameters: {
value1: 'valueNode1',
}
},
},
Node2: {
parameters: {
value1: 'valueNode2',
},
}
},
},
output: {
value1: 'valueNode2'
value1: 'valueNode2',
},
},
{
@@ -608,16 +608,16 @@ describe('Workflow', () => {
Node1: {
parameters: {
value1: '',
}
},
},
Node2: {
parameters: {
value1: '={{1+2}}',
},
}
},
},
output: {
value1: 3
value1: 3,
},
},
{
@@ -626,16 +626,16 @@ describe('Workflow', () => {
Node1: {
parameters: {
value1: 'valueNode1',
}
},
},
Node2: {
parameters: {
value1: '={{$node.Node1.data.value1}}',
},
}
},
},
output: {
value1: 'valueNode1'
value1: 'valueNode1',
},
},
{
@@ -644,16 +644,16 @@ describe('Workflow', () => {
Node1: {
parameters: {
value1: 1,
}
},
},
Node2: {
parameters: {
value1: '={{$node.Node1.data.value1 + 2}} asdf',
},
}
},
},
output: {
value1: '3 asdf'
value1: '3 asdf',
},
},
{
@@ -688,13 +688,13 @@ describe('Workflow', () => {
Node1: {
parameters: {
value1: 'valueNode1',
}
},
},
Node2: {
parameters: {
value1: '={{$data.value1}}'
value1: '={{$data.value1}}',
},
}
},
},
output: {
value1: 'valueNode1',
@@ -765,8 +765,8 @@ describe('Workflow', () => {
data: '',
type: '',
fileName: 'test-file1.jpg',
}
}
},
},
},
Node2: {
parameters: {
@@ -791,8 +791,8 @@ describe('Workflow', () => {
data: '',
type: '',
fileName: 'test-file1.jpg',
}
}
},
},
},
Node2: {
parameters: {
@@ -810,13 +810,13 @@ describe('Workflow', () => {
Node1: {
parameters: {
value1: 'valueNode1',
}
},
},
Node2: {
parameters: {
value1: '={{$node.Node1.parameter.value1}}'
value1: '={{$node.Node1.parameter.value1}}',
},
}
},
},
output: {
value1: 'valueNode1',
@@ -828,13 +828,13 @@ describe('Workflow', () => {
Node1: {
parameters: {
value1: 'valueNode1',
}
},
},
Node2: {
parameters: {
value1: '={{$env.TEST_VARIABLE_1}}'
value1: '={{$env.TEST_VARIABLE_1}}',
},
}
},
},
output: {
value1: 'valueEnvVariable1',
@@ -846,13 +846,13 @@ describe('Workflow', () => {
Node1: {
parameters: {
value1: 'valueNode1',
}
},
},
Node2: {
parameters: {
value1: '={{$env.DOES_NOT_EXIST}}'
value1: '={{$env.DOES_NOT_EXIST}}',
},
}
},
},
output: {
value1: undefined,
@@ -864,14 +864,14 @@ describe('Workflow', () => {
Node1: {
parameters: {
value1: 'valueNode1',
}
},
},
Node2: {
parameters: {
value1: 'valueNode2',
value2: '={{$parameter.value1}}',
},
}
},
},
output: {
value1: 'valueNode2',
@@ -884,14 +884,14 @@ describe('Workflow', () => {
Node1: {
parameters: {
value1: 'valueNode1',
}
},
},
Node2: {
parameters: {
value1: '={{$node.Node1.data.value1}}',
value2: '={{$parameter.value1}}',
},
}
},
},
output: {
value1: 'valueNode1',
@@ -904,14 +904,14 @@ describe('Workflow', () => {
Node1: {
parameters: {
value1: 'valueNode1',
}
},
},
Node2: {
parameters: {
value1: '={{$data.value1}}',
value2: '={{$parameter.value1}}',
},
}
},
},
output: {
value1: 'valueNode1',
@@ -924,13 +924,13 @@ describe('Workflow', () => {
Node1: {
parameters: {
value1: 'valueNode1',
}
},
},
Node2: {
parameters: {
value1: '={{$node["Node 4 with spaces"].parameter.value1}}',
},
}
},
},
output: {
value1: 'default-value1',
@@ -942,7 +942,7 @@ describe('Workflow', () => {
Node1: {
parameters: {
value1: 'valueNode1',
}
},
},
Node2: {
parameters: {
@@ -953,7 +953,7 @@ describe('Workflow', () => {
parameters: {
value1: '={{$node["Node2"].parameter.value1}}b',
},
}
},
},
output: {
value1: 'valueNode1ab',
@@ -1035,7 +1035,7 @@ describe('Workflow', () => {
100,
400,
],
}
},
];
const connections: IConnections = {
"Node1": {
@@ -1044,10 +1044,10 @@ describe('Workflow', () => {
{
"node": "Node2",
"type": "main",
"index": 0
}
]
]
"index": 0,
},
],
],
},
"Node2": {
"main": [
@@ -1055,11 +1055,11 @@ describe('Workflow', () => {
{
"node": "Node3",
"type": "main",
"index": 0
}
]
]
}
"index": 0,
},
],
],
},
};
const workflow = new Workflow({ nodes, connections, active: false, nodeTypes });
@@ -1080,15 +1080,15 @@ describe('Workflow', () => {
// @ts-ignore
json: testData.input.Node1.outputJson || testData.input.Node1.parameters,
// @ts-ignore
binary: testData.input.Node1.outputBinary
}
]
]
}
}
]
}
}
binary: testData.input.Node1.outputBinary,
},
],
],
},
},
],
},
},
};
const itemIndex = 0;
@@ -1197,14 +1197,14 @@ describe('Workflow', () => {
"string": [
{
"name": "name1",
"value": "value1"
"value": "value1",
},
{
"name": "name2",
"value": "={{$parameter.values.string[0].value}}A"
}
]
}
"value": "={{$parameter.values.string[0].value}}A",
},
],
},
},
"type": "test.setMulti",
"typeVersion": 1,
@@ -1231,14 +1231,14 @@ describe('Workflow', () => {
[
{
json: {},
}
]
]
}
}
]
}
}
},
],
],
},
},
],
},
},
};
const itemIndex = 0;
@@ -1259,7 +1259,7 @@ describe('Workflow', () => {
name: 'name2',
value: 'value1A',
},
]
],
});
});

View File

@@ -46,6 +46,11 @@
"forin": true,
"jsdoc-format": true,
"label-position": true,
"indent": [
true,
"tabs",
2
],
"member-access": [
true,
"no-public"
@@ -60,6 +65,13 @@
"no-default-export": true,
"no-duplicate-variable": true,
"no-inferrable-types": true,
"ordered-imports": [
true,
{
"import-sources-order": "any",
"named-imports-order": "case-insensitive"
}
],
"no-namespace": [
true,
"allow-declarations"
@@ -82,6 +94,18 @@
"ignore-bound-class-methods"
],
"switch-default": true,
"trailing-comma": [
true,
{
"multiline": {
"objects": "always",
"arrays": "always",
"functions": "always",
"typeLiterals": "ignore"
},
"esSpecCompliant": true
}
],
"triple-equals": [
true,
"allow-null-check"