fix(core): Remove linting exceptions in nodes-base, @typescript-eslint/no-unsafe-argument (no-changelog)

This commit is contained in:
Michael Kret
2023-02-28 05:39:43 +02:00
committed by GitHub
parent 3172ea376e
commit bb4db58819
560 changed files with 2227 additions and 1919 deletions

View File

@@ -19,7 +19,7 @@ import {
uploadAttachments,
} from './GenericFunctions';
import type { ITweet } from './TweetInterface';
import type { ITweet, ITweetCreate } from './TweetInterface';
import ISO6391 from 'iso-639-1';
@@ -105,7 +105,7 @@ export class Twitter implements INodeType {
const userId = this.getNodeParameter('userId', i) as string;
const text = this.getNodeParameter('text', i) as string;
const additionalFields = this.getNodeParameter('additionalFields', i);
const body: IDataObject = {
const body: ITweetCreate = {
type: 'message_create',
message_create: {
target: {
@@ -126,14 +126,12 @@ export class Twitter implements INodeType {
});
const medias = await uploadAttachments.call(this, attachmentProperties, items, i);
//@ts-ignore
body.message_create.message_data.attachment = {
type: 'media',
//@ts-ignore
media: { id: medias[0].media_id_string },
};
} else {
//@ts-ignore
delete body.message_create.message_data.attachment;
}
@@ -314,7 +312,7 @@ export class Twitter implements INodeType {
}
}
const executionData = this.helpers.constructExecutionMetaData(
this.helpers.returnJsonArray(responseData),
this.helpers.returnJsonArray(responseData as IDataObject[]),
{ itemData: { item: i } },
);
returnData.push(...executionData);