👕 Fix lint issue

This commit is contained in:
Jan Oberhauser 2020-10-20 11:21:16 +02:00
parent 269bab679d
commit a27ac0e203
2 changed files with 12 additions and 12 deletions

View file

@ -152,8 +152,8 @@ export class EmailSend implements INodeType {
if(credentials.user || credentials.password) {
// @ts-ignore
connectionOptions.auth = {
user: credentials.user,
pass: credentials.password
user: credentials.user as string,
pass: credentials.password as string,
};
}

View file

@ -816,9 +816,9 @@ export class Mandrill implements INodeType {
const metadataUi = this.getNodeParameter('metadataUi', i) as IDataObject;
if (!_.isEmpty(metadataUi)) {
// @ts-ignore
body.message.metadata = _.map(metadataUi.metadataValues, (o) => {
body.message.metadata = _.map(metadataUi.metadataValues, (o: IDataObject) => {
const aux: IDataObject = {};
aux[o.name] = o.value;
aux[o.name as string] = o.value;
return aux;
});
}
@ -826,7 +826,7 @@ export class Mandrill implements INodeType {
const mergeVarsUi = this.getNodeParameter('mergeVarsUi', i) as IDataObject;
if (!_.isEmpty(mergeVarsUi)) {
// @ts-ignore
body.message.global_merge_vars = _.map(mergeVarsUi.mergeVarsValues, (o) => {
body.message.global_merge_vars = _.map(mergeVarsUi.mergeVarsValues, (o: IDataObject) => {
const aux: IDataObject = {};
aux.name = o.name;
aux.content = o.content;
@ -835,13 +835,13 @@ export class Mandrill implements INodeType {
}
const attachmentsUi = this.getNodeParameter('attachmentsUi', i) as IDataObject;
let attachmentsBinary = [], attachmentsValues = [];
let attachmentsBinary: Attachments[] = [], attachmentsValues: Attachments[] = [];
if (!_.isEmpty(attachmentsUi)) {
if (attachmentsUi.hasOwnProperty('attachmentsValues')
&& !_.isEmpty(attachmentsUi.attachmentsValues)) {
// @ts-ignore
attachmentsValues = _.map(attachmentsUi.attachmentsValues, (o) => {
attachmentsValues = _.map(attachmentsUi.attachmentsValues, (o: IDataObject) => {
const aux: IDataObject = {};
// @ts-ignore
aux.name = o.name;
@ -855,12 +855,12 @@ export class Mandrill implements INodeType {
&& !_.isEmpty(attachmentsUi.attachmentsBinary)
&& items[i].binary) {
// @ts-ignore
attachmentsBinary = _.map(attachmentsUi.attachmentsBinary, (o) => {
if (items[i].binary!.hasOwnProperty(o.property)) {
attachmentsBinary = _.map(attachmentsUi.attachmentsBinary, (o: IDataObject) => {
if (items[i].binary!.hasOwnProperty(o.property as string)) {
const aux: IDataObject = {};
aux.name = items[i].binary![o.property].fileName || 'unknown';
aux.content = items[i].binary![o.property].data;
aux.type = items[i].binary![o.property].mimeType;
aux.name = items[i].binary![o.property as string].fileName || 'unknown';
aux.content = items[i].binary![o.property as string].data;
aux.type = items[i].binary![o.property as string].mimeType;
return aux;
}
});