Cleanup & Fix lint issues

This commit is contained in:
Jan Oberhauser 2021-03-29 11:20:10 +02:00
parent e48f555f07
commit ca50194d71
7 changed files with 25 additions and 25 deletions

View file

@ -948,9 +948,9 @@ export class EditImage implements INodeType {
},
};
async execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]> {
async execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]> {
const items = this.getInputData();
const returnData: INodeExecutionData[] = [];
const length = items.length as unknown as number;
let item: INodeExecutionData;
@ -1069,7 +1069,7 @@ export class EditImage implements INodeType {
if (operation === 'information') {
// Just return the information
const imageData = await new Promise<IDataObject>((resolve, reject) => {
gmInstance = gmInstance.identify((error:any, imageData:any) => {
gmInstance = gmInstance.identify((error, imageData) => {
if (error) {
reject(error);
return;
@ -1241,7 +1241,7 @@ export class EditImage implements INodeType {
return resolve(newItem);
});
})));
}
return this.prepareOutputData(returnData);
}

View file

@ -124,7 +124,7 @@ export class EmailSend implements INodeType {
};
async execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]> {
async execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]> {
const items = this.getInputData();
const returnData: INodeExecutionData[] = [];
@ -132,7 +132,7 @@ export class EmailSend implements INodeType {
let item: INodeExecutionData;
for (let itemIndex = 0; itemIndex < length; itemIndex++) {
item = items[itemIndex];
const fromEmail = this.getNodeParameter('fromEmail', itemIndex) as string;
@ -157,7 +157,7 @@ export class EmailSend implements INodeType {
secure: credentials.secure as boolean,
};
if(credentials.user || credentials.password) {
if (credentials.user || credentials.password) {
// @ts-ignore
connectionOptions.auth = {
user: credentials.user as string,
@ -208,10 +208,10 @@ export class EmailSend implements INodeType {
// Send the email
const info = await transporter.sendMail(mailOptions);
returnData.push({ json: info });
}
return this.prepareOutputData(returnData);
}

View file

@ -40,7 +40,7 @@ export class FunctionItem implements INodeType {
],
};
async execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]> {
async execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]> {
const items = this.getInputData();
const returnData: INodeExecutionData[] = [];
@ -115,9 +115,9 @@ export class FunctionItem implements INodeType {
if (item.binary) {
returnItem.binary = item.binary;
}
returnData.push(returnItem);
}
}
return this.prepareOutputData(returnData);
}
}

View file

@ -105,9 +105,9 @@ export class Mailgun implements INodeType {
};
async execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]> {
async execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]> {
const items = this.getInputData();
const returnData: INodeExecutionData[] = [];
const length = items.length as unknown as number;
let item: INodeExecutionData;
@ -187,7 +187,7 @@ export class Mailgun implements INodeType {
returnData.push({
json: responseData,
});
}
return this.prepareOutputData(returnData)
}
return this.prepareOutputData(returnData);
}
}

View file

@ -49,7 +49,7 @@ export class ReadBinaryFile implements INodeType {
};
async execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]> {
async execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]> {
const items = this.getInputData();
const returnData: INodeExecutionData[] = [];
@ -86,8 +86,8 @@ export class ReadBinaryFile implements INodeType {
newItem.binary![dataPropertyName] = await this.helpers.prepareBinaryData(data, filePath);
returnData.push(newItem);
}
}
return this.prepareOutputData(returnData);
}

View file

@ -45,7 +45,7 @@ export class ReadPdf implements INodeType {
let item: INodeExecutionData;
for (let itemIndex = 0; itemIndex < length; itemIndex++) {
item = items[itemIndex];
const binaryPropertyName = this.getNodeParameter('binaryPropertyName', itemIndex) as string;
@ -58,7 +58,7 @@ export class ReadPdf implements INodeType {
binary: item.binary,
json: await pdf(binaryData),
});
}
return this.prepareOutputData(returnData);
}

View file

@ -55,7 +55,7 @@ export class WriteBinaryFile implements INodeType {
async execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]> {
const items = this.getInputData();
const returnData: INodeExecutionData[] = [];
@ -65,9 +65,9 @@ export class WriteBinaryFile implements INodeType {
for (let itemIndex = 0; itemIndex < length; itemIndex++) {
const dataPropertyName = this.getNodeParameter('dataPropertyName', itemIndex) as string;
const fileName = this.getNodeParameter('fileName', itemIndex) as string;
item = items[itemIndex];
if (item.binary === undefined) {
@ -95,7 +95,7 @@ export class WriteBinaryFile implements INodeType {
}
// Add the file name to data
(newItem.json as IDataObject).fileName = fileName;
returnData.push(newItem);