diff --git a/packages/@n8n_io/eslint-config/base.js b/packages/@n8n_io/eslint-config/base.js index 50817582ca..30fe989f37 100644 --- a/packages/@n8n_io/eslint-config/base.js +++ b/packages/@n8n_io/eslint-config/base.js @@ -124,8 +124,16 @@ const config = (module.exports = { 'undefined', ], + /** + * https://eslint.org/docs/latest/rules/no-void + */ 'no-void': ['error', { allowAsStatement: true }], + /** + * https://eslint.org/docs/latest/rules/sort-imports + */ + 'sort-imports': 'off', // @TECH_DEBT: Enable, prefs to be decided - N8N-5821 + // ---------------------------------- // @typescript-eslint // ---------------------------------- @@ -185,11 +193,6 @@ const config = (module.exports = { */ '@typescript-eslint/consistent-type-assertions': 'error', - /** - * https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/explicit-member-accessibility.md - */ - '@typescript-eslint/explicit-member-accessibility': ['error', { accessibility: 'no-public' }], - /** * https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/member-delimiter-style.md */ @@ -299,6 +302,11 @@ const config = (module.exports = { */ '@typescript-eslint/promise-function-async': 'error', + /** + * https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/triple-slash-reference.md + */ + '@typescript-eslint/triple-slash-reference': 'off', // @TECH_DEBT: Enable, disallowing in all cases - N8N-5820 + // ---------------------------------- // eslint-plugin-import // ---------------------------------- diff --git a/packages/nodes-base/nodes/ActiveCampaign/GenericFunctions.ts b/packages/nodes-base/nodes/ActiveCampaign/GenericFunctions.ts index 23b5ffe526..88884b1814 100644 --- a/packages/nodes-base/nodes/ActiveCampaign/GenericFunctions.ts +++ b/packages/nodes-base/nodes/ActiveCampaign/GenericFunctions.ts @@ -21,7 +21,6 @@ export async function activeCampaignApiRequest( body: IDataObject, query?: IDataObject, dataKey?: string, - // tslint:disable-next-line:no-any ): Promise { const credentials = await this.getCredentials('activeCampaignApi'); @@ -75,7 +74,6 @@ export async function activeCampaignApiRequestAllItems( body: IDataObject, query?: IDataObject, dataKey?: string, - // tslint:disable-next-line:no-any ): Promise { if (query === undefined) { query = {}; diff --git a/packages/nodes-base/nodes/AcuityScheduling/GenericFunctions.ts b/packages/nodes-base/nodes/AcuityScheduling/GenericFunctions.ts index 322d6563fe..d39596c485 100644 --- a/packages/nodes-base/nodes/AcuityScheduling/GenericFunctions.ts +++ b/packages/nodes-base/nodes/AcuityScheduling/GenericFunctions.ts @@ -17,12 +17,10 @@ export async function acuitySchedulingApiRequest( | IWebhookFunctions, method: string, resource: string, - // tslint:disable-next-line:no-any body: any = {}, qs: IDataObject = {}, uri?: string, _option: IDataObject = {}, - // tslint:disable-next-line:no-any ): Promise { const authenticationMethod = this.getNodeParameter('authentication', 0); diff --git a/packages/nodes-base/nodes/Affinity/GenericFunctions.ts b/packages/nodes-base/nodes/Affinity/GenericFunctions.ts index dbbfeed5a9..620a2fecde 100644 --- a/packages/nodes-base/nodes/Affinity/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Affinity/GenericFunctions.ts @@ -8,12 +8,10 @@ export async function affinityApiRequest( this: IExecuteFunctions | IWebhookFunctions | IHookFunctions | ILoadOptionsFunctions, method: string, resource: string, - // tslint:disable-next-line:no-any body: any = {}, query: IDataObject = {}, uri?: string, option: IDataObject = {}, - // tslint:disable-next-line:no-any ): Promise { const credentials = await this.getCredentials('affinityApi'); @@ -51,10 +49,8 @@ export async function affinityApiRequestAllItems( propertyName: string, method: string, resource: string, - // tslint:disable-next-line:no-any body: any = {}, query: IDataObject = {}, - // tslint:disable-next-line:no-any ): Promise { const returnData: IDataObject[] = []; diff --git a/packages/nodes-base/nodes/AgileCrm/GenericFunctions.ts b/packages/nodes-base/nodes/AgileCrm/GenericFunctions.ts index 339e2724c7..0c6526bce1 100644 --- a/packages/nodes-base/nodes/AgileCrm/GenericFunctions.ts +++ b/packages/nodes-base/nodes/AgileCrm/GenericFunctions.ts @@ -17,12 +17,10 @@ export async function agileCrmApiRequest( this: IHookFunctions | IExecuteFunctions | IExecuteSingleFunctions | ILoadOptionsFunctions, method: string, endpoint: string, - // tslint:disable-next-line:no-any body: any = {}, query: IDataObject = {}, uri?: string, sendAsForm?: boolean, - // tslint:disable-next-line:no-any ): Promise { const credentials = await this.getCredentials('agileCrmApi'); const options: OptionsWithUri = { @@ -60,12 +58,10 @@ export async function agileCrmApiRequestAllItems( this: IHookFunctions | ILoadOptionsFunctions | IExecuteFunctions, method: string, resource: string, - // tslint:disable-next-line:no-any body: any = {}, query: IDataObject = {}, uri?: string, sendAsForm?: boolean, - // tslint:disable-next-line:no-any ): Promise { // https://github.com/agilecrm/rest-api#11-listing-contacts- @@ -101,11 +97,9 @@ export async function agileCrmApiRequestUpdate( this: IHookFunctions | IExecuteFunctions | IExecuteSingleFunctions | ILoadOptionsFunctions, method = 'PUT', endpoint?: string, - // tslint:disable-next-line:no-any body: any = {}, _query: IDataObject = {}, uri?: string, - // tslint:disable-next-line:no-any ): Promise { const credentials = await this.getCredentials('agileCrmApi'); const baseUri = `https://${credentials.subdomain}.agilecrm.com/dev/`; @@ -124,7 +118,7 @@ export async function agileCrmApiRequestUpdate( }; const successfulUpdates = []; - let lastSuccesfulUpdateReturn: any; // tslint:disable-line:no-any + let lastSuccesfulUpdateReturn: any; const payload: IContactUpdate = body; try { @@ -135,7 +129,6 @@ export async function agileCrmApiRequestUpdate( lastSuccesfulUpdateReturn = await this.helpers.request!(options); // Iterate trough properties and show them as individial updates instead of only vague "properties" - // tslint:disable-next-line:no-any payload.properties?.map((property: any) => { successfulUpdates.push(`${property.name}`); }); @@ -186,7 +179,6 @@ export async function agileCrmApiRequestUpdate( } } -// tslint:disable-next-line:no-any export function validateJSON(json: string | undefined): any { let result; try { diff --git a/packages/nodes-base/nodes/Airtable/Airtable.node.ts b/packages/nodes-base/nodes/Airtable/Airtable.node.ts index eaaed70c32..e06dc28c3b 100644 --- a/packages/nodes-base/nodes/Airtable/Airtable.node.ts +++ b/packages/nodes-base/nodes/Airtable/Airtable.node.ts @@ -538,7 +538,6 @@ export class Airtable implements INodeType { if (addAllFields === true) { // Add all the fields the item has row.fields = { ...items[i].json }; - // tslint:disable-next-line: no-any delete (row.fields! as any).id; } else { // Add only the specified fields @@ -742,7 +741,6 @@ export class Airtable implements INodeType { // Update all the fields the item has row.fields = { ...items[i].json }; // remove id field - // tslint:disable-next-line: no-any delete (row.fields! as any).id; if (options.ignoreFields && options.ignoreFields !== '') { diff --git a/packages/nodes-base/nodes/Airtable/GenericFunctions.ts b/packages/nodes-base/nodes/Airtable/GenericFunctions.ts index 90369ee091..3f24a79162 100644 --- a/packages/nodes-base/nodes/Airtable/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Airtable/GenericFunctions.ts @@ -33,7 +33,6 @@ export async function apiRequest( query?: IDataObject, uri?: string, option: IDataObject = {}, - // tslint:disable-next-line:no-any ): Promise { query = query || {}; @@ -75,7 +74,6 @@ export async function apiRequestAllItems( endpoint: string, body: IDataObject, query?: IDataObject, - // tslint:disable-next-line:no-any ): Promise { if (query === undefined) { query = {}; diff --git a/packages/nodes-base/nodes/Amqp/Amqp.node.ts b/packages/nodes-base/nodes/Amqp/Amqp.node.ts index a780b0b38f..6cf90be1fa 100644 --- a/packages/nodes-base/nodes/Amqp/Amqp.node.ts +++ b/packages/nodes-base/nodes/Amqp/Amqp.node.ts @@ -107,7 +107,7 @@ export class Amqp implements INodeType { const containerReconnect = (options.reconnect as boolean) || true; const containerReconnectLimit = (options.reconnectLimit as number) || 50; - let headerProperties: Dictionary; // tslint:disable-line:no-any + let headerProperties: Dictionary; if (typeof applicationProperties === 'string' && applicationProperties !== '') { headerProperties = JSON.parse(applicationProperties); } else { diff --git a/packages/nodes-base/nodes/Amqp/AmqpTrigger.node.ts b/packages/nodes-base/nodes/Amqp/AmqpTrigger.node.ts index 6488fe4abe..708d4dfddd 100644 --- a/packages/nodes-base/nodes/Amqp/AmqpTrigger.node.ts +++ b/packages/nodes-base/nodes/Amqp/AmqpTrigger.node.ts @@ -197,7 +197,7 @@ export class AmqpTrigger implements INodeType { data = data.body; } - self.emit([self.helpers.returnJsonArray([data as any])]); // tslint:disable-line:no-any + self.emit([self.helpers.returnJsonArray([data as any])]); if (!context.receiver?.has_credit()) { setTimeout(() => { @@ -264,7 +264,7 @@ export class AmqpTrigger implements INodeType { if (Object.keys(message)[0] === 'body' && Object.keys(message).length === 1) { self.emit([self.helpers.returnJsonArray([message.body])]); } else { - self.emit([self.helpers.returnJsonArray([message as any])]); // tslint:disable-line:no-any + self.emit([self.helpers.returnJsonArray([message as any])]); } clearTimeout(timeoutHandler); resolve(true); diff --git a/packages/nodes-base/nodes/ApiTemplateIo/GenericFunctions.ts b/packages/nodes-base/nodes/ApiTemplateIo/GenericFunctions.ts index fe5ac62913..49f646e776 100644 --- a/packages/nodes-base/nodes/ApiTemplateIo/GenericFunctions.ts +++ b/packages/nodes-base/nodes/ApiTemplateIo/GenericFunctions.ts @@ -60,7 +60,6 @@ export async function loadResource(this: ILoadOptionsFunctions, resource: 'image })); } -// tslint:disable-next-line:no-any export function validateJSON(json: string | object | undefined): any { let result; if (typeof json === 'object') { diff --git a/packages/nodes-base/nodes/Asana/GenericFunctions.ts b/packages/nodes-base/nodes/Asana/GenericFunctions.ts index ac59364557..0354128567 100644 --- a/packages/nodes-base/nodes/Asana/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Asana/GenericFunctions.ts @@ -20,7 +20,6 @@ export async function asanaApiRequest( body: object, query?: IDataObject, uri?: string | undefined, - // tslint:disable-next-line:no-any ): Promise { const authenticationMethod = this.getNodeParameter('authentication', 0) as string; @@ -41,10 +40,9 @@ export async function asanaApiRequestAllItems( this: IExecuteFunctions | ILoadOptionsFunctions, method: IHttpRequestMethods, endpoint: string, - // tslint:disable-next-line:no-any + body: any = {}, query: IDataObject = {}, - // tslint:disable-next-line:no-any ): Promise { const returnData: IDataObject[] = []; diff --git a/packages/nodes-base/nodes/Automizy/GenericFunctions.ts b/packages/nodes-base/nodes/Automizy/GenericFunctions.ts index 767aaa5b5a..df2cfebb35 100644 --- a/packages/nodes-base/nodes/Automizy/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Automizy/GenericFunctions.ts @@ -8,11 +8,10 @@ export async function automizyApiRequest( this: IExecuteFunctions | IExecuteSingleFunctions | ILoadOptionsFunctions, method: string, path: string, - // tslint:disable-next-line:no-any + body: any = {}, qs: IDataObject = {}, option = {}, - // tslint:disable-next-line:no-any ): Promise { const credentials = (await this.getCredentials('automizyApi')) as IDataObject; @@ -49,10 +48,9 @@ export async function automizyApiRequestAllItems( propertyName: string, method: string, endpoint: string, - // tslint:disable-next-line:no-any + body: any = {}, query: IDataObject = {}, - // tslint:disable-next-line:no-any ): Promise { const returnData: IDataObject[] = []; diff --git a/packages/nodes-base/nodes/Autopilot/GenericFunctions.ts b/packages/nodes-base/nodes/Autopilot/GenericFunctions.ts index b3943e97c8..82cc2b6469 100644 --- a/packages/nodes-base/nodes/Autopilot/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Autopilot/GenericFunctions.ts @@ -8,12 +8,11 @@ export async function autopilotApiRequest( this: IExecuteFunctions | IWebhookFunctions | IHookFunctions | ILoadOptionsFunctions, method: string, resource: string, - // tslint:disable-next-line:no-any + body: any = {}, query: IDataObject = {}, uri?: string, _option: IDataObject = {}, - // tslint:disable-next-line:no-any ): Promise { const credentials = (await this.getCredentials('autopilotApi')) as IDataObject; @@ -51,10 +50,9 @@ export async function autopilotApiRequestAllItems( propertyName: string, method: string, endpoint: string, - // tslint:disable-next-line:no-any + body: any = {}, query: IDataObject = {}, - // tslint:disable-next-line:no-any ): Promise { const returnData: IDataObject[] = []; const returnAll = this.getNodeParameter('returnAll', 0, false) as boolean; diff --git a/packages/nodes-base/nodes/Aws/CertificateManager/GenericFunctions.ts b/packages/nodes-base/nodes/Aws/CertificateManager/GenericFunctions.ts index aa11f10e54..6298cdf924 100644 --- a/packages/nodes-base/nodes/Aws/CertificateManager/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Aws/CertificateManager/GenericFunctions.ts @@ -17,7 +17,6 @@ export async function awsApiRequest( body?: string | Buffer, query: IDataObject = {}, headers?: object, - // tslint:disable-next-line:no-any ): Promise { const credentials = await this.getCredentials('aws'); @@ -49,7 +48,6 @@ export async function awsApiRequestREST( body?: string, query: IDataObject = {}, headers?: object, - // tslint:disable-next-line:no-any ): Promise { const response = await awsApiRequest.call(this, service, method, path, body, query, headers); try { @@ -68,7 +66,6 @@ export async function awsApiRequestAllItems( body?: string, query: IDataObject = {}, headers: IDataObject = {}, - // tslint:disable-next-line:no-any ): Promise { const returnData: IDataObject[] = []; @@ -77,7 +74,6 @@ export async function awsApiRequestAllItems( do { responseData = await awsApiRequestREST.call(this, service, method, path, body, query, headers); if (responseData.NextToken) { - // tslint:disable-next-line:no-any const data = jsonParse(body as string, { errorMessage: 'Response body is not valid JSON', }); diff --git a/packages/nodes-base/nodes/Aws/Comprehend/GenericFunctions.ts b/packages/nodes-base/nodes/Aws/Comprehend/GenericFunctions.ts index d9ab6b885f..484905a620 100644 --- a/packages/nodes-base/nodes/Aws/Comprehend/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Aws/Comprehend/GenericFunctions.ts @@ -16,7 +16,6 @@ export async function awsApiRequest( path: string, body?: string, headers?: object, - // tslint:disable-next-line:no-any ): Promise { const credentials = await this.getCredentials('aws'); @@ -41,7 +40,6 @@ export async function awsApiRequestREST( path: string, body?: string, headers?: object, - // tslint:disable-next-line:no-any ): Promise { const response = await awsApiRequest.call(this, service, method, path, body, headers); try { @@ -58,7 +56,6 @@ export async function awsApiRequestSOAP( path: string, body?: string, headers?: object, - // tslint:disable-next-line:no-any ): Promise { const response = await awsApiRequest.call(this, service, method, path, body, headers); try { diff --git a/packages/nodes-base/nodes/Aws/DynamoDB/AwsDynamoDB.node.ts b/packages/nodes-base/nodes/Aws/DynamoDB/AwsDynamoDB.node.ts index f83e240932..372ceb90eb 100644 --- a/packages/nodes-base/nodes/Aws/DynamoDB/AwsDynamoDB.node.ts +++ b/packages/nodes-base/nodes/Aws/DynamoDB/AwsDynamoDB.node.ts @@ -175,7 +175,6 @@ export class AwsDynamoDB implements INodeType { // https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_DeleteItem.html - // tslint:disable-next-line: no-any const body: { [key: string]: any } = { TableName: this.getNodeParameter('tableName', i) as string, Key: {}, @@ -252,7 +251,6 @@ export class AwsDynamoDB implements INodeType { [], ) as IAttributeNameUi[]; - // tslint:disable-next-line: no-any const body: { [key: string]: any } = { TableName: tableName, Key: {}, diff --git a/packages/nodes-base/nodes/Aws/DynamoDB/GenericFunctions.ts b/packages/nodes-base/nodes/Aws/DynamoDB/GenericFunctions.ts index 7426ad9d21..73b85a3f9d 100644 --- a/packages/nodes-base/nodes/Aws/DynamoDB/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Aws/DynamoDB/GenericFunctions.ts @@ -16,7 +16,6 @@ export async function awsApiRequest( path: string, body?: object | IRequestBody, headers?: object, - // tslint:disable-next-line:no-any ): Promise { const credentials = await this.getCredentials('aws'); const requestOptions = { @@ -63,7 +62,6 @@ export async function awsApiRequestAllItems( path: string, body?: IRequestBody, headers?: object, - // tslint:disable-next-line:no-any ): Promise { const returnData: IDataObject[] = []; diff --git a/packages/nodes-base/nodes/Aws/DynamoDB/utils.ts b/packages/nodes-base/nodes/Aws/DynamoDB/utils.ts index 61b9e36080..eb8829d534 100644 --- a/packages/nodes-base/nodes/Aws/DynamoDB/utils.ts +++ b/packages/nodes-base/nodes/Aws/DynamoDB/utils.ts @@ -86,7 +86,6 @@ function decodeAttribute(type: AttributeValueType, attribute: string) { } } -// tslint:disable-next-line: no-any export function validateJSON(input: any): object { try { return JSON.parse(input); diff --git a/packages/nodes-base/nodes/Aws/GenericFunctions.ts b/packages/nodes-base/nodes/Aws/GenericFunctions.ts index cb90134e1b..89da0fc930 100644 --- a/packages/nodes-base/nodes/Aws/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Aws/GenericFunctions.ts @@ -16,7 +16,6 @@ export async function awsApiRequest( path: string, body?: string, headers?: object, - // tslint:disable-next-line:no-any ): Promise { const credentials = await this.getCredentials('aws'); const requestOptions = { @@ -45,7 +44,6 @@ export async function awsApiRequestREST( path: string, body?: string, headers?: object, - // tslint:disable-next-line:no-any ): Promise { const response = await awsApiRequest.call(this, service, method, path, body, headers); try { @@ -62,7 +60,6 @@ export async function awsApiRequestSOAP( path: string, body?: string, headers?: object, - // tslint:disable-next-line:no-any ): Promise { const response = await awsApiRequest.call(this, service, method, path, body, headers); try { diff --git a/packages/nodes-base/nodes/Aws/Rekognition/GenericFunctions.ts b/packages/nodes-base/nodes/Aws/Rekognition/GenericFunctions.ts index db7fd87ea0..b5a2c53158 100644 --- a/packages/nodes-base/nodes/Aws/Rekognition/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Aws/Rekognition/GenericFunctions.ts @@ -23,7 +23,6 @@ export async function awsApiRequest( headers?: object, option: IDataObject = {}, _region?: string, - // tslint:disable-next-line:no-any ): Promise { const credentials = await this.getCredentials('aws'); @@ -55,7 +54,6 @@ export async function awsApiRequestREST( headers?: object, options: IDataObject = {}, region?: string, - // tslint:disable-next-line:no-any ): Promise { const response = await awsApiRequest.call( this, @@ -85,7 +83,6 @@ export async function awsApiRequestSOAP( headers?: object, option: IDataObject = {}, region?: string, - // tslint:disable-next-line:no-any ): Promise { const response = await awsApiRequest.call( this, @@ -123,7 +120,6 @@ export async function awsApiRequestSOAPAllItems( headers: IDataObject = {}, option: IDataObject = {}, region?: string, - // tslint:disable-next-line:no-any ): Promise { const returnData: IDataObject[] = []; diff --git a/packages/nodes-base/nodes/Aws/S3/GenericFunctions.ts b/packages/nodes-base/nodes/Aws/S3/GenericFunctions.ts index 8e8c68ffc4..a3df891708 100644 --- a/packages/nodes-base/nodes/Aws/S3/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Aws/S3/GenericFunctions.ts @@ -21,7 +21,6 @@ export async function awsApiRequest( headers?: object, option: IDataObject = {}, _region?: string, - // tslint:disable-next-line:no-any ): Promise { const requestOptions = { qs: { @@ -53,7 +52,6 @@ export async function awsApiRequestREST( headers?: object, options: IDataObject = {}, region?: string, - // tslint:disable-next-line:no-any ): Promise { const response = await awsApiRequest.call( this, @@ -83,7 +81,6 @@ export async function awsApiRequestSOAP( headers?: object, option: IDataObject = {}, region?: string, - // tslint:disable-next-line:no-any ): Promise { const response = await awsApiRequest.call( this, @@ -121,7 +118,6 @@ export async function awsApiRequestSOAPAllItems( headers: IDataObject = {}, option: IDataObject = {}, region?: string, - // tslint:disable-next-line:no-any ): Promise { const returnData: IDataObject[] = []; diff --git a/packages/nodes-base/nodes/Aws/SES/GenericFunctions.ts b/packages/nodes-base/nodes/Aws/SES/GenericFunctions.ts index b44f85f0af..eb44d69819 100644 --- a/packages/nodes-base/nodes/Aws/SES/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Aws/SES/GenericFunctions.ts @@ -18,7 +18,6 @@ export async function awsApiRequest( path: string, body?: string, headers?: object, - // tslint:disable-next-line:no-any ): Promise { const credentials = await this.getCredentials('aws'); @@ -48,7 +47,6 @@ export async function awsApiRequestREST( path: string, body?: string, headers?: object, - // tslint:disable-next-line:no-any ): Promise { const response = await awsApiRequest.call(this, service, method, path, body, headers); try { @@ -65,7 +63,6 @@ export async function awsApiRequestSOAP( path: string, body?: string, headers?: object, - // tslint:disable-next-line:no-any ): Promise { const response = await awsApiRequest.call(this, service, method, path, body, headers); try { @@ -93,7 +90,6 @@ export async function awsApiRequestSOAPAllItems( _headers: IDataObject = {}, _option: IDataObject = {}, _region?: string, - // tslint:disable-next-line:no-any ): Promise { const returnData: IDataObject[] = []; diff --git a/packages/nodes-base/nodes/Aws/Textract/GenericFunctions.ts b/packages/nodes-base/nodes/Aws/Textract/GenericFunctions.ts index 8dcb2c4d27..a70f858968 100644 --- a/packages/nodes-base/nodes/Aws/Textract/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Aws/Textract/GenericFunctions.ts @@ -42,7 +42,6 @@ export async function awsApiRequest( path: string, body?: string, headers?: object, - // tslint:disable-next-line:no-any ): Promise { const credentials = await this.getCredentials('aws'); @@ -83,7 +82,6 @@ export async function awsApiRequestREST( path: string, body?: string, headers?: object, - // tslint:disable-next-line:no-any ): Promise { const response = await awsApiRequest.call(this, service, method, path, body, headers); try { @@ -100,7 +98,6 @@ export async function awsApiRequestSOAP( path: string, body?: string, headers?: object, - // tslint:disable-next-line:no-any ): Promise { const response = await awsApiRequest.call(this, service, method, path, body, headers); try { @@ -145,7 +142,6 @@ export async function validateCredentials( this: ICredentialTestFunctions, decryptedCredentials: ICredentialDataDecryptedObject, service: string, - // tslint:disable-next-line:no-any ): Promise { const credentials = decryptedCredentials; diff --git a/packages/nodes-base/nodes/Aws/Transcribe/GenericFunctions.ts b/packages/nodes-base/nodes/Aws/Transcribe/GenericFunctions.ts index d3e8b6c60e..6ab6aadf66 100644 --- a/packages/nodes-base/nodes/Aws/Transcribe/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Aws/Transcribe/GenericFunctions.ts @@ -37,7 +37,6 @@ export async function awsApiRequest( path: string, body?: string, headers?: object, - // tslint:disable-next-line:no-any ): Promise { const credentials = await this.getCredentials('aws'); @@ -77,7 +76,6 @@ export async function awsApiRequestREST( path: string, body?: string, headers?: object, - // tslint:disable-next-line:no-any ): Promise { const response = await awsApiRequest.call(this, service, method, path, body, headers); try { @@ -98,7 +96,6 @@ export async function awsApiRequestRESTAllItems( _headers: IDataObject = {}, _option: IDataObject = {}, _region?: string, - // tslint:disable-next-line:no-any ): Promise { const returnData: IDataObject[] = []; diff --git a/packages/nodes-base/nodes/BambooHr/v1/methods/credentialTest.ts b/packages/nodes-base/nodes/BambooHr/v1/methods/credentialTest.ts index d0c0eb121d..a4601bb52b 100644 --- a/packages/nodes-base/nodes/BambooHr/v1/methods/credentialTest.ts +++ b/packages/nodes-base/nodes/BambooHr/v1/methods/credentialTest.ts @@ -28,7 +28,6 @@ export async function bambooHrApiCredentialTest( async function validateCredentials( this: ICredentialTestFunctions, decryptedCredentials: ICredentialDataDecryptedObject, - // tslint:disable-next-line:no-any ): Promise { const credentials = decryptedCredentials; diff --git a/packages/nodes-base/nodes/Bannerbear/GenericFunctions.ts b/packages/nodes-base/nodes/Bannerbear/GenericFunctions.ts index f531e1caae..5c870b33bb 100644 --- a/packages/nodes-base/nodes/Bannerbear/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Bannerbear/GenericFunctions.ts @@ -10,12 +10,11 @@ export async function bannerbearApiRequest( this: IExecuteFunctions | IWebhookFunctions | IHookFunctions | ILoadOptionsFunctions, method: string, resource: string, - // tslint:disable-next-line:no-any + body: any = {}, query: IDataObject = {}, uri?: string, headers: IDataObject = {}, - // tslint:disable-next-line:no-any ): Promise { const credentials = await this.getCredentials('bannerbearApi'); diff --git a/packages/nodes-base/nodes/Beeminder/GenericFunctions.ts b/packages/nodes-base/nodes/Beeminder/GenericFunctions.ts index d6e5bac296..b07a7c2564 100644 --- a/packages/nodes-base/nodes/Beeminder/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Beeminder/GenericFunctions.ts @@ -10,10 +10,9 @@ export async function beeminderApiRequest( this: IExecuteFunctions | IWebhookFunctions | IHookFunctions | ILoadOptionsFunctions, method: string, endpoint: string, - // tslint:disable-next-line:no-any + body: any = {}, query: IDataObject = {}, - // tslint:disable-next-line:no-any ): Promise { const options: OptionsWithUri = { method, @@ -38,10 +37,9 @@ export async function beeminderApiRequestAllItems( this: IExecuteFunctions | ILoadOptionsFunctions | IHookFunctions, method: string, endpoint: string, - // tslint:disable-next-line:no-any + body: any = {}, query: IDataObject = {}, - // tslint:disable-next-line:no-any ): Promise { const returnData: IDataObject[] = []; diff --git a/packages/nodes-base/nodes/Bitbucket/GenericFunctions.ts b/packages/nodes-base/nodes/Bitbucket/GenericFunctions.ts index df96e4cb48..b969fc06c4 100644 --- a/packages/nodes-base/nodes/Bitbucket/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Bitbucket/GenericFunctions.ts @@ -11,12 +11,11 @@ export async function bitbucketApiRequest( this: IHookFunctions | IExecuteFunctions | IExecuteSingleFunctions | ILoadOptionsFunctions, method: string, resource: string, - // tslint:disable-next-line:no-any + body: any = {}, qs: IDataObject = {}, uri?: string, option: IDataObject = {}, - // tslint:disable-next-line:no-any ): Promise { const credentials = await this.getCredentials('bitbucketApi'); let options: OptionsWithUri = { @@ -51,10 +50,9 @@ export async function bitbucketApiRequestAllItems( propertyName: string, method: string, resource: string, - // tslint:disable-next-line:no-any + body: any = {}, query: IDataObject = {}, - // tslint:disable-next-line:no-any ): Promise { const returnData: IDataObject[] = []; diff --git a/packages/nodes-base/nodes/Bitly/GenericFunctions.ts b/packages/nodes-base/nodes/Bitly/GenericFunctions.ts index 3386455006..0cf922ebee 100644 --- a/packages/nodes-base/nodes/Bitly/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Bitly/GenericFunctions.ts @@ -13,12 +13,11 @@ export async function bitlyApiRequest( this: IHookFunctions | IExecuteFunctions | IExecuteSingleFunctions | ILoadOptionsFunctions, method: string, resource: string, - // tslint:disable-next-line:no-any + body: any = {}, qs: IDataObject = {}, uri?: string, option: IDataObject = {}, - // tslint:disable-next-line:no-any ): Promise { const authenticationMethod = this.getNodeParameter('authentication', 0) as string; let options: OptionsWithUri = { @@ -59,10 +58,9 @@ export async function bitlyApiRequestAllItems( propertyName: string, method: string, resource: string, - // tslint:disable-next-line:no-any + body: any = {}, query: IDataObject = {}, - // tslint:disable-next-line:no-any ): Promise { const returnData: IDataObject[] = []; diff --git a/packages/nodes-base/nodes/Bitwarden/GenericFunctions.ts b/packages/nodes-base/nodes/Bitwarden/GenericFunctions.ts index 7bbf75d04f..7b7313fb62 100644 --- a/packages/nodes-base/nodes/Bitwarden/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Bitwarden/GenericFunctions.ts @@ -19,7 +19,6 @@ export async function bitwardenApiRequest( qs: IDataObject, body: IDataObject, token: string, - // tslint:disable-next-line:no-any ): Promise { const baseUrl = await getBaseUrl.call(this); const options: OptionsWithUri = { @@ -55,7 +54,6 @@ export async function bitwardenApiRequest( */ export async function getAccessToken( this: IExecuteFunctions | ILoadOptionsFunctions, - // tslint:disable-next-line:no-any ): Promise { const credentials = await this.getCredentials('bitwardenApi'); diff --git a/packages/nodes-base/nodes/Box/Box.node.ts b/packages/nodes-base/nodes/Box/Box.node.ts index 2bb8f48d22..6f5876057d 100644 --- a/packages/nodes-base/nodes/Box/Box.node.ts +++ b/packages/nodes-base/nodes/Box/Box.node.ts @@ -226,7 +226,7 @@ export class Box implements INodeType { const role = this.getNodeParameter('role', i) as string; const accessibleBy = this.getNodeParameter('accessibleBy', i) as string; const options = this.getNodeParameter('options', i); - // tslint:disable-next-line: no-any + const body: { accessible_by: IDataObject; [key: string]: any } = { accessible_by: {}, item: { @@ -460,7 +460,7 @@ export class Box implements INodeType { const role = this.getNodeParameter('role', i) as string; const accessibleBy = this.getNodeParameter('accessibleBy', i) as string; const options = this.getNodeParameter('options', i); - // tslint:disable-next-line: no-any + const body: { accessible_by: IDataObject; [key: string]: any } = { accessible_by: {}, item: { diff --git a/packages/nodes-base/nodes/Box/GenericFunctions.ts b/packages/nodes-base/nodes/Box/GenericFunctions.ts index da3b2429cf..e09d5fcbb7 100644 --- a/packages/nodes-base/nodes/Box/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Box/GenericFunctions.ts @@ -13,12 +13,11 @@ export async function boxApiRequest( this: IExecuteFunctions | IExecuteSingleFunctions | ILoadOptionsFunctions | IHookFunctions, method: string, resource: string, - // tslint:disable-next-line:no-any + body: any = {}, qs: IDataObject = {}, uri?: string, option: IDataObject = {}, - // tslint:disable-next-line:no-any ): Promise { let options: OptionsWithUri = { headers: { @@ -53,10 +52,9 @@ export async function boxApiRequestAllItems( propertyName: string, method: string, endpoint: string, - // tslint:disable-next-line:no-any + body: any = {}, query: IDataObject = {}, - // tslint:disable-next-line:no-any ): Promise { const returnData: IDataObject[] = []; diff --git a/packages/nodes-base/nodes/Brandfetch/GenericFunctions.ts b/packages/nodes-base/nodes/Brandfetch/GenericFunctions.ts index 7c5131e553..e51b2435e5 100644 --- a/packages/nodes-base/nodes/Brandfetch/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Brandfetch/GenericFunctions.ts @@ -13,12 +13,11 @@ export async function brandfetchApiRequest( this: IHookFunctions | IExecuteFunctions | IExecuteSingleFunctions | ILoadOptionsFunctions, method: string, resource: string, - // tslint:disable-next-line:no-any + body: any = {}, qs: IDataObject = {}, uri?: string, option: IDataObject = {}, - // tslint:disable-next-line:no-any ): Promise { try { const credentials = await this.getCredentials('brandfetchApi'); diff --git a/packages/nodes-base/nodes/Bubble/GenericFunctions.ts b/packages/nodes-base/nodes/Bubble/GenericFunctions.ts index 53b9747895..4456c1f3f2 100644 --- a/packages/nodes-base/nodes/Bubble/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Bubble/GenericFunctions.ts @@ -77,7 +77,6 @@ export async function bubbleApiRequestAllItems( return returnData; } -// tslint:disable-next-line:no-any export function validateJSON(json: string | undefined): any { let result; try { diff --git a/packages/nodes-base/nodes/Cal/GenericFunctions.ts b/packages/nodes-base/nodes/Cal/GenericFunctions.ts index fd5dbceb4d..f0cb4f44a8 100644 --- a/packages/nodes-base/nodes/Cal/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Cal/GenericFunctions.ts @@ -14,11 +14,10 @@ export async function calApiRequest( this: IExecuteFunctions | IWebhookFunctions | IHookFunctions | ILoadOptionsFunctions, method: IHttpRequestMethods, resource: string, - // tslint:disable-next-line:no-any + body: any = {}, query: IDataObject = {}, option: IDataObject = {}, - // tslint:disable-next-line:no-any ): Promise { const credentials = await this.getCredentials('calApi'); diff --git a/packages/nodes-base/nodes/Calendly/GenericFunctions.ts b/packages/nodes-base/nodes/Calendly/GenericFunctions.ts index 2b386e1e61..65d4f41922 100644 --- a/packages/nodes-base/nodes/Calendly/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Calendly/GenericFunctions.ts @@ -14,12 +14,11 @@ export async function calendlyApiRequest( this: IExecuteFunctions | IWebhookFunctions | IHookFunctions | ILoadOptionsFunctions, method: string, resource: string, - // tslint:disable-next-line:no-any + body: any = {}, query: IDataObject = {}, uri?: string, option: IDataObject = {}, - // tslint:disable-next-line:no-any ): Promise { const { apiKey } = (await this.getCredentials('calendlyApi')) as { apiKey: string }; @@ -64,7 +63,6 @@ export function getAuthenticationType(data: string): 'accessToken' | 'apiKey' { export async function validateCredentials( this: ICredentialTestFunctions, decryptedCredentials: ICredentialDataDecryptedObject, - // tslint:disable-next-line:no-any ): Promise { const credentials = decryptedCredentials; diff --git a/packages/nodes-base/nodes/CircleCi/GenericFunctions.ts b/packages/nodes-base/nodes/CircleCi/GenericFunctions.ts index 5187874b80..8553ddeb54 100644 --- a/packages/nodes-base/nodes/CircleCi/GenericFunctions.ts +++ b/packages/nodes-base/nodes/CircleCi/GenericFunctions.ts @@ -13,12 +13,11 @@ export async function circleciApiRequest( this: IHookFunctions | IExecuteFunctions | IExecuteSingleFunctions | ILoadOptionsFunctions, method: string, resource: string, - // tslint:disable-next-line:no-any + body: any = {}, qs: IDataObject = {}, uri?: string, option: IDataObject = {}, - // tslint:disable-next-line:no-any ): Promise { const credentials = await this.getCredentials('circleCiApi'); let options: OptionsWithUri = { @@ -52,10 +51,9 @@ export async function circleciApiRequestAllItems( propertyName: string, method: string, resource: string, - // tslint:disable-next-line:no-any + body: any = {}, query: IDataObject = {}, - // tslint:disable-next-line:no-any ): Promise { const returnData: IDataObject[] = []; diff --git a/packages/nodes-base/nodes/Cisco/Webex/GenericFunctions.ts b/packages/nodes-base/nodes/Cisco/Webex/GenericFunctions.ts index 561dac937f..6d7dec6397 100644 --- a/packages/nodes-base/nodes/Cisco/Webex/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Cisco/Webex/GenericFunctions.ts @@ -18,12 +18,11 @@ export async function webexApiRequest( this: IExecuteFunctions | ILoadOptionsFunctions | IHookFunctions | IWebhookFunctions, method: string, resource: string, - // tslint:disable-next-line:no-any + body: any = {}, qs: IDataObject = {}, uri?: string, option: IDataObject = {}, - // tslint:disable-next-line:no-any ): Promise { let options: OptionsWithUri = { method, @@ -56,11 +55,10 @@ export async function webexApiRequestAllItems( propertyName: string, method: string, endpoint: string, - // tslint:disable-next-line:no-any + body: any = {}, query: IDataObject = {}, options: IDataObject = {}, - // tslint:disable-next-line:no-any ): Promise { const returnData: IDataObject[] = []; @@ -140,7 +138,6 @@ export function getAttachemnts(attachements: IDataObject[]) { const actions: IDataObject[] = []; for (const element of ((attachment?.elementsUi as IDataObject) .elementValues as IDataObject[]) || []) { - // tslint:disable-next-line: no-any const { type, ...rest } = element as { type: string; [key: string]: any }; if (type.startsWith('input')) { body.push({ @@ -153,7 +150,6 @@ export function getAttachemnts(attachements: IDataObject[]) { } for (const action of ((attachment?.actionsUi as IDataObject).actionValues as IDataObject[]) || []) { - // tslint:disable-next-line: no-any const { type, ...rest } = action as { type: string; [key: string]: any }; actions.push({ type: `Action.${upperFirst(type)}`, ...removeEmptyProperties(rest) }); } @@ -628,7 +624,6 @@ export function getInputTextProperties(): INodeProperties[] { ]; } -// tslint:disable-next-line: no-any function removeEmptyProperties(rest: { [key: string]: any }) { return Object.keys(rest) .filter((k) => rest[k] !== '') diff --git a/packages/nodes-base/nodes/Citrix/ADC/GenericFunctions.ts b/packages/nodes-base/nodes/Citrix/ADC/GenericFunctions.ts index d16f806255..0e5c6c1e16 100644 --- a/packages/nodes-base/nodes/Citrix/ADC/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Citrix/ADC/GenericFunctions.ts @@ -18,7 +18,6 @@ export async function citrixADCApiRequest( qs: IDataObject = {}, uri?: string, option: IDataObject = {}, - // tslint:disable-next-line:no-any ): Promise { const { url } = (await this.getCredentials('citrixAdcApi')) as { url: string }; diff --git a/packages/nodes-base/nodes/Clearbit/GenericFunctions.ts b/packages/nodes-base/nodes/Clearbit/GenericFunctions.ts index 1acfc63f63..43ef7fa10f 100644 --- a/packages/nodes-base/nodes/Clearbit/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Clearbit/GenericFunctions.ts @@ -14,12 +14,11 @@ export async function clearbitApiRequest( method: string, api: string, resource: string, - // tslint:disable-next-line:no-any + body: any = {}, qs: IDataObject = {}, uri?: string, option: IDataObject = {}, - // tslint:disable-next-line:no-any ): Promise { const credentials = await this.getCredentials('clearbitApi'); let options: OptionsWithUri = { diff --git a/packages/nodes-base/nodes/ClickUp/GenericFunctions.ts b/packages/nodes-base/nodes/ClickUp/GenericFunctions.ts index 77c9e25313..3963bf0304 100644 --- a/packages/nodes-base/nodes/ClickUp/GenericFunctions.ts +++ b/packages/nodes-base/nodes/ClickUp/GenericFunctions.ts @@ -19,12 +19,11 @@ export async function clickupApiRequest( | IWebhookFunctions, method: string, resource: string, - // tslint:disable-next-line:no-any + body: any = {}, qs: IDataObject = {}, uri?: string, _option: IDataObject = {}, - // tslint:disable-next-line:no-any ): Promise { const options: OptionsWithUri = { headers: { @@ -65,10 +64,9 @@ export async function clickupApiRequestAllItems( propertyName: string, method: string, resource: string, - // tslint:disable-next-line:no-any + body: any = {}, query: IDataObject = {}, - // tslint:disable-next-line:no-any ): Promise { const returnData: IDataObject[] = []; @@ -86,7 +84,6 @@ export async function clickupApiRequestAllItems( return returnData; } -// tslint:disable-next-line:no-any export function validateJSON(json: string | undefined): any { let result; try { diff --git a/packages/nodes-base/nodes/Clockify/CommonDtos.ts b/packages/nodes-base/nodes/Clockify/CommonDtos.ts index da8530119a..858b58bb97 100644 --- a/packages/nodes-base/nodes/Clockify/CommonDtos.ts +++ b/packages/nodes-base/nodes/Clockify/CommonDtos.ts @@ -25,7 +25,7 @@ export interface IMembershipDto { export interface ITagDto { id: string; - name: any; // tslint:disable-line:no-any + name: any; workspaceId: string; archived: boolean; } @@ -34,7 +34,7 @@ export interface ITaskDto { assigneeIds: object; estimate: string; id: string; - name: any; // tslint:disable-line:no-any + name: any; workspaceId: string; projectId: string; 'is-active': boolean; diff --git a/packages/nodes-base/nodes/Clockify/GenericFunctions.ts b/packages/nodes-base/nodes/Clockify/GenericFunctions.ts index 95e41e5326..478134d121 100644 --- a/packages/nodes-base/nodes/Clockify/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Clockify/GenericFunctions.ts @@ -8,12 +8,11 @@ export async function clockifyApiRequest( this: ILoadOptionsFunctions | IPollFunctions | IExecuteFunctions, method: string, resource: string, - // tslint:disable-next-line:no-any + body: any = {}, qs: IDataObject = {}, uri?: string, _option: IDataObject = {}, - // tslint:disable-next-line:no-any ): Promise { const BASE_URL = 'https://api.clockify.me/api/v1'; @@ -35,10 +34,9 @@ export async function clockifyApiRequestAllItems( this: IExecuteFunctions | IPollFunctions | ILoadOptionsFunctions, method: string, endpoint: string, - // tslint:disable-next-line:no-any + body: any = {}, query: IDataObject = {}, - // tslint:disable-next-line:no-any ): Promise { const returnData: IDataObject[] = []; diff --git a/packages/nodes-base/nodes/Cloudflare/GenericFunctions.ts b/packages/nodes-base/nodes/Cloudflare/GenericFunctions.ts index 99a52fcc4e..72fd1dfd40 100644 --- a/packages/nodes-base/nodes/Cloudflare/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Cloudflare/GenericFunctions.ts @@ -17,7 +17,6 @@ export async function cloudflareApiRequest( qs: IDataObject = {}, uri?: string, headers: IDataObject = {}, - // tslint:disable-next-line:no-any ): Promise { const options: OptionsWithUri = { method, @@ -47,7 +46,6 @@ export async function cloudflareApiRequestAllItems( endpoint: string, body: IDataObject = {}, query: IDataObject = {}, - // tslint:disable-next-line:no-any ): Promise { const returnData: IDataObject[] = []; diff --git a/packages/nodes-base/nodes/Cockpit/CollectionFunctions.ts b/packages/nodes-base/nodes/Cockpit/CollectionFunctions.ts index 1201105447..629e737144 100644 --- a/packages/nodes-base/nodes/Cockpit/CollectionFunctions.ts +++ b/packages/nodes-base/nodes/Cockpit/CollectionFunctions.ts @@ -8,7 +8,6 @@ export async function createCollectionEntry( resourceName: string, data: IDataObject, id?: string, - // tslint:disable-next-line:no-any ): Promise { const body: ICollection = { data, @@ -28,7 +27,6 @@ export async function getAllCollectionEntries( this: IExecuteFunctions | IExecuteSingleFunctions | ILoadOptionsFunctions, resourceName: string, options: IDataObject, - // tslint:disable-next-line:no-any ): Promise { const body: ICollection = {}; diff --git a/packages/nodes-base/nodes/Cockpit/GenericFunctions.ts b/packages/nodes-base/nodes/Cockpit/GenericFunctions.ts index db4188b9ae..fd7deba539 100644 --- a/packages/nodes-base/nodes/Cockpit/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Cockpit/GenericFunctions.ts @@ -6,11 +6,10 @@ export async function cockpitApiRequest( this: IExecuteFunctions | IExecuteSingleFunctions | ILoadOptionsFunctions, method: string, resource: string, - // tslint:disable-next-line:no-any + body: any = {}, uri?: string, option: IDataObject = {}, - // tslint:disable-next-line:no-any ): Promise { const credentials = await this.getCredentials('cockpitApi'); let options: OptionsWithUri = { diff --git a/packages/nodes-base/nodes/Cockpit/SingletonFunctions.ts b/packages/nodes-base/nodes/Cockpit/SingletonFunctions.ts index 89be4925b1..43ae4e7662 100644 --- a/packages/nodes-base/nodes/Cockpit/SingletonFunctions.ts +++ b/packages/nodes-base/nodes/Cockpit/SingletonFunctions.ts @@ -4,7 +4,6 @@ import { cockpitApiRequest } from './GenericFunctions'; export async function getSingleton( this: IExecuteFunctions | IExecuteSingleFunctions | ILoadOptionsFunctions, resourceName: string, - // tslint:disable-next-line:no-any ): Promise { return cockpitApiRequest.call(this, 'get', `/singletons/get/${resourceName}`); } diff --git a/packages/nodes-base/nodes/Coda/GenericFunctions.ts b/packages/nodes-base/nodes/Coda/GenericFunctions.ts index fc6ccfb83b..430cc6026e 100644 --- a/packages/nodes-base/nodes/Coda/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Coda/GenericFunctions.ts @@ -6,12 +6,11 @@ export async function codaApiRequest( this: IExecuteFunctions | IExecuteSingleFunctions | ILoadOptionsFunctions, method: string, resource: string, - // tslint:disable-next-line:no-any + body: any = {}, qs: IDataObject = {}, uri?: string, option: IDataObject = {}, - // tslint:disable-next-line:no-any ): Promise { const credentials = await this.getCredentials('codaApi'); @@ -44,10 +43,9 @@ export async function codaApiRequestAllItems( propertyName: string, method: string, resource: string, - // tslint:disable-next-line:no-any + body: any = {}, query: IDataObject = {}, - // tslint:disable-next-line:no-any ): Promise { const returnData: IDataObject[] = []; diff --git a/packages/nodes-base/nodes/Code/Sandbox.ts b/packages/nodes-base/nodes/Code/Sandbox.ts index 6fc43c8bf1..9bfbc67905 100644 --- a/packages/nodes-base/nodes/Code/Sandbox.ts +++ b/packages/nodes-base/nodes/Code/Sandbox.ts @@ -254,7 +254,7 @@ export class Sandbox extends NodeVM { export function getSandboxContext(this: IExecuteFunctions, index?: number) { const sandboxContext: Record & { $item: (i: number) => IWorkflowDataProxyData; - $input: any; // tslint:disable-line: no-any + $input: any; } = { // from NodeExecuteFunctions $getNodeParameter: this.getNodeParameter, diff --git a/packages/nodes-base/nodes/CoinGecko/GenericFunctions.ts b/packages/nodes-base/nodes/CoinGecko/GenericFunctions.ts index d34c41d0da..45ed9ee335 100644 --- a/packages/nodes-base/nodes/CoinGecko/GenericFunctions.ts +++ b/packages/nodes-base/nodes/CoinGecko/GenericFunctions.ts @@ -8,12 +8,11 @@ export async function coinGeckoApiRequest( this: IExecuteFunctions | IExecuteSingleFunctions | ILoadOptionsFunctions, method: string, endpoint: string, - // tslint:disable-next-line:no-any + body: any = {}, qs: IDataObject = {}, uri?: string, option: IDataObject = {}, - // tslint:disable-next-line:no-any ): Promise { let options: OptionsWithUri = { headers: { @@ -46,10 +45,9 @@ export async function coinGeckoRequestAllItems( propertyName: string, method: string, endpoint: string, - // tslint:disable-next-line:no-any + body: any = {}, query: IDataObject = {}, - // tslint:disable-next-line:no-any ): Promise { const returnData: IDataObject[] = []; diff --git a/packages/nodes-base/nodes/Contentful/Contentful.node.ts b/packages/nodes-base/nodes/Contentful/Contentful.node.ts index 860bbe5898..b3a1dbca44 100644 --- a/packages/nodes-base/nodes/Contentful/Contentful.node.ts +++ b/packages/nodes-base/nodes/Contentful/Contentful.node.ts @@ -194,7 +194,7 @@ export class Contentful implements INodeType { if (!rawData) { const assets: IDataObject[] = []; - // tslint:disable-next-line: no-any + responseData.map((asset: any) => { assets.push(asset.fields); }); @@ -214,7 +214,7 @@ export class Contentful implements INodeType { if (!rawData) { const assets: IDataObject[] = []; - // tslint:disable-next-line: no-any + responseData.map((asset: any) => { assets.push(asset.fields); }); @@ -293,7 +293,7 @@ export class Contentful implements INodeType { if (!rawData) { const assets: IDataObject[] = []; - // tslint:disable-next-line: no-any + responseData.map((asset: any) => { assets.push(asset.fields); }); @@ -313,7 +313,7 @@ export class Contentful implements INodeType { if (!rawData) { const assets: IDataObject[] = []; - // tslint:disable-next-line: no-any + responseData.map((asset: any) => { assets.push(asset.fields); }); diff --git a/packages/nodes-base/nodes/Contentful/GenericFunctions.ts b/packages/nodes-base/nodes/Contentful/GenericFunctions.ts index a00d3584a4..2732657073 100644 --- a/packages/nodes-base/nodes/Contentful/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Contentful/GenericFunctions.ts @@ -8,12 +8,11 @@ export async function contentfulApiRequest( this: IExecuteFunctions | IExecuteSingleFunctions | ILoadOptionsFunctions, method: string, resource: string, - // tslint:disable-next-line:no-any + body: any = {}, qs: IDataObject = {}, uri?: string, _option: IDataObject = {}, - // tslint:disable-next-line:no-any ): Promise { const credentials = await this.getCredentials('contentfulApi'); const source = this.getNodeParameter('source', 0) as string; @@ -45,10 +44,9 @@ export async function contenfulApiRequestAllItems( propertyName: string, method: string, resource: string, - // tslint:disable-next-line:no-any + body: any = {}, query: IDataObject = {}, - // tslint:disable-next-line:no-any ): Promise { const returnData: IDataObject[] = []; diff --git a/packages/nodes-base/nodes/ConvertKit/GenericFunctions.ts b/packages/nodes-base/nodes/ConvertKit/GenericFunctions.ts index 922f55e6be..7e0b5544f1 100644 --- a/packages/nodes-base/nodes/ConvertKit/GenericFunctions.ts +++ b/packages/nodes-base/nodes/ConvertKit/GenericFunctions.ts @@ -8,12 +8,11 @@ export async function convertKitApiRequest( this: IExecuteFunctions | IExecuteSingleFunctions | ILoadOptionsFunctions | IHookFunctions, method: string, endpoint: string, - // tslint:disable-next-line:no-any + body: any = {}, qs: IDataObject = {}, uri?: string, option: IDataObject = {}, - // tslint:disable-next-line:no-any ): Promise { const credentials = await this.getCredentials('convertKitApi'); diff --git a/packages/nodes-base/nodes/Cortex/GenericFunctions.ts b/packages/nodes-base/nodes/Cortex/GenericFunctions.ts index d8f22b5eea..68829e8bd6 100644 --- a/packages/nodes-base/nodes/Cortex/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Cortex/GenericFunctions.ts @@ -15,12 +15,11 @@ export async function cortexApiRequest( this: IHookFunctions | IExecuteFunctions | IExecuteSingleFunctions | ILoadOptionsFunctions, method: string, resource: string, - // tslint:disable-next-line:no-any + body: any = {}, query: IDataObject = {}, uri?: string, option: IDataObject = {}, - // tslint:disable-next-line:no-any ): Promise { const credentials = await this.getCredentials('cortexApi'); diff --git a/packages/nodes-base/nodes/CustomerIo/CustomerIo.node.ts b/packages/nodes-base/nodes/CustomerIo/CustomerIo.node.ts index 88a49616a2..36933ba038 100644 --- a/packages/nodes-base/nodes/CustomerIo/CustomerIo.node.ts +++ b/packages/nodes-base/nodes/CustomerIo/CustomerIo.node.ts @@ -171,7 +171,7 @@ export class CustomerIo implements INodeType { const additionalFields = this.getNodeParameter('additionalFields', i); if (additionalFields.customProperties) { - const data: any = {}; // tslint:disable-line:no-any + const data: any = {}; //@ts-ignore additionalFields.customProperties.customProperty.map((property) => { data[property.key] = property.value; @@ -238,7 +238,7 @@ export class CustomerIo implements INodeType { } } else { const additionalFields = this.getNodeParameter('additionalFields', i); - const data: any = {}; // tslint:disable-line:no-any + const data: any = {}; if (additionalFields.customAttributes) { //@ts-ignore @@ -287,7 +287,7 @@ export class CustomerIo implements INodeType { } } else { const additionalFields = this.getNodeParameter('additionalFields', i); - const data: any = {}; // tslint:disable-line:no-any + const data: any = {}; if (additionalFields.customAttributes) { //@ts-ignore diff --git a/packages/nodes-base/nodes/CustomerIo/GenericFunctions.ts b/packages/nodes-base/nodes/CustomerIo/GenericFunctions.ts index e6a8d687c0..b950baf67e 100644 --- a/packages/nodes-base/nodes/CustomerIo/GenericFunctions.ts +++ b/packages/nodes-base/nodes/CustomerIo/GenericFunctions.ts @@ -46,7 +46,6 @@ export function eventExists(currentEvents: string[], webhookEvents: IDataObject) return true; } -// tslint:disable-next-line:no-any export function validateJSON(json: string | undefined): any { let result; try { diff --git a/packages/nodes-base/nodes/Demio/GenericFunctions.ts b/packages/nodes-base/nodes/Demio/GenericFunctions.ts index e0128099c1..3ad09af3b3 100644 --- a/packages/nodes-base/nodes/Demio/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Demio/GenericFunctions.ts @@ -13,12 +13,11 @@ export async function demioApiRequest( this: IHookFunctions | IExecuteFunctions | IExecuteSingleFunctions | ILoadOptionsFunctions, method: string, resource: string, - // tslint:disable-next-line:no-any + body: any = {}, qs: IDataObject = {}, uri?: string, option: IDataObject = {}, - // tslint:disable-next-line:no-any ): Promise { try { const credentials = await this.getCredentials('demioApi'); diff --git a/packages/nodes-base/nodes/Dhl/GenericFunctions.ts b/packages/nodes-base/nodes/Dhl/GenericFunctions.ts index a3adde2148..1cf1d59eb2 100644 --- a/packages/nodes-base/nodes/Dhl/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Dhl/GenericFunctions.ts @@ -18,12 +18,11 @@ export async function dhlApiRequest( this: IHookFunctions | IExecuteFunctions | IExecuteSingleFunctions | ILoadOptionsFunctions, method: string, path: string, - // tslint:disable-next-line:no-any + body: any = {}, qs: IDataObject = {}, uri?: string, option: IDataObject = {}, - // tslint:disable-next-line:no-any ): Promise { const credentials = (await this.getCredentials('dhlApi')) as { apiKey: string }; @@ -52,7 +51,6 @@ export async function dhlApiRequest( export async function validateCredentials( this: ICredentialTestFunctions, decryptedCredentials: ICredentialDataDecryptedObject, - // tslint:disable-next-line:no-any ): Promise { const credentials = decryptedCredentials; diff --git a/packages/nodes-base/nodes/Discord/Interfaces.ts b/packages/nodes-base/nodes/Discord/Interfaces.ts index e017da0a76..4f3b136228 100644 --- a/packages/nodes-base/nodes/Discord/Interfaces.ts +++ b/packages/nodes-base/nodes/Discord/Interfaces.ts @@ -1,5 +1,3 @@ -// tslint:disable: no-any - export interface DiscordWebhook { content?: string; username?: string; diff --git a/packages/nodes-base/nodes/Discourse/GenericFunctions.ts b/packages/nodes-base/nodes/Discourse/GenericFunctions.ts index 0c93c2d907..7518595af7 100644 --- a/packages/nodes-base/nodes/Discourse/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Discourse/GenericFunctions.ts @@ -8,11 +8,10 @@ export async function discourseApiRequest( this: IExecuteFunctions | IExecuteSingleFunctions | ILoadOptionsFunctions, method: string, path: string, - // tslint:disable-next-line:no-any + body: any = {}, qs: IDataObject = {}, _option = {}, - // tslint:disable-next-line:no-any ): Promise { const credentials = (await this.getCredentials('discourseApi')) as { url: string }; @@ -38,10 +37,9 @@ export async function discourseApiRequestAllItems( this: IExecuteFunctions | ILoadOptionsFunctions, method: string, endpoint: string, - // tslint:disable-next-line:no-any + body: any = {}, query: IDataObject = {}, - // tslint:disable-next-line:no-any ): Promise { const returnData: IDataObject[] = []; diff --git a/packages/nodes-base/nodes/Disqus/GenericFunctions.ts b/packages/nodes-base/nodes/Disqus/GenericFunctions.ts index 7c43918d99..20d2092961 100644 --- a/packages/nodes-base/nodes/Disqus/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Disqus/GenericFunctions.ts @@ -14,7 +14,6 @@ export async function disqusApiRequest( uri?: string, body: IDataObject = {}, option: IDataObject = {}, - // tslint:disable-next-line:no-any ): Promise { const credentials = (await this.getCredentials('disqusApi')) as IDataObject; qs.api_key = credentials.accessToken; @@ -60,7 +59,6 @@ export async function disqusApiRequestAllItems( uri?: string, body: IDataObject = {}, option: IDataObject = {}, - // tslint:disable-next-line:no-any ): Promise { const returnData: IDataObject[] = []; diff --git a/packages/nodes-base/nodes/Drift/GenericFunctions.ts b/packages/nodes-base/nodes/Drift/GenericFunctions.ts index 1dd7eadcf9..0caf34c7e6 100644 --- a/packages/nodes-base/nodes/Drift/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Drift/GenericFunctions.ts @@ -8,12 +8,11 @@ export async function driftApiRequest( this: IExecuteFunctions | IWebhookFunctions | IHookFunctions | ILoadOptionsFunctions, method: string, resource: string, - // tslint:disable-next-line:no-any + body: any = {}, query: IDataObject = {}, uri?: string, option: IDataObject = {}, - // tslint:disable-next-line:no-any ): Promise { let options: OptionsWithUri = { headers: {}, diff --git a/packages/nodes-base/nodes/Dropbox/GenericFunctions.ts b/packages/nodes-base/nodes/Dropbox/GenericFunctions.ts index d93466c2c8..d8997e541e 100644 --- a/packages/nodes-base/nodes/Dropbox/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Dropbox/GenericFunctions.ts @@ -16,7 +16,6 @@ export async function dropboxApiRequest( query: IDataObject = {}, headers: object = {}, option: IDataObject = {}, - // tslint:disable-next-line:no-any ): Promise { const options: OptionsWithUri = { headers, @@ -51,11 +50,10 @@ export async function dropboxpiRequestAllItems( propertyName: string, method: string, endpoint: string, - // tslint:disable-next-line:no-any + body: any = {}, query: IDataObject = {}, headers: IDataObject = {}, - // tslint:disable-next-line:no-any ): Promise { const resource = this.getNodeParameter('resource', 0) as string; diff --git a/packages/nodes-base/nodes/Dropcontact/Dropcontact.node.ts b/packages/nodes-base/nodes/Dropcontact/Dropcontact.node.ts index 826720b3f1..181a405915 100644 --- a/packages/nodes-base/nodes/Dropcontact/Dropcontact.node.ts +++ b/packages/nodes-base/nodes/Dropcontact/Dropcontact.node.ts @@ -243,7 +243,7 @@ export class Dropcontact implements INodeType { const entryData = this.getInputData(); const resource = this.getNodeParameter('resource', 0); const operation = this.getNodeParameter('operation', 0); - // tslint:disable-next-line: no-any + let responseData: any; const returnData: IDataObject[] = []; @@ -287,7 +287,7 @@ export class Dropcontact implements INodeType { if (simplify === false) { const waitTime = this.getNodeParameter('options.waitTime', 0, 45) as number; - // tslint:disable-next-line: no-any + const delay = (ms: any) => new Promise((res) => setTimeout(res, ms * 1000)); await delay(waitTime); responseData = await dropcontactApiRequest.call( diff --git a/packages/nodes-base/nodes/ERPNext/GenericFunctions.ts b/packages/nodes-base/nodes/ERPNext/GenericFunctions.ts index 9d9bcf9958..0f269b8227 100644 --- a/packages/nodes-base/nodes/ERPNext/GenericFunctions.ts +++ b/packages/nodes-base/nodes/ERPNext/GenericFunctions.ts @@ -62,7 +62,6 @@ export async function erpNextApiRequestAllItems( body: IDataObject, query: IDataObject = {}, ) { - // tslint:disable-next-line: no-any const returnData: any[] = []; let responseData; diff --git a/packages/nodes-base/nodes/Egoi/GenericFunctions.ts b/packages/nodes-base/nodes/Egoi/GenericFunctions.ts index 25f4a63be8..bda8d0321c 100644 --- a/packages/nodes-base/nodes/Egoi/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Egoi/GenericFunctions.ts @@ -31,11 +31,10 @@ export async function egoiApiRequest( this: IHookFunctions | IExecuteFunctions | IExecuteSingleFunctions | ILoadOptionsFunctions, method: string, endpoint: string, - // tslint:disable-next-line:no-any + body: any = {}, qs: IDataObject = {}, _headers?: object, - // tslint:disable-next-line:no-any ): Promise { const credentials = await this.getCredentials('egoiApi'); @@ -67,10 +66,9 @@ export async function egoiApiRequestAllItems( propertyName: string, method: string, endpoint: string, - // tslint:disable-next-line:no-any + body: any = {}, query: IDataObject = {}, - // tslint:disable-next-line:no-any ): Promise { const returnData: IDataObject[] = []; @@ -101,7 +99,6 @@ export async function simplify(this: IExecuteFunctions, contacts: IContact[], li for (const contact of contacts) { const extras = contact.extra.reduce( - // tslint:disable-next-line:no-any (acumulator: IDataObject, currentValue: IDataObject): any => { const key = fieldsKeyValue[currentValue.field_id as string] as string; return { [key]: currentValue.value, ...acumulator }; diff --git a/packages/nodes-base/nodes/Elastic/ElasticSecurity/GenericFunctions.ts b/packages/nodes-base/nodes/Elastic/ElasticSecurity/GenericFunctions.ts index b35c6a98b0..deca2d1e81 100644 --- a/packages/nodes-base/nodes/Elastic/ElasticSecurity/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Elastic/ElasticSecurity/GenericFunctions.ts @@ -63,7 +63,7 @@ export async function elasticSecurityApiRequestAllItems( ) { let _page = 1; const returnData: IDataObject[] = []; - let responseData: any; // tslint:disable-line + let responseData: any; const resource = this.getNodeParameter('resource', 0) as 'case' | 'caseComment'; diff --git a/packages/nodes-base/nodes/Elastic/Elasticsearch/GenericFunctions.ts b/packages/nodes-base/nodes/Elastic/Elasticsearch/GenericFunctions.ts index d2f151ef9f..bc9ae2cdaf 100644 --- a/packages/nodes-base/nodes/Elastic/Elasticsearch/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Elastic/Elasticsearch/GenericFunctions.ts @@ -46,7 +46,6 @@ export async function elasticsearchApiRequestAllItems( indexId: string, body: IDataObject = {}, qs: IDataObject = {}, - // tslint:disable-next-line:no-any ): Promise { //https://www.elastic.co/guide/en/elasticsearch/reference/7.16/paginate-search-results.html#search-after try { diff --git a/packages/nodes-base/nodes/EmailReadImap/v1/EmailReadImapV1.node.ts b/packages/nodes-base/nodes/EmailReadImap/v1/EmailReadImapV1.node.ts index a0bdaac4b3..0a9a32b3a0 100644 --- a/packages/nodes-base/nodes/EmailReadImap/v1/EmailReadImapV1.node.ts +++ b/packages/nodes-base/nodes/EmailReadImap/v1/EmailReadImapV1.node.ts @@ -246,7 +246,7 @@ export class EmailReadImapV1 implements INodeType { let connection: ImapSimple; // Returns the email text - // tslint:disable-next-line:no-any + const getText = async (parts: any[], message: Message, subtype: string) => { if (!message.attributes.struct) { return ''; @@ -272,7 +272,7 @@ export class EmailReadImapV1 implements INodeType { // Returns the email attachments const getAttachment = async ( connection: ImapSimple, - // tslint:disable-next-line:no-any + parts: any[], message: Message, ): Promise => { diff --git a/packages/nodes-base/nodes/EmailReadImap/v2/EmailReadImapV2.node.ts b/packages/nodes-base/nodes/EmailReadImap/v2/EmailReadImapV2.node.ts index 8554803d35..a3dd0b954d 100644 --- a/packages/nodes-base/nodes/EmailReadImap/v2/EmailReadImapV2.node.ts +++ b/packages/nodes-base/nodes/EmailReadImap/v2/EmailReadImapV2.node.ts @@ -253,7 +253,7 @@ export class EmailReadImapV2 implements INodeType { let isCurrentlyReconnecting = false; // Returns the email text - // tslint:disable-next-line:no-any + const getText = async (parts: any[], message: Message, subtype: string) => { if (!message.attributes.struct) { return ''; @@ -279,7 +279,7 @@ export class EmailReadImapV2 implements INodeType { // Returns the email attachments const getAttachment = async ( connection: ImapSimple, - // tslint:disable-next-line:no-any + parts: any[], message: Message, ): Promise => { diff --git a/packages/nodes-base/nodes/Eventbrite/GenericFunctions.ts b/packages/nodes-base/nodes/Eventbrite/GenericFunctions.ts index 438bfb6064..09d8eb656b 100644 --- a/packages/nodes-base/nodes/Eventbrite/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Eventbrite/GenericFunctions.ts @@ -19,12 +19,11 @@ export async function eventbriteApiRequest( | IWebhookFunctions, method: string, resource: string, - // tslint:disable-next-line:no-any + body: any = {}, qs: IDataObject = {}, uri?: string, option: IDataObject = {}, - // tslint:disable-next-line:no-any ): Promise { let options: OptionsWithUri = { headers: {}, @@ -64,10 +63,9 @@ export async function eventbriteApiRequestAllItems( propertyName: string, method: string, resource: string, - // tslint:disable-next-line:no-any + body: any = {}, query: IDataObject = {}, - // tslint:disable-next-line:no-any ): Promise { const returnData: IDataObject[] = []; diff --git a/packages/nodes-base/nodes/Facebook/FacebookGraphApi.node.ts b/packages/nodes-base/nodes/Facebook/FacebookGraphApi.node.ts index 556019e2af..fa3971f97b 100644 --- a/packages/nodes-base/nodes/Facebook/FacebookGraphApi.node.ts +++ b/packages/nodes-base/nodes/Facebook/FacebookGraphApi.node.ts @@ -293,7 +293,7 @@ export class FacebookGraphApi implements INodeType { async execute(this: IExecuteFunctions): Promise { const items = this.getInputData(); - let response: any; // tslint:disable-line:no-any + let response: any; const returnItems: INodeExecutionData[] = []; for (let itemIndex = 0; itemIndex < items.length; itemIndex++) { diff --git a/packages/nodes-base/nodes/Facebook/GenericFunctions.ts b/packages/nodes-base/nodes/Facebook/GenericFunctions.ts index 9650251a71..ac6a7f264c 100644 --- a/packages/nodes-base/nodes/Facebook/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Facebook/GenericFunctions.ts @@ -21,12 +21,11 @@ export async function facebookApiRequest( | IWebhookFunctions, method: string, resource: string, - // tslint:disable-next-line:no-any + body: any = {}, qs: IDataObject = {}, uri?: string, _option: IDataObject = {}, - // tslint:disable-next-line:no-any ): Promise { let credentials; @@ -549,7 +548,6 @@ export function getFields(object: string) { value: 'account_update', }, ], - // tslint:disable-next-line: no-any } as { [key: string]: any }; return [{ name: '*', value: '*' }] diff --git a/packages/nodes-base/nodes/Figma/GenericFunctions.ts b/packages/nodes-base/nodes/Figma/GenericFunctions.ts index 5aa27cbf47..5bf1fbdfb9 100644 --- a/packages/nodes-base/nodes/Figma/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Figma/GenericFunctions.ts @@ -13,12 +13,11 @@ export async function figmaApiRequest( this: IHookFunctions | IExecuteFunctions | IExecuteSingleFunctions | ILoadOptionsFunctions, method: string, resource: string, - // tslint:disable-next-line:no-any + body: any = {}, _qs: IDataObject = {}, uri?: string, option: IDataObject = {}, - // tslint:disable-next-line:no-any ): Promise { const credentials = await this.getCredentials('figmaApi'); diff --git a/packages/nodes-base/nodes/FileMaker/GenericFunctions.ts b/packages/nodes-base/nodes/FileMaker/GenericFunctions.ts index 671691dd33..bee4327b82 100644 --- a/packages/nodes-base/nodes/FileMaker/GenericFunctions.ts +++ b/packages/nodes-base/nodes/FileMaker/GenericFunctions.ts @@ -31,7 +31,6 @@ interface ScriptObject { export async function layoutsApiRequest( this: ILoadOptionsFunctions | IExecuteFunctions | IExecuteSingleFunctions, ): Promise { - // tslint:disable-line:no-any const token = await getToken.call(this); const credentials = await this.getCredentials('fileMaker'); @@ -77,10 +76,7 @@ function parseLayouts(layouts: LayoutObject[]): INodePropertyOptions[] { * Make an API request to ActiveCampaign * */ -export async function getFields( - this: ILoadOptionsFunctions, - // tslint:disable-next-line:no-any -): Promise { +export async function getFields(this: ILoadOptionsFunctions): Promise { const token = await getToken.call(this); const credentials = await this.getCredentials('fileMaker'); const layout = this.getCurrentNodeParameter('layout') as string; @@ -111,10 +107,7 @@ export async function getFields( * Make an API request to ActiveCampaign * */ -export async function getPortals( - this: ILoadOptionsFunctions, - // tslint:disable-next-line:no-any -): Promise { +export async function getPortals(this: ILoadOptionsFunctions): Promise { const token = await getToken.call(this); const credentials = await this.getCredentials('fileMaker'); const layout = this.getCurrentNodeParameter('layout') as string; @@ -145,10 +138,7 @@ export async function getPortals( * Make an API request to ActiveCampaign * */ -export async function getScripts( - this: ILoadOptionsFunctions, - // tslint:disable-next-line:no-any -): Promise { +export async function getScripts(this: ILoadOptionsFunctions): Promise { const token = await getToken.call(this); const credentials = await this.getCredentials('fileMaker'); @@ -193,7 +183,6 @@ function parseScriptsList(scripts: ScriptObject[]): INodePropertyOptions[] { export async function getToken( this: ILoadOptionsFunctions | IExecuteFunctions | IExecuteSingleFunctions, - // tslint:disable-next-line:no-any ): Promise { const credentials = await this.getCredentials('fileMaker'); @@ -246,7 +235,6 @@ export async function getToken( export async function logout( this: ILoadOptionsFunctions | IExecuteFunctions | IExecuteSingleFunctions, token: string, - // tslint:disable-next-line:no-any ): Promise { const credentials = await this.getCredentials('fileMaker'); diff --git a/packages/nodes-base/nodes/Flow/GenericFunctions.ts b/packages/nodes-base/nodes/Flow/GenericFunctions.ts index 0dbcf55f79..23d95c7cf6 100644 --- a/packages/nodes-base/nodes/Flow/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Flow/GenericFunctions.ts @@ -11,12 +11,11 @@ export async function flowApiRequest( this: IHookFunctions | IExecuteFunctions | IExecuteSingleFunctions | ILoadOptionsFunctions, method: string, resource: string, - // tslint:disable-next-line:no-any + body: any = {}, qs: IDataObject = {}, uri?: string, option: IDataObject = {}, - // tslint:disable-next-line:no-any ): Promise { const credentials = await this.getCredentials('flowApi'); @@ -49,10 +48,9 @@ export async function FlowApiRequestAllItems( propertyName: string, method: string, resource: string, - // tslint:disable-next-line:no-any + body: any = {}, query: IDataObject = {}, - // tslint:disable-next-line:no-any ): Promise { const returnData: IDataObject[] = []; diff --git a/packages/nodes-base/nodes/FormIo/FormIoTrigger.node.ts b/packages/nodes-base/nodes/FormIo/FormIoTrigger.node.ts index 601be9151d..38d0213995 100644 --- a/packages/nodes-base/nodes/FormIo/FormIoTrigger.node.ts +++ b/packages/nodes-base/nodes/FormIo/FormIoTrigger.node.ts @@ -139,7 +139,6 @@ export class FormIoTrigger implements INodeType { if ( action.settings.url === webhookUrl && action.method.length === method.length && - // tslint:disable-next-line:no-any action.method.every((value: any) => method.includes(value)) ) { webhookData.webhookId = action._id; diff --git a/packages/nodes-base/nodes/FormIo/GenericFunctions.ts b/packages/nodes-base/nodes/FormIo/GenericFunctions.ts index f9843c1ec0..21d4fff976 100644 --- a/packages/nodes-base/nodes/FormIo/GenericFunctions.ts +++ b/packages/nodes-base/nodes/FormIo/GenericFunctions.ts @@ -52,7 +52,6 @@ export async function formIoApiRequest( endpoint: string, body = {}, qs = {}, - // tslint:disable-next-line:no-any ): Promise { const credentials = (await this.getCredentials('formIoApi')) as unknown as IFormIoCredentials; diff --git a/packages/nodes-base/nodes/Formstack/GenericFunctions.ts b/packages/nodes-base/nodes/Formstack/GenericFunctions.ts index 3bdfe8c1c1..a64a42d85f 100644 --- a/packages/nodes-base/nodes/Formstack/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Formstack/GenericFunctions.ts @@ -53,7 +53,6 @@ export async function apiRequest( endpoint: string, body: IDataObject = {}, query: IDataObject = {}, - // tslint:disable-next-line:no-any ): Promise { const authenticationMethod = this.getNodeParameter('authentication', 0); @@ -97,7 +96,6 @@ export async function apiRequestAllItems( body: IDataObject, dataKey: string, query?: IDataObject, - // tslint:disable-next-line:no-any ): Promise { if (query === undefined) { query = {}; diff --git a/packages/nodes-base/nodes/Freshdesk/GenericFunctions.ts b/packages/nodes-base/nodes/Freshdesk/GenericFunctions.ts index 82b5dacf1f..c4a306187b 100644 --- a/packages/nodes-base/nodes/Freshdesk/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Freshdesk/GenericFunctions.ts @@ -8,7 +8,7 @@ export async function freshdeskApiRequest( this: IExecuteFunctions | ILoadOptionsFunctions, method: string, resource: string, - // tslint:disable-next-line:no-any + body: any = {}, query: IDataObject = {}, uri?: string, @@ -49,7 +49,7 @@ export async function freshdeskApiRequestAllItems( this: IExecuteFunctions | ILoadOptionsFunctions, method: string, endpoint: string, - // tslint:disable-next-line:no-any + body: any = {}, query: IDataObject = {}, ) { @@ -73,7 +73,6 @@ export async function freshdeskApiRequestAllItems( return returnData; } -// tslint:disable-next-line:no-any export function validateJSON(json: string | undefined): any { let result; try { diff --git a/packages/nodes-base/nodes/Freshservice/Freshservice.node.ts b/packages/nodes-base/nodes/Freshservice/Freshservice.node.ts index 5bcbea847b..2148ee0bbf 100644 --- a/packages/nodes-base/nodes/Freshservice/Freshservice.node.ts +++ b/packages/nodes-base/nodes/Freshservice/Freshservice.node.ts @@ -232,7 +232,7 @@ export class Freshservice implements INodeType { )) as { asset_type_fields: [{ fields: LoadedResource[] }]; }; - // tslint:disable-next-line: no-any + let fields: any[] = []; fields = fields .concat(...asset_type_fields.map((data) => data.fields)) diff --git a/packages/nodes-base/nodes/FreshworksCrm/GenericFunctions.ts b/packages/nodes-base/nodes/FreshworksCrm/GenericFunctions.ts index 86b10aa9e3..436480cde0 100644 --- a/packages/nodes-base/nodes/FreshworksCrm/GenericFunctions.ts +++ b/packages/nodes-base/nodes/FreshworksCrm/GenericFunctions.ts @@ -83,7 +83,7 @@ export async function freshworksCrmApiRequestAllItems( qs: IDataObject = {}, ) { const returnData: IDataObject[] = []; - let response: any; // tslint:disable-line: no-any + let response: any; qs.page = 1; diff --git a/packages/nodes-base/nodes/Ftp/Ftp.node.ts b/packages/nodes-base/nodes/Ftp/Ftp.node.ts index c61956af92..1154568529 100644 --- a/packages/nodes-base/nodes/Ftp/Ftp.node.ts +++ b/packages/nodes-base/nodes/Ftp/Ftp.node.ts @@ -755,7 +755,6 @@ async function callRecursiveList( let index = 0; do { - // tslint:disable-next-line: array-type const returnData: sftpClient.FileInfo[] | (string | ftpClient.ListingElement)[] = await client.list(pathArray[index]); diff --git a/packages/nodes-base/nodes/GetResponse/GenericFunctions.ts b/packages/nodes-base/nodes/GetResponse/GenericFunctions.ts index 17b1f12fb2..4f7e309485 100644 --- a/packages/nodes-base/nodes/GetResponse/GenericFunctions.ts +++ b/packages/nodes-base/nodes/GetResponse/GenericFunctions.ts @@ -13,12 +13,11 @@ export async function getresponseApiRequest( this: IWebhookFunctions | IHookFunctions | IExecuteFunctions | ILoadOptionsFunctions, method: string, resource: string, - // tslint:disable-next-line:no-any + body: any = {}, qs: IDataObject = {}, uri?: string, option: IDataObject = {}, - // tslint:disable-next-line:no-any ): Promise { const authentication = this.getNodeParameter('authentication', 0, 'apiKey') as string; @@ -53,10 +52,9 @@ export async function getResponseApiRequestAllItems( this: IExecuteFunctions | ILoadOptionsFunctions, method: string, endpoint: string, - // tslint:disable-next-line:no-any + body: any = {}, query: IDataObject = {}, - // tslint:disable-next-line:no-any ): Promise { const returnData: IDataObject[] = []; diff --git a/packages/nodes-base/nodes/Ghost/GenericFunctions.ts b/packages/nodes-base/nodes/Ghost/GenericFunctions.ts index edb111d62c..28a34ed03d 100644 --- a/packages/nodes-base/nodes/Ghost/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Ghost/GenericFunctions.ts @@ -13,11 +13,10 @@ export async function ghostApiRequest( this: IHookFunctions | IExecuteFunctions | IExecuteSingleFunctions | ILoadOptionsFunctions, method: string, endpoint: string, - // tslint:disable-next-line:no-any + body: any = {}, query: IDataObject = {}, uri?: string, - // tslint:disable-next-line:no-any ): Promise { const source = this.getNodeParameter('source', 0) as string; @@ -52,10 +51,9 @@ export async function ghostApiRequestAllItems( propertyName: string, method: string, endpoint: string, - // tslint:disable-next-line:no-any + body: any = {}, query: IDataObject = {}, - // tslint:disable-next-line:no-any ): Promise { const returnData: IDataObject[] = []; @@ -72,7 +70,6 @@ export async function ghostApiRequestAllItems( return returnData; } -// tslint:disable-next-line:no-any export function validateJSON(json: string | undefined): any { let result; try { diff --git a/packages/nodes-base/nodes/Github/GenericFunctions.ts b/packages/nodes-base/nodes/Github/GenericFunctions.ts index ed78c5d4a3..da1b5272bd 100644 --- a/packages/nodes-base/nodes/Github/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Github/GenericFunctions.ts @@ -15,7 +15,6 @@ export async function githubApiRequest( body: object, query?: object, option: IDataObject = {}, - // tslint:disable-next-line:no-any ): Promise { const options: OptionsWithUri = { method, @@ -71,7 +70,6 @@ export async function getFileSha( repository: string, filePath: string, branch?: string, - // tslint:disable-next-line:no-any ): Promise { const getBody: IDataObject = {}; if (branch !== undefined) { @@ -90,10 +88,9 @@ export async function githubApiRequestAllItems( this: IHookFunctions | IExecuteFunctions, method: string, endpoint: string, - // tslint:disable-next-line:no-any + body: any = {}, query: IDataObject = {}, - // tslint:disable-next-line:no-any ): Promise { const returnData: IDataObject[] = []; diff --git a/packages/nodes-base/nodes/Gitlab/GenericFunctions.ts b/packages/nodes-base/nodes/Gitlab/GenericFunctions.ts index 9756ee69c6..5505212043 100644 --- a/packages/nodes-base/nodes/Gitlab/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Gitlab/GenericFunctions.ts @@ -14,7 +14,6 @@ export async function gitlabApiRequest( body: object, query?: object, option: IDataObject = {}, - // tslint:disable-next-line:no-any ): Promise { const options: OptionsWithUri = { method, @@ -55,10 +54,9 @@ export async function gitlabApiRequestAllItems( this: IHookFunctions | IExecuteFunctions, method: string, endpoint: string, - // tslint:disable-next-line:no-any + body: any = {}, query: IDataObject = {}, - // tslint:disable-next-line:no-any ): Promise { const returnData: IDataObject[] = []; diff --git a/packages/nodes-base/nodes/GoToWebinar/GenericFunctions.ts b/packages/nodes-base/nodes/GoToWebinar/GenericFunctions.ts index 73f22c4d5c..2bea511e75 100644 --- a/packages/nodes-base/nodes/GoToWebinar/GenericFunctions.ts +++ b/packages/nodes-base/nodes/GoToWebinar/GenericFunctions.ts @@ -276,7 +276,6 @@ export async function loadRegistranMultiChoiceQuestions(this: ILoadOptionsFuncti return returnData; } -// tslint:disable-next-line: no-any function convertLosslessNumber(key: any, value: any) { if (value && value.isLosslessNumber) { return value.toString(); diff --git a/packages/nodes-base/nodes/Google/Analytics/GenericFunctions.ts b/packages/nodes-base/nodes/Google/Analytics/GenericFunctions.ts index 4bc17573a9..ddb8a44439 100644 --- a/packages/nodes-base/nodes/Google/Analytics/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Google/Analytics/GenericFunctions.ts @@ -8,12 +8,11 @@ export async function googleApiRequest( this: IExecuteFunctions | IExecuteSingleFunctions | ILoadOptionsFunctions, method: string, endpoint: string, - // tslint:disable-next-line:no-any + body: any = {}, qs: IDataObject = {}, uri?: string, option: IDataObject = {}, - // tslint:disable-next-line:no-any ): Promise { let options: OptionsWithUri = { headers: { @@ -47,11 +46,10 @@ export async function googleApiRequestAllItems( propertyName: string, method: string, endpoint: string, - // tslint:disable-next-line:no-any + body: any = {}, query: IDataObject = {}, uri?: string, - // tslint:disable-next-line:no-any ): Promise { const returnData: IDataObject[] = []; @@ -75,7 +73,6 @@ export async function googleApiRequestAllItems( return returnData; } -// tslint:disable-next-line:no-any export function simplify(responseData: any | [any]) { const response = []; for (const { @@ -102,7 +99,6 @@ export function simplify(responseData: any | [any]) { return response; } -// tslint:disable-next-line:no-any export function merge(responseData: [any]) { const response: { columnHeader: IDataObject; data: { rows: [] } } = { columnHeader: responseData[0].columnHeader, diff --git a/packages/nodes-base/nodes/Google/BigQuery/GenericFunctions.ts b/packages/nodes-base/nodes/Google/BigQuery/GenericFunctions.ts index 5e0683bee7..82e50e1a68 100644 --- a/packages/nodes-base/nodes/Google/BigQuery/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Google/BigQuery/GenericFunctions.ts @@ -12,12 +12,11 @@ export async function googleApiRequest( this: IExecuteFunctions | IExecuteSingleFunctions | ILoadOptionsFunctions, method: string, resource: string, - // tslint:disable-next-line:no-any + body: any = {}, qs: IDataObject = {}, uri?: string, headers: IDataObject = {}, - // tslint:disable-next-line:no-any ): Promise { const authenticationMethod = this.getNodeParameter( 'authentication', @@ -72,10 +71,9 @@ export async function googleApiRequestAllItems( propertyName: string, method: string, endpoint: string, - // tslint:disable-next-line:no-any + body: any = {}, query: IDataObject = {}, - // tslint:disable-next-line:no-any ): Promise { const returnData: IDataObject[] = []; diff --git a/packages/nodes-base/nodes/Google/Books/GenericFunctions.ts b/packages/nodes-base/nodes/Google/Books/GenericFunctions.ts index 582db6751f..0581fe5634 100644 --- a/packages/nodes-base/nodes/Google/Books/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Google/Books/GenericFunctions.ts @@ -19,12 +19,11 @@ export async function googleApiRequest( this: IExecuteFunctions | IExecuteSingleFunctions | ILoadOptionsFunctions, method: string, resource: string, - // tslint:disable-next-line:no-any + body: any = {}, qs: IDataObject = {}, uri?: string, headers: IDataObject = {}, - // tslint:disable-next-line:no-any ): Promise { const authenticationMethod = this.getNodeParameter( 'authentication', @@ -81,10 +80,9 @@ export async function googleApiRequestAllItems( propertyName: string, method: string, endpoint: string, - // tslint:disable-next-line:no-any + body: any = {}, query: IDataObject = {}, - // tslint:disable-next-line:no-any ): Promise { const returnData: IDataObject[] = []; diff --git a/packages/nodes-base/nodes/Google/Calendar/GenericFunctions.ts b/packages/nodes-base/nodes/Google/Calendar/GenericFunctions.ts index de87087bcd..d01e625edb 100644 --- a/packages/nodes-base/nodes/Google/Calendar/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Google/Calendar/GenericFunctions.ts @@ -16,12 +16,11 @@ export async function googleApiRequest( this: IExecuteFunctions | IExecuteSingleFunctions | ILoadOptionsFunctions | IPollFunctions, method: string, resource: string, - // tslint:disable-next-line:no-any + body: any = {}, qs: IDataObject = {}, uri?: string, headers: IDataObject = {}, - // tslint:disable-next-line:no-any ): Promise { const options: OptionsWithUri = { headers: { @@ -52,10 +51,9 @@ export async function googleApiRequestAllItems( propertyName: string, method: string, endpoint: string, - // tslint:disable-next-line:no-any + body: any = {}, query: IDataObject = {}, - // tslint:disable-next-line:no-any ): Promise { const returnData: IDataObject[] = []; diff --git a/packages/nodes-base/nodes/Google/Chat/GenericFunctions.ts b/packages/nodes-base/nodes/Google/Chat/GenericFunctions.ts index 3038fb4973..8970c9fd95 100644 --- a/packages/nodes-base/nodes/Google/Chat/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Google/Chat/GenericFunctions.ts @@ -25,13 +25,12 @@ export async function googleApiRequest( this: IExecuteFunctions | IExecuteSingleFunctions | ILoadOptionsFunctions, method: string, resource: string, - // tslint:disable-next-line:no-any + body: any = {}, qs: IDataObject = {}, uri?: string, noCredentials = false, encoding?: null | undefined, - // tslint:disable-next-line:no-any ): Promise { const options: OptionsWithUri = { headers: { @@ -87,10 +86,9 @@ export async function googleApiRequestAllItems( propertyName: string, method: string, endpoint: string, - // tslint:disable-next-line:no-any + body: any = {}, query: IDataObject = {}, - // tslint:disable-next-line:no-any ): Promise { const returnData: IDataObject[] = []; @@ -160,7 +158,6 @@ export function getAccessToken( return this.helpers.request(options); } -// tslint:disable-next-line:no-any export function validateJSON(json: string | undefined): any { let result; try { diff --git a/packages/nodes-base/nodes/Google/CloudNaturalLanguage/GenericFunctions.ts b/packages/nodes-base/nodes/Google/CloudNaturalLanguage/GenericFunctions.ts index 5b61b6b86c..8b67ddf83c 100644 --- a/packages/nodes-base/nodes/Google/CloudNaturalLanguage/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Google/CloudNaturalLanguage/GenericFunctions.ts @@ -8,12 +8,11 @@ export async function googleApiRequest( this: IExecuteFunctions | IExecuteSingleFunctions | ILoadOptionsFunctions, method: string, endpoint: string, - // tslint:disable-next-line:no-any + body: any = {}, qs: IDataObject = {}, uri?: string, option: IDataObject = {}, - // tslint:disable-next-line:no-any ): Promise { let options: OptionsWithUri = { headers: { diff --git a/packages/nodes-base/nodes/Google/Contacts/GenericFunctions.ts b/packages/nodes-base/nodes/Google/Contacts/GenericFunctions.ts index df13bb3680..25edfec9f5 100644 --- a/packages/nodes-base/nodes/Google/Contacts/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Google/Contacts/GenericFunctions.ts @@ -8,12 +8,11 @@ export async function googleApiRequest( this: IExecuteFunctions | IExecuteSingleFunctions | ILoadOptionsFunctions, method: string, resource: string, - // tslint:disable-next-line:no-any + body: any = {}, qs: IDataObject = {}, uri?: string, headers: IDataObject = {}, - // tslint:disable-next-line:no-any ): Promise { const options: OptionsWithUri = { headers: { @@ -45,10 +44,9 @@ export async function googleApiRequestAllItems( propertyName: string, method: string, endpoint: string, - // tslint:disable-next-line:no-any + body: any = {}, query: IDataObject = {}, - // tslint:disable-next-line:no-any ): Promise { const returnData: IDataObject[] = []; @@ -91,7 +89,6 @@ export const allFields = [ 'userDefined', ]; -// tslint:disable-next-line:no-any export function cleanData(responseData: any) { const fields = ['emailAddresses', 'phoneNumbers', 'relations', 'events', 'addresses']; const newResponseData = []; @@ -99,7 +96,7 @@ export function cleanData(responseData: any) { responseData = [responseData]; } for (let y = 0; y < responseData.length; y++) { - const object: { [key: string]: any } = {}; // tslint:disable-line:no-any + const object: { [key: string]: any } = {}; for (const key of Object.keys(responseData[y])) { if (key === 'metadata') { continue; @@ -129,7 +126,7 @@ export function cleanData(responseData: any) { } } if (fields.includes(key)) { - const value: { [key: string]: any } = {}; // tslint:disable-line:no-any + const value: { [key: string]: any } = {}; for (const data of responseData[y][key]) { let result; if (value[data.type] === undefined) { diff --git a/packages/nodes-base/nodes/Google/Docs/GenericFunctions.ts b/packages/nodes-base/nodes/Google/Docs/GenericFunctions.ts index 11bd28c70e..f677c6e94a 100644 --- a/packages/nodes-base/nodes/Google/Docs/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Google/Docs/GenericFunctions.ts @@ -71,7 +71,6 @@ export async function googleApiRequestAllItems( body: IDataObject = {}, qs?: IDataObject, uri?: string, - // tslint:disable-next-line:no-any ): Promise { const returnData: IDataObject[] = []; diff --git a/packages/nodes-base/nodes/Google/Drive/GenericFunctions.ts b/packages/nodes-base/nodes/Google/Drive/GenericFunctions.ts index 52a5680afa..12f278c0af 100644 --- a/packages/nodes-base/nodes/Google/Drive/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Google/Drive/GenericFunctions.ts @@ -19,12 +19,11 @@ export async function googleApiRequest( this: IExecuteFunctions | IExecuteSingleFunctions | ILoadOptionsFunctions | IPollFunctions, method: string, resource: string, - // tslint:disable-next-line:no-any + body: any = {}, qs: IDataObject = {}, uri?: string, option: IDataObject = {}, - // tslint:disable-next-line:no-any ): Promise { const authenticationMethod = this.getNodeParameter( 'authentication', @@ -78,10 +77,9 @@ export async function googleApiRequestAllItems( propertyName: string, method: string, endpoint: string, - // tslint:disable-next-line:no-any + body: any = {}, query: IDataObject = {}, - // tslint:disable-next-line:no-any ): Promise { const returnData: IDataObject[] = []; diff --git a/packages/nodes-base/nodes/Google/Firebase/CloudFirestore/GenericFunctions.ts b/packages/nodes-base/nodes/Google/Firebase/CloudFirestore/GenericFunctions.ts index afc454bc63..877ec9874a 100644 --- a/packages/nodes-base/nodes/Google/Firebase/CloudFirestore/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Google/Firebase/CloudFirestore/GenericFunctions.ts @@ -10,11 +10,10 @@ export async function googleApiRequest( this: IExecuteFunctions | IExecuteSingleFunctions | ILoadOptionsFunctions, method: string, resource: string, - // tslint:disable-next-line:no-any + body: any = {}, qs: IDataObject = {}, uri: string | null = null, - // tslint:disable-next-line:no-any ): Promise { const options: OptionsWithUri = { headers: { @@ -50,11 +49,10 @@ export async function googleApiRequestAllItems( propertyName: string, method: string, endpoint: string, - // tslint:disable-next-line:no-any + body: any = {}, query: IDataObject = {}, uri: string | null = null, - // tslint:disable-next-line:no-any ): Promise { const returnData: IDataObject[] = []; diff --git a/packages/nodes-base/nodes/Google/Firebase/RealtimeDatabase/GenericFunctions.ts b/packages/nodes-base/nodes/Google/Firebase/RealtimeDatabase/GenericFunctions.ts index 99e29122d2..1e139d4390 100644 --- a/packages/nodes-base/nodes/Google/Firebase/RealtimeDatabase/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Google/Firebase/RealtimeDatabase/GenericFunctions.ts @@ -9,12 +9,11 @@ export async function googleApiRequest( projectId: string, method: string, resource: string, - // tslint:disable-next-line:no-any + body: any = {}, qs: IDataObject = {}, headers: IDataObject = {}, uri: string | null = null, - // tslint:disable-next-line:no-any ): Promise { const { region } = (await this.getCredentials( 'googleFirebaseRealtimeDatabaseOAuth2Api', @@ -54,12 +53,11 @@ export async function googleApiRequestAllItems( projectId: string, method: string, resource: string, - // tslint:disable-next-line:no-any + body: any = {}, qs: IDataObject = {}, _headers: IDataObject = {}, uri: string | null = null, - // tslint:disable-next-line:no-any ): Promise { const returnData: IDataObject[] = []; diff --git a/packages/nodes-base/nodes/Google/GSuiteAdmin/GenericFunctions.ts b/packages/nodes-base/nodes/Google/GSuiteAdmin/GenericFunctions.ts index 051da41dde..e2d9337fcf 100644 --- a/packages/nodes-base/nodes/Google/GSuiteAdmin/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Google/GSuiteAdmin/GenericFunctions.ts @@ -8,12 +8,11 @@ export async function googleApiRequest( this: IExecuteFunctions | IExecuteSingleFunctions | ILoadOptionsFunctions, method: string, resource: string, - // tslint:disable-next-line:no-any + body: any = {}, qs: IDataObject = {}, uri?: string, headers: IDataObject = {}, - // tslint:disable-next-line:no-any ): Promise { const options: OptionsWithUri = { headers: { @@ -44,10 +43,9 @@ export async function googleApiRequestAllItems( propertyName: string, method: string, endpoint: string, - // tslint:disable-next-line:no-any + body: any = {}, query: IDataObject = {}, - // tslint:disable-next-line:no-any ): Promise { const returnData: IDataObject[] = []; diff --git a/packages/nodes-base/nodes/Google/Gmail/GenericFunctions.ts b/packages/nodes-base/nodes/Google/Gmail/GenericFunctions.ts index c17d7e6d46..e0acf0839d 100644 --- a/packages/nodes-base/nodes/Google/Gmail/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Google/Gmail/GenericFunctions.ts @@ -161,7 +161,7 @@ export async function googleApiRequest( export async function parseRawEmail( this: IExecuteFunctions | IPollFunctions, - // tslint:disable-next-line:no-any + messageData: any, dataPropertyNameDownload: string, ): Promise { @@ -275,10 +275,9 @@ export async function googleApiRequestAllItems( propertyName: string, method: string, endpoint: string, - // tslint:disable-next-line:no-any + body: any = {}, query: IDataObject = {}, - // tslint:disable-next-line:no-any ): Promise { const returnData: IDataObject[] = []; diff --git a/packages/nodes-base/nodes/Google/Gmail/v1/GmailV1.node.ts b/packages/nodes-base/nodes/Google/Gmail/v1/GmailV1.node.ts index f20735ec4a..8b8ff1cb7d 100644 --- a/packages/nodes-base/nodes/Google/Gmail/v1/GmailV1.node.ts +++ b/packages/nodes-base/nodes/Google/Gmail/v1/GmailV1.node.ts @@ -525,7 +525,6 @@ export class GmailV1 implements INodeType { Object.assign(qs, additionalFields); if (qs.labelIds) { - // tslint:disable-next-line: triple-equals if (qs.labelIds == '') { delete qs.labelIds; } else { diff --git a/packages/nodes-base/nodes/Google/Sheet/v1/GenericFunctions.ts b/packages/nodes-base/nodes/Google/Sheet/v1/GenericFunctions.ts index b5f3a755cd..27abaa12c4 100644 --- a/packages/nodes-base/nodes/Google/Sheet/v1/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Google/Sheet/v1/GenericFunctions.ts @@ -19,12 +19,11 @@ export async function googleApiRequest( this: IExecuteFunctions | IExecuteSingleFunctions | ILoadOptionsFunctions, method: string, resource: string, - // tslint:disable-next-line:no-any + body: any = {}, qs: IDataObject = {}, uri?: string, headers: IDataObject = {}, - // tslint:disable-next-line:no-any ): Promise { const authenticationMethod = this.getNodeParameter( 'authentication', @@ -78,10 +77,9 @@ export async function googleApiRequestAllItems( propertyName: string, method: string, endpoint: string, - // tslint:disable-next-line:no-any + body: any = {}, query: IDataObject = {}, - // tslint:disable-next-line:no-any ): Promise { const returnData: IDataObject[] = []; diff --git a/packages/nodes-base/nodes/Google/Sheet/v1/GoogleSheet.ts b/packages/nodes-base/nodes/Google/Sheet/v1/GoogleSheet.ts index b6cb4e1666..b57aae3995 100644 --- a/packages/nodes-base/nodes/Google/Sheet/v1/GoogleSheet.ts +++ b/packages/nodes-base/nodes/Google/Sheet/v1/GoogleSheet.ts @@ -138,8 +138,6 @@ export class GoogleSheet { * Sets values in one or more ranges of a spreadsheet. */ async spreadsheetBatchUpdate(requests: IDataObject[]) { - // tslint:disable-line:no-any - const body = { requests, }; diff --git a/packages/nodes-base/nodes/Google/Task/GenericFunctions.ts b/packages/nodes-base/nodes/Google/Task/GenericFunctions.ts index 93a4c05cc1..fa9672fe71 100644 --- a/packages/nodes-base/nodes/Google/Task/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Google/Task/GenericFunctions.ts @@ -12,7 +12,6 @@ export async function googleApiRequest( qs: IDataObject = {}, uri?: string, headers: IDataObject = {}, - // tslint:disable-next-line:no-any ): Promise { const options: OptionsWithUri = { headers: { @@ -46,7 +45,6 @@ export async function googleApiRequestAllItems( endpoint: string, body: IDataObject = {}, query: IDataObject = {}, - // tslint:disable-next-line:no-any ): Promise { const returnData: IDataObject[] = []; diff --git a/packages/nodes-base/nodes/Google/Translate/GenericFunctions.ts b/packages/nodes-base/nodes/Google/Translate/GenericFunctions.ts index 1f56da5402..10e65658b7 100644 --- a/packages/nodes-base/nodes/Google/Translate/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Google/Translate/GenericFunctions.ts @@ -19,12 +19,11 @@ export async function googleApiRequest( this: IExecuteFunctions | IExecuteSingleFunctions | ILoadOptionsFunctions, method: string, resource: string, - // tslint:disable-next-line:no-any + body: any = {}, qs: IDataObject = {}, uri?: string, headers: IDataObject = {}, - // tslint:disable-next-line:no-any ): Promise { const authenticationMethod = this.getNodeParameter( 'authentication', @@ -74,10 +73,9 @@ export async function googleApiRequestAllItems( propertyName: string, method: string, endpoint: string, - // tslint:disable-next-line:no-any + body: any = {}, query: IDataObject = {}, - // tslint:disable-next-line:no-any ): Promise { const returnData: IDataObject[] = []; diff --git a/packages/nodes-base/nodes/Google/YouTube/GenericFunctions.ts b/packages/nodes-base/nodes/Google/YouTube/GenericFunctions.ts index 982a094c2f..eede8baf93 100644 --- a/packages/nodes-base/nodes/Google/YouTube/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Google/YouTube/GenericFunctions.ts @@ -8,12 +8,11 @@ export async function googleApiRequest( this: IExecuteFunctions | IExecuteSingleFunctions | ILoadOptionsFunctions, method: string, resource: string, - // tslint:disable-next-line:no-any + body: any = {}, qs: IDataObject = {}, uri?: string, option: IDataObject = {}, - // tslint:disable-next-line:no-any ): Promise { let options: OptionsWithUri = { headers: { @@ -44,10 +43,9 @@ export async function googleApiRequestAllItems( propertyName: string, method: string, endpoint: string, - // tslint:disable-next-line:no-any + body: any = {}, query: IDataObject = {}, - // tslint:disable-next-line:no-any ): Promise { const returnData: IDataObject[] = []; diff --git a/packages/nodes-base/nodes/Gotify/GenericFunctions.ts b/packages/nodes-base/nodes/Gotify/GenericFunctions.ts index 0c53fefc15..6e3c521144 100644 --- a/packages/nodes-base/nodes/Gotify/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Gotify/GenericFunctions.ts @@ -8,12 +8,11 @@ export async function gotifyApiRequest( this: IExecuteFunctions | IExecuteSingleFunctions | ILoadOptionsFunctions, method: string, path: string, - // tslint:disable-next-line:no-any + body: any = {}, qs: IDataObject = {}, uri?: string | undefined, _option = {}, - // tslint:disable-next-line:no-any ): Promise { const credentials = await this.getCredentials('gotifyApi'); @@ -45,10 +44,9 @@ export async function gotifyApiRequestAllItems( propertyName: string, method: string, endpoint: string, - // tslint:disable-next-line:no-any + body: any = {}, query: IDataObject = {}, - // tslint:disable-next-line:no-any ): Promise { const returnData: IDataObject[] = []; diff --git a/packages/nodes-base/nodes/Grist/GenericFunctions.ts b/packages/nodes-base/nodes/Grist/GenericFunctions.ts index 2abb3e0738..fd09171e8d 100644 --- a/packages/nodes-base/nodes/Grist/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Grist/GenericFunctions.ts @@ -80,12 +80,7 @@ export function parseDefinedFields(fieldsToSendProperties: GristDefinedFields) { }, {}); } -export function parseAutoMappedInputs( - incomingKeys: string[], - inputsToIgnore: string[], - item: any, // tslint:disable-line:no-any -) { - // tslint:disable-next-line:no-any +export function parseAutoMappedInputs(incomingKeys: string[], inputsToIgnore: string[], item: any) { return incomingKeys.reduce<{ [key: string]: any }>((acc, curKey) => { if (inputsToIgnore.includes(curKey)) return acc; acc = { ...acc, [curKey]: item[curKey] }; diff --git a/packages/nodes-base/nodes/Gumroad/GenericFunctions.ts b/packages/nodes-base/nodes/Gumroad/GenericFunctions.ts index 279644ef07..532f2f2245 100644 --- a/packages/nodes-base/nodes/Gumroad/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Gumroad/GenericFunctions.ts @@ -17,12 +17,11 @@ export async function gumroadApiRequest( | IWebhookFunctions, method: string, resource: string, - // tslint:disable-next-line:no-any + body: any = {}, qs: IDataObject = {}, uri?: string, option: IDataObject = {}, - // tslint:disable-next-line:no-any ): Promise { const credentials = await this.getCredentials('gumroadApi'); body = Object.assign({ access_token: credentials.accessToken }, body); diff --git a/packages/nodes-base/nodes/HackerNews/GenericFunctions.ts b/packages/nodes-base/nodes/HackerNews/GenericFunctions.ts index 4c3dcfe86f..e592a0ba65 100644 --- a/packages/nodes-base/nodes/HackerNews/GenericFunctions.ts +++ b/packages/nodes-base/nodes/HackerNews/GenericFunctions.ts @@ -13,7 +13,6 @@ export async function hackerNewsApiRequest( method: string, endpoint: string, qs: IDataObject, - // tslint:disable-next-line:no-any ): Promise { const options: OptionsWithUri = { method, @@ -40,7 +39,6 @@ export async function hackerNewsApiRequestAllItems( method: string, endpoint: string, qs: IDataObject, - // tslint:disable-next-line:no-any ): Promise { qs.hitsPerPage = 100; diff --git a/packages/nodes-base/nodes/HaloPSA/GenericFunctions.ts b/packages/nodes-base/nodes/HaloPSA/GenericFunctions.ts index d46735dabe..5f089bc707 100644 --- a/packages/nodes-base/nodes/HaloPSA/GenericFunctions.ts +++ b/packages/nodes-base/nodes/HaloPSA/GenericFunctions.ts @@ -66,7 +66,6 @@ export async function haloPSAApiRequest( body: IDataObject | IDataObject[] = {}, qs: IDataObject = {}, option: IDataObject = {}, - // tslint:disable-next-line:no-any ): Promise { const resourceApiUrl = (await this.getCredentials('haloPSAApi')).resourceApiUrl as string; @@ -159,7 +158,6 @@ export async function haloPSAApiRequestAllItems( accessToken: string, body = {}, query: IDataObject = {}, - // tslint:disable-next-line:no-any ): Promise { const returnData: IDataObject[] = []; diff --git a/packages/nodes-base/nodes/Harvest/GenericFunctions.ts b/packages/nodes-base/nodes/Harvest/GenericFunctions.ts index 658194c743..adcc89ecf2 100644 --- a/packages/nodes-base/nodes/Harvest/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Harvest/GenericFunctions.ts @@ -17,7 +17,6 @@ export async function harvestApiRequest( body: IDataObject = {}, option: IDataObject = {}, uri?: string, - // tslint:disable-next-line:no-any ): Promise { let options: OptionsWithUri = { headers: { @@ -66,7 +65,6 @@ export async function harvestApiRequestAllItems( resource: string, body: IDataObject = {}, option: IDataObject = {}, - // tslint:disable-next-line:no-any ): Promise { const returnData: IDataObject[] = []; diff --git a/packages/nodes-base/nodes/HelpScout/GenericFunctions.ts b/packages/nodes-base/nodes/HelpScout/GenericFunctions.ts index 775907e85a..2407dbd76b 100644 --- a/packages/nodes-base/nodes/HelpScout/GenericFunctions.ts +++ b/packages/nodes-base/nodes/HelpScout/GenericFunctions.ts @@ -15,12 +15,11 @@ export async function helpscoutApiRequest( this: IExecuteFunctions | IExecuteSingleFunctions | ILoadOptionsFunctions | IHookFunctions, method: string, resource: string, - // tslint:disable-next-line:no-any + body: any = {}, qs: IDataObject = {}, uri?: string, option: IDataObject = {}, - // tslint:disable-next-line:no-any ): Promise { let options: OptionsWithUri = { headers: { @@ -51,10 +50,9 @@ export async function helpscoutApiRequestAllItems( propertyName: string, method: string, endpoint: string, - // tslint:disable-next-line:no-any + body: any = {}, query: IDataObject = {}, - // tslint:disable-next-line:no-any ): Promise { const returnData: IDataObject[] = []; diff --git a/packages/nodes-base/nodes/HttpRequest/V1/HttpRequestV1.node.ts b/packages/nodes-base/nodes/HttpRequest/V1/HttpRequestV1.node.ts index 05388ba32e..3d9d062492 100644 --- a/packages/nodes-base/nodes/HttpRequest/V1/HttpRequestV1.node.ts +++ b/packages/nodes-base/nodes/HttpRequest/V1/HttpRequestV1.node.ts @@ -956,7 +956,7 @@ export class HttpRequestV1 implements INodeType { } try { - let sendRequest: any = requestOptions; // tslint:disable-line:no-any + let sendRequest: any = requestOptions; // Protect browser from sending large binary data if (Buffer.isBuffer(sendRequest.body) && sendRequest.body.length > 250000) { sendRequest = { @@ -988,7 +988,7 @@ export class HttpRequestV1 implements INodeType { // @ts-ignore const promisesResponses = await Promise.allSettled(requestPromises); - let response: any; // tslint:disable-line:no-any + let response: any; for (let itemIndex = 0; itemIndex < items.length; itemIndex++) { // @ts-ignore response = promisesResponses.shift(); diff --git a/packages/nodes-base/nodes/HttpRequest/V2/HttpRequestV2.node.ts b/packages/nodes-base/nodes/HttpRequest/V2/HttpRequestV2.node.ts index cc52986522..e041be522a 100644 --- a/packages/nodes-base/nodes/HttpRequest/V2/HttpRequestV2.node.ts +++ b/packages/nodes-base/nodes/HttpRequest/V2/HttpRequestV2.node.ts @@ -990,7 +990,7 @@ export class HttpRequestV2 implements INodeType { } try { - let sendRequest: any = requestOptions; // tslint:disable-line:no-any + let sendRequest: any = requestOptions; // Protect browser from sending large binary data if (Buffer.isBuffer(sendRequest.body) && sendRequest.body.length > 250000) { sendRequest = { @@ -1036,7 +1036,7 @@ export class HttpRequestV2 implements INodeType { // @ts-ignore const promisesResponses = await Promise.allSettled(requestPromises); - let response: any; // tslint:disable-line:no-any + let response: any; for (let itemIndex = 0; itemIndex < items.length; itemIndex++) { // @ts-ignore response = promisesResponses.shift(); diff --git a/packages/nodes-base/nodes/HttpRequest/V3/HttpRequestV3.node.ts b/packages/nodes-base/nodes/HttpRequest/V3/HttpRequestV3.node.ts index c7af850202..0b11e5aec5 100644 --- a/packages/nodes-base/nodes/HttpRequest/V3/HttpRequestV3.node.ts +++ b/packages/nodes-base/nodes/HttpRequest/V3/HttpRequestV3.node.ts @@ -1054,7 +1054,6 @@ export class HttpRequestV3 implements INodeType { } const parmetersToKeyValue = async ( - // tslint:disable-next-line: no-any acc: Promise<{ [key: string]: any }>, cur: { name: string; value: string; parameterType?: string; inputDataFieldName?: string }, ) => { @@ -1246,7 +1245,7 @@ export class HttpRequestV3 implements INodeType { } try { - let sendRequest: any = requestOptions; // tslint:disable-line:no-any + let sendRequest: any = requestOptions; // Protect browser from sending large binary data if (Buffer.isBuffer(sendRequest.body) && sendRequest.body.length > 250000) { sendRequest = { @@ -1293,7 +1292,7 @@ export class HttpRequestV3 implements INodeType { // @ts-ignore const promisesResponses = await Promise.allSettled(requestPromises); - let response: any; // tslint:disable-line:no-any + let response: any; for (let itemIndex = 0; itemIndex < items.length; itemIndex++) { // @ts-ignore response = promisesResponses.shift(); diff --git a/packages/nodes-base/nodes/Hubspot/GenericFunctions.ts b/packages/nodes-base/nodes/Hubspot/GenericFunctions.ts index e27c3d459d..f37f37c5f6 100644 --- a/packages/nodes-base/nodes/Hubspot/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Hubspot/GenericFunctions.ts @@ -21,11 +21,10 @@ export async function hubspotApiRequest( this: IHookFunctions | IExecuteFunctions | IExecuteSingleFunctions | ILoadOptionsFunctions, method: string, endpoint: string, - // tslint:disable-next-line:no-any + body: any = {}, query: IDataObject = {}, uri?: string, - // tslint:disable-next-line:no-any ): Promise { let authenticationMethod = this.getNodeParameter('authentication', 0); @@ -78,10 +77,9 @@ export async function hubspotApiRequestAllItems( propertyName: string, method: string, endpoint: string, - // tslint:disable-next-line:no-any + body: any = {}, query: IDataObject = {}, - // tslint:disable-next-line:no-any ): Promise { const returnData: IDataObject[] = []; @@ -108,7 +106,6 @@ export async function hubspotApiRequestAllItems( return returnData; } -// tslint:disable-next-line:no-any export function validateJSON(json: string | undefined): any { let result; try { @@ -119,7 +116,6 @@ export function validateJSON(json: string | undefined): any { return result; } -// tslint:disable-next-line: no-any export function clean(obj: any) { for (const propName in obj) { if (obj[propName] === null || obj[propName] === undefined || obj[propName] === '') { @@ -1990,7 +1986,6 @@ export const getAssociations = (associations: { export async function validateCredentials( this: ICredentialTestFunctions, decryptedCredentials: ICredentialDataDecryptedObject, - // tslint:disable-next-line:no-any ): Promise { const credentials = decryptedCredentials; diff --git a/packages/nodes-base/nodes/HumanticAI/GenericFunctions.ts b/packages/nodes-base/nodes/HumanticAI/GenericFunctions.ts index bcd225ad7f..35956d18f6 100644 --- a/packages/nodes-base/nodes/HumanticAI/GenericFunctions.ts +++ b/packages/nodes-base/nodes/HumanticAI/GenericFunctions.ts @@ -13,11 +13,10 @@ export async function humanticAiApiRequest( this: IHookFunctions | IExecuteFunctions | IExecuteSingleFunctions | ILoadOptionsFunctions, method: string, resource: string, - // tslint:disable-next-line:no-any + body: any = {}, qs: IDataObject = {}, option: IDataObject = {}, - // tslint:disable-next-line:no-any ): Promise { try { const credentials = await this.getCredentials('humanticAiApi'); diff --git a/packages/nodes-base/nodes/Hunter/GenericFunctions.ts b/packages/nodes-base/nodes/Hunter/GenericFunctions.ts index f0858da88e..f60010c5fc 100644 --- a/packages/nodes-base/nodes/Hunter/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Hunter/GenericFunctions.ts @@ -11,12 +11,11 @@ export async function hunterApiRequest( this: IHookFunctions | IExecuteFunctions | IExecuteSingleFunctions | ILoadOptionsFunctions, method: string, resource: string, - // tslint:disable-next-line:no-any + body: any = {}, qs: IDataObject = {}, uri?: string, option: IDataObject = {}, - // tslint:disable-next-line:no-any ): Promise { const credentials = await this.getCredentials('hunterApi'); qs = Object.assign({ api_key: credentials.apiKey }, qs); @@ -47,10 +46,9 @@ export async function hunterApiRequestAllItems( propertyName: string, method: string, resource: string, - // tslint:disable-next-line:no-any + body: any = {}, query: IDataObject = {}, - // tslint:disable-next-line:no-any ): Promise { const returnData: IDataObject[] = []; diff --git a/packages/nodes-base/nodes/Intercom/GenericFunctions.ts b/packages/nodes-base/nodes/Intercom/GenericFunctions.ts index 0f0bd982d5..221244ec82 100644 --- a/packages/nodes-base/nodes/Intercom/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Intercom/GenericFunctions.ts @@ -13,11 +13,10 @@ export async function intercomApiRequest( this: IHookFunctions | IExecuteFunctions | IExecuteSingleFunctions | ILoadOptionsFunctions, endpoint: string, method: string, - // tslint:disable-next-line:no-any + body: any = {}, query?: IDataObject, uri?: string, - // tslint:disable-next-line:no-any ): Promise { const credentials = await this.getCredentials('intercomApi'); @@ -51,10 +50,9 @@ export async function intercomApiRequestAllItems( propertyName: string, endpoint: string, method: string, - // tslint:disable-next-line:no-any + body: any = {}, query: IDataObject = {}, - // tslint:disable-next-line:no-any ): Promise { const returnData: IDataObject[] = []; @@ -77,7 +75,6 @@ export async function intercomApiRequestAllItems( return returnData; } -// tslint:disable-next-line:no-any export function validateJSON(json: string | undefined): any { let result; try { diff --git a/packages/nodes-base/nodes/ItemLists/ItemLists.node.ts b/packages/nodes-base/nodes/ItemLists/ItemLists.node.ts index 6ed85e864e..81821c8345 100644 --- a/packages/nodes-base/nodes/ItemLists/ItemLists.node.ts +++ b/packages/nodes-base/nodes/ItemLists/ItemLists.node.ts @@ -922,7 +922,6 @@ return 0;`, }), }; - // tslint:disable-next-line: no-any const values: { [key: string]: any } = {}; const outputFields: string[] = []; @@ -1131,7 +1130,6 @@ return 0;`, }); for (const key of keys) { - // tslint:disable-next-line: no-any let type: any = undefined; for (const item of newItems) { if (key === '') { @@ -1390,7 +1388,6 @@ const flattenKeys = (obj: {}, path: string[] = []): {} => { : reduce(obj, (cum, next, key) => merge(cum, flattenKeys(next, [...path, key])), {}); }; -// tslint:disable-next-line: no-any const shuffleArray = (array: any[]) => { for (let i = array.length - 1; i > 0; i--) { const j = Math.floor(Math.random() * (i + 1)); diff --git a/packages/nodes-base/nodes/Iterable/GenericFunctions.ts b/packages/nodes-base/nodes/Iterable/GenericFunctions.ts index 051cfd5baf..f073aa9f33 100644 --- a/packages/nodes-base/nodes/Iterable/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Iterable/GenericFunctions.ts @@ -8,12 +8,11 @@ export async function iterableApiRequest( this: IExecuteFunctions | IExecuteSingleFunctions | ILoadOptionsFunctions, method: string, resource: string, - // tslint:disable-next-line:no-any + body: any = {}, qs: IDataObject = {}, uri?: string, headers: IDataObject = {}, - // tslint:disable-next-line:no-any ): Promise { const credentials = await this.getCredentials('iterableApi'); @@ -47,10 +46,9 @@ export async function iterableApiRequestAllItems( propertyName: string, method: string, endpoint: string, - // tslint:disable-next-line:no-any + body: any = {}, query: IDataObject = {}, - // tslint:disable-next-line:no-any ): Promise { const returnData: IDataObject[] = []; diff --git a/packages/nodes-base/nodes/Jenkins/GenericFunctions.ts b/packages/nodes-base/nodes/Jenkins/GenericFunctions.ts index a19be32f53..e5cd6d3da9 100644 --- a/packages/nodes-base/nodes/Jenkins/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Jenkins/GenericFunctions.ts @@ -14,10 +14,9 @@ export async function jenkinsApiRequest( method: string, uri: string, qs: IDataObject = {}, - // tslint:disable-next-line:no-any + body: any = '', option: IDataObject = {}, - // tslint:disable-next-line:no-any ): Promise { const credentials = await this.getCredentials('jenkinsApi'); let options: OptionsWithUri = { diff --git a/packages/nodes-base/nodes/Jira/GenericFunctions.ts b/packages/nodes-base/nodes/Jira/GenericFunctions.ts index 0f55702094..5df2d15155 100644 --- a/packages/nodes-base/nodes/Jira/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Jira/GenericFunctions.ts @@ -13,12 +13,11 @@ export async function jiraSoftwareCloudApiRequest( this: IHookFunctions | IExecuteFunctions | IExecuteSingleFunctions | ILoadOptionsFunctions, endpoint: string, method: string, - // tslint:disable-next-line:no-any + body: any = {}, query?: IDataObject, uri?: string, option: IDataObject = {}, - // tslint:disable-next-line:no-any ): Promise { const jiraVersion = this.getNodeParameter('jiraVersion', 0) as string; @@ -66,10 +65,9 @@ export async function jiraSoftwareCloudApiRequestAllItems( propertyName: string, endpoint: string, method: string, - // tslint:disable-next-line:no-any + body: any = {}, query: IDataObject = {}, - // tslint:disable-next-line:no-any ): Promise { const returnData: IDataObject[] = []; @@ -90,7 +88,6 @@ export async function jiraSoftwareCloudApiRequestAllItems( return returnData; } -// tslint:disable-next-line:no-any export function validateJSON(json: string | undefined): any { let result; try { diff --git a/packages/nodes-base/nodes/Jira/Jira.node.ts b/packages/nodes-base/nodes/Jira/Jira.node.ts index ea656b7c8f..fbe509a3b7 100644 --- a/packages/nodes-base/nodes/Jira/Jira.node.ts +++ b/packages/nodes-base/nodes/Jira/Jira.node.ts @@ -389,9 +389,9 @@ export class Jira implements INodeType { ); const fields = res.projects - // tslint:disable-next-line:no-any + .find((o: any) => o.id === projectId) - // tslint:disable-next-line:no-any + .issuetypes.find((o: any) => o.id === issueTypeId).fields; for (const key of Object.keys(fields)) { const field = fields[key]; diff --git a/packages/nodes-base/nodes/Jira/JiraTrigger.node.ts b/packages/nodes-base/nodes/Jira/JiraTrigger.node.ts index bbc4772bc9..550a94e09a 100644 --- a/packages/nodes-base/nodes/Jira/JiraTrigger.node.ts +++ b/packages/nodes-base/nodes/Jira/JiraTrigger.node.ts @@ -420,7 +420,6 @@ export class JiraTrigger implements INodeType { body.excludeBody = additionalFields.excludeBody as boolean; } - // tslint:disable-next-line: no-any const parameters: any = {}; if (incomingAuthentication === 'queryAuth') { diff --git a/packages/nodes-base/nodes/JotForm/GenericFunctions.ts b/packages/nodes-base/nodes/JotForm/GenericFunctions.ts index d4e9ffb69e..4ae114f050 100644 --- a/packages/nodes-base/nodes/JotForm/GenericFunctions.ts +++ b/packages/nodes-base/nodes/JotForm/GenericFunctions.ts @@ -17,12 +17,11 @@ export async function jotformApiRequest( | IWebhookFunctions, method: string, resource: string, - // tslint:disable-next-line:no-any + body: any = {}, qs: IDataObject = {}, uri?: string, option: IDataObject = {}, - // tslint:disable-next-line:no-any ): Promise { const credentials = await this.getCredentials('jotFormApi'); let options: OptionsWithUri = { diff --git a/packages/nodes-base/nodes/JotForm/JotFormTrigger.node.ts b/packages/nodes-base/nodes/JotForm/JotFormTrigger.node.ts index de252c1057..e71d3a342d 100644 --- a/packages/nodes-base/nodes/JotForm/JotFormTrigger.node.ts +++ b/packages/nodes-base/nodes/JotForm/JotFormTrigger.node.ts @@ -167,7 +167,6 @@ export class JotFormTrigger implements INodeType { return new Promise((resolve, _reject) => { form.parse(req, async (err, data, _files) => { - // tslint:disable-next-line:no-any const rawRequest = jsonParse(data.rawRequest as string); data.rawRequest = rawRequest; diff --git a/packages/nodes-base/nodes/Keap/GenericFunctions.ts b/packages/nodes-base/nodes/Keap/GenericFunctions.ts index 549cb089d7..d1142f3e78 100644 --- a/packages/nodes-base/nodes/Keap/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Keap/GenericFunctions.ts @@ -15,13 +15,12 @@ export async function keapApiRequest( this: IWebhookFunctions | IHookFunctions | IExecuteFunctions | ILoadOptionsFunctions, method: string, resource: string, - // tslint:disable-next-line:no-any + body: any = {}, qs: IDataObject = {}, uri?: string, headers: IDataObject = {}, option: IDataObject = {}, - // tslint:disable-next-line:no-any ): Promise { let options: OptionsWithUri = { headers: { @@ -53,10 +52,9 @@ export async function keapApiRequestAllItems( propertyName: string, method: string, endpoint: string, - // tslint:disable-next-line:no-any + body: any = {}, query: IDataObject = {}, - // tslint:disable-next-line:no-any ): Promise { const returnData: IDataObject[] = []; diff --git a/packages/nodes-base/nodes/KoBoToolbox/GenericFunctions.ts b/packages/nodes-base/nodes/KoBoToolbox/GenericFunctions.ts index 3913b3455d..95eb2dfa2b 100644 --- a/packages/nodes-base/nodes/KoBoToolbox/GenericFunctions.ts +++ b/packages/nodes-base/nodes/KoBoToolbox/GenericFunctions.ts @@ -14,7 +14,6 @@ import _ from 'lodash'; export async function koBoToolboxApiRequest( this: IExecuteFunctions | IWebhookFunctions | IHookFunctions | ILoadOptionsFunctions, option: IDataObject = {}, - // tslint:disable-next-line:no-any ): Promise { const credentials = await this.getCredentials('koBoToolboxApi'); @@ -84,7 +83,6 @@ const matchWildcard = (value: string, pattern: string): boolean => { return regex.test(value); }; -// tslint:disable-next-line:no-any const formatValue = (value: any, format: string): any => { if (_.isString(value)) { // Sanitize value @@ -193,7 +191,7 @@ export async function downloadAttachments( const credentials = await this.getCredentials('koBoToolboxApi'); // Look for attachment links - there can be more than one - const attachmentList = (submission['_attachments'] || submission['attachments']) as any[]; // tslint:disable-line:no-any + const attachmentList = (submission['_attachments'] || submission['attachments']) as any[]; if (attachmentList && attachmentList.length) { for (const [index, attachment] of attachmentList.entries()) { // look for the question name linked to this attachment @@ -281,5 +279,5 @@ export async function loadForms(this: ILoadOptionsFunctions): Promise ({ name: survey.name, value: survey.uid })) || []; // tslint:disable-line:no-any + return responseData?.map((survey: any) => ({ name: survey.name, value: survey.uid })) || []; } diff --git a/packages/nodes-base/nodes/KoBoToolbox/KoBoToolbox.node.ts b/packages/nodes-base/nodes/KoBoToolbox/KoBoToolbox.node.ts index 325c4195b5..2754938096 100644 --- a/packages/nodes-base/nodes/KoBoToolbox/KoBoToolbox.node.ts +++ b/packages/nodes-base/nodes/KoBoToolbox/KoBoToolbox.node.ts @@ -75,9 +75,8 @@ export class KoBoToolbox implements INodeType { }; async execute(this: IExecuteFunctions): Promise { - // tslint:disable-next-line:no-any let responseData: any; - // tslint:disable-next-line:no-any + let returnData: any[] = []; const binaryItems: INodeExecutionData[] = []; const items = this.getInputData(); diff --git a/packages/nodes-base/nodes/Line/GenericFunctions.ts b/packages/nodes-base/nodes/Line/GenericFunctions.ts index 1cbfc20ca4..c5a0dd0175 100644 --- a/packages/nodes-base/nodes/Line/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Line/GenericFunctions.ts @@ -13,12 +13,11 @@ export async function lineApiRequest( this: IExecuteFunctions | IExecuteSingleFunctions | ILoadOptionsFunctions | IHookFunctions, method: string, resource: string, - // tslint:disable-next-line:no-any + body: any = {}, qs: IDataObject = {}, uri?: string, option: IDataObject = {}, - // tslint:disable-next-line:no-any ): Promise { let options: OptionsWithUri = { headers: { diff --git a/packages/nodes-base/nodes/Linear/GenericFunctions.ts b/packages/nodes-base/nodes/Linear/GenericFunctions.ts index d8d2b04700..5b76687d25 100644 --- a/packages/nodes-base/nodes/Linear/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Linear/GenericFunctions.ts @@ -18,10 +18,9 @@ import { query } from './Queries'; export async function linearApiRequest( this: IExecuteFunctions | IWebhookFunctions | IHookFunctions | ILoadOptionsFunctions, - // tslint:disable-next-line:no-any + body: any = {}, option: IDataObject = {}, - // tslint:disable-next-line:no-any ): Promise { const credentials = await this.getCredentials('linearApi'); @@ -52,9 +51,8 @@ export function capitalizeFirstLetter(data: string) { export async function linearApiRequestAllItems( this: IHookFunctions | IExecuteFunctions | ILoadOptionsFunctions, propertyName: string, - // tslint:disable-next-line:no-any + body: any = {}, - // tslint:disable-next-line:no-any ): Promise { const returnData: IDataObject[] = []; @@ -73,7 +71,6 @@ export async function linearApiRequestAllItems( export async function validateCredentials( this: ICredentialTestFunctions, decryptedCredentials: ICredentialDataDecryptedObject, - // tslint:disable-next-line:no-any ): Promise { const credentials = decryptedCredentials; diff --git a/packages/nodes-base/nodes/LingvaNex/GenericFunctions.ts b/packages/nodes-base/nodes/LingvaNex/GenericFunctions.ts index ba2987ccb0..0dfdbd1608 100644 --- a/packages/nodes-base/nodes/LingvaNex/GenericFunctions.ts +++ b/packages/nodes-base/nodes/LingvaNex/GenericFunctions.ts @@ -13,12 +13,11 @@ export async function lingvaNexApiRequest( this: IHookFunctions | IExecuteFunctions | IExecuteSingleFunctions | ILoadOptionsFunctions, method: string, resource: string, - // tslint:disable-next-line:no-any + body: any = {}, qs: IDataObject = {}, uri?: string, option: IDataObject = {}, - // tslint:disable-next-line:no-any ): Promise { try { const credentials = await this.getCredentials('lingvaNexApi'); diff --git a/packages/nodes-base/nodes/LinkedIn/GenericFunctions.ts b/packages/nodes-base/nodes/LinkedIn/GenericFunctions.ts index 2aafe8db65..bfe80350d5 100644 --- a/packages/nodes-base/nodes/LinkedIn/GenericFunctions.ts +++ b/packages/nodes-base/nodes/LinkedIn/GenericFunctions.ts @@ -7,11 +7,10 @@ export async function linkedInApiRequest( this: IHookFunctions | IExecuteFunctions | ILoadOptionsFunctions, method: string, endpoint: string, - // tslint:disable-next-line:no-any + body: any = {}, binary?: boolean, _headers?: object, - // tslint:disable-next-line:no-any ): Promise { const options: OptionsWithUrl = { headers: { @@ -43,7 +42,6 @@ export async function linkedInApiRequest( } } -// tslint:disable-next-line:no-any export function validateJSON(json: string | undefined): any { let result; try { diff --git a/packages/nodes-base/nodes/LinkedIn/LinkedIn.node.ts b/packages/nodes-base/nodes/LinkedIn/LinkedIn.node.ts index 7a0ff4ec19..0933237972 100644 --- a/packages/nodes-base/nodes/LinkedIn/LinkedIn.node.ts +++ b/packages/nodes-base/nodes/LinkedIn/LinkedIn.node.ts @@ -75,7 +75,7 @@ export class LinkedIn implements INodeType { const resource = this.getNodeParameter('resource', 0); const operation = this.getNodeParameter('operation', 0); - let body: any = {}; // tslint:disable-line:no-any + let body: any = {}; for (let i = 0; i < items.length; i++) { try { diff --git a/packages/nodes-base/nodes/MQTT/Mqtt.node.ts b/packages/nodes-base/nodes/MQTT/Mqtt.node.ts index a60b11a75e..5b369344c2 100644 --- a/packages/nodes-base/nodes/MQTT/Mqtt.node.ts +++ b/packages/nodes-base/nodes/MQTT/Mqtt.node.ts @@ -157,7 +157,7 @@ export class Mqtt implements INodeType { client = mqtt.connect(brokerUrl, clientOptions); } - // tslint:disable-next-line: no-any + await new Promise((resolve, reject): any => { client.on('connect', (test) => { resolve(test); @@ -235,7 +235,6 @@ export class Mqtt implements INodeType { const sendInputData = this.getNodeParameter('sendInputData', 0) as boolean; - // tslint:disable-next-line: no-any const data = await new Promise((resolve, reject): any => { client.on('connect', () => { for (let i = 0; i < length; i++) { diff --git a/packages/nodes-base/nodes/MQTT/MqttTrigger.node.ts b/packages/nodes-base/nodes/MQTT/MqttTrigger.node.ts index e71fb9ed5f..4554ae899e 100644 --- a/packages/nodes-base/nodes/MQTT/MqttTrigger.node.ts +++ b/packages/nodes-base/nodes/MQTT/MqttTrigger.node.ts @@ -140,7 +140,6 @@ export class MqttTrigger implements INodeType { reject(err); } client.on('message', (topic: string, message: Buffer | string) => { - // tslint:disable-line:no-any let result: IDataObject = {}; message = message.toString() as string; diff --git a/packages/nodes-base/nodes/Magento/GenericFunctions.ts b/packages/nodes-base/nodes/Magento/GenericFunctions.ts index 505d25ba47..2a95aa8d27 100644 --- a/packages/nodes-base/nodes/Magento/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Magento/GenericFunctions.ts @@ -15,13 +15,12 @@ export async function magentoApiRequest( this: IWebhookFunctions | IHookFunctions | IExecuteFunctions | ILoadOptionsFunctions, method: string, resource: string, - // tslint:disable-next-line:no-any + body: any = {}, qs: IDataObject = {}, uri?: string, _headers: IDataObject = {}, option: IDataObject = {}, - // tslint:disable-next-line:no-any ): Promise { const credentials = await this.getCredentials('magento2Api'); @@ -50,10 +49,9 @@ export async function magentoApiRequestAllItems( propertyName: string, method: string, resource: string, - // tslint:disable-next-line:no-any + body: any = {}, query: IDataObject = {}, - // tslint:disable-next-line:no-any ): Promise { const returnData: IDataObject[] = []; @@ -193,7 +191,6 @@ export function getAddressesUi(): INodeProperties { }; } -// tslint:disable-next-line: no-any export function adjustAddresses(addresses: [{ street: string; [key: string]: string }]): Address[] { const _addresses: Address[] = []; for (let i = 0; i < addresses.length; i++) { @@ -515,7 +512,6 @@ export function getFilterQuery(data: { }; } -// tslint:disable-next-line:no-any export function validateJSON(json: string | undefined): any { let result; try { @@ -987,7 +983,7 @@ export const sort = (a: { name: string }, b: { name: string }) => { export async function getProductAttributes( this: ILoadOptionsFunctions, - // tslint:disable-next-line:no-any + filter?: (attribute: ProductAttribute) => any, extraValue?: { name: string; value: string }, ): Promise { diff --git a/packages/nodes-base/nodes/Magento/Magento2.node.ts b/packages/nodes-base/nodes/Magento/Magento2.node.ts index 30916e17cb..bdcd565b43 100644 --- a/packages/nodes-base/nodes/Magento/Magento2.node.ts +++ b/packages/nodes-base/nodes/Magento/Magento2.node.ts @@ -356,17 +356,15 @@ export class Magento2 implements INodeType { 'is_subscribed', 'vertex_customer_code', 'vertex_customer_country', - ] - // tslint:disable-next-line: no-any - .reduce((obj, value: string): any => { - if ((rest as IDataObject).hasOwnProperty(value)) { - const data = Object.assign(obj, { [value]: (rest as IDataObject)[value] }); - delete (rest as IDataObject)[value]; - return data; - } else { - return obj; - } - }, {}); + ].reduce((obj, value: string): any => { + if ((rest as IDataObject).hasOwnProperty(value)) { + const data = Object.assign(obj, { [value]: (rest as IDataObject)[value] }); + delete (rest as IDataObject)[value]; + return data; + } else { + return obj; + } + }, {}); if (password) { body.password = password; @@ -502,17 +500,15 @@ export class Magento2 implements INodeType { 'is_subscribed', 'vertex_customer_code', 'vertex_customer_country', - ] - // tslint:disable-next-line: no-any - .reduce((obj, value: string): any => { - if ((rest as IDataObject).hasOwnProperty(value)) { - const data = Object.assign(obj, { [value]: (rest as IDataObject)[value] }); - delete (rest as IDataObject)[value]; - return data; - } else { - return obj; - } - }, {}); + ].reduce((obj, value: string): any => { + if ((rest as IDataObject).hasOwnProperty(value)) { + const data = Object.assign(obj, { [value]: (rest as IDataObject)[value] }); + delete (rest as IDataObject)[value]; + return data; + } else { + return obj; + } + }, {}); if (password) { body.password = password; diff --git a/packages/nodes-base/nodes/Mailcheck/GenericFunctions.ts b/packages/nodes-base/nodes/Mailcheck/GenericFunctions.ts index 59ec675311..9bc04e9cf4 100644 --- a/packages/nodes-base/nodes/Mailcheck/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Mailcheck/GenericFunctions.ts @@ -13,13 +13,12 @@ export async function mailCheckApiRequest( this: IWebhookFunctions | IHookFunctions | IExecuteFunctions | ILoadOptionsFunctions, method: string, resource: string, - // tslint:disable-next-line:no-any + body: any = {}, qs: IDataObject = {}, uri?: string, headers: IDataObject = {}, option: IDataObject = {}, - // tslint:disable-next-line:no-any ): Promise { const credentials = await this.getCredentials('mailcheckApi'); diff --git a/packages/nodes-base/nodes/Mailchimp/GenericFunctions.ts b/packages/nodes-base/nodes/Mailchimp/GenericFunctions.ts index a0536573bb..4629f6be78 100644 --- a/packages/nodes-base/nodes/Mailchimp/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Mailchimp/GenericFunctions.ts @@ -13,11 +13,10 @@ export async function mailchimpApiRequest( this: IHookFunctions | IExecuteFunctions | IExecuteSingleFunctions | ILoadOptionsFunctions, endpoint: string, method: string, - // tslint:disable-next-line:no-any + body: any = {}, qs: IDataObject = {}, _headers?: object, - // tslint:disable-next-line:no-any ): Promise { const authenticationMethod = this.getNodeParameter('authentication', 0) as string; @@ -71,10 +70,9 @@ export async function mailchimpApiRequestAllItems( endpoint: string, method: string, propertyName: string, - // tslint:disable-next-line:no-any + body: any = {}, query: IDataObject = {}, - // tslint:disable-next-line:no-any ): Promise { const returnData: IDataObject[] = []; @@ -92,7 +90,6 @@ export async function mailchimpApiRequestAllItems( return returnData; } -// tslint:disable-next-line:no-any export function validateJSON(json: string | undefined): any { let result; try { diff --git a/packages/nodes-base/nodes/MailerLite/GenericFunctions.ts b/packages/nodes-base/nodes/MailerLite/GenericFunctions.ts index 1c4be40f71..7cca705192 100644 --- a/packages/nodes-base/nodes/MailerLite/GenericFunctions.ts +++ b/packages/nodes-base/nodes/MailerLite/GenericFunctions.ts @@ -13,11 +13,10 @@ export async function mailerliteApiRequest( this: IExecuteFunctions | IExecuteSingleFunctions | ILoadOptionsFunctions | IHookFunctions, method: string, path: string, - // tslint:disable-next-line:no-any + body: any = {}, qs: IDataObject = {}, _option = {}, - // tslint:disable-next-line:no-any ): Promise { const credentials = await this.getCredentials('mailerLiteApi'); @@ -46,10 +45,9 @@ export async function mailerliteApiRequestAllItems( this: IExecuteFunctions | ILoadOptionsFunctions | IHookFunctions, method: string, endpoint: string, - // tslint:disable-next-line:no-any + body: any = {}, query: IDataObject = {}, - // tslint:disable-next-line:no-any ): Promise { const returnData: IDataObject[] = []; diff --git a/packages/nodes-base/nodes/Mailjet/GenericFunctions.ts b/packages/nodes-base/nodes/Mailjet/GenericFunctions.ts index 8105a4323b..2c0982eeaf 100644 --- a/packages/nodes-base/nodes/Mailjet/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Mailjet/GenericFunctions.ts @@ -8,12 +8,11 @@ export async function mailjetApiRequest( this: IExecuteFunctions | IExecuteSingleFunctions | IHookFunctions | ILoadOptionsFunctions, method: string, path: string, - // tslint:disable-next-line:no-any + body: any = {}, qs: IDataObject = {}, uri?: string, option: IDataObject = {}, - // tslint:disable-next-line:no-any ): Promise { const resource = this.getNodeParameter('resource', 0); @@ -55,10 +54,9 @@ export async function mailjetApiRequestAllItems( this: IExecuteFunctions | IHookFunctions | ILoadOptionsFunctions, method: string, endpoint: string, - // tslint:disable-next-line:no-any + body: any = {}, query: IDataObject = {}, - // tslint:disable-next-line:no-any ): Promise { const returnData: IDataObject[] = []; @@ -77,7 +75,6 @@ export async function mailjetApiRequestAllItems( return returnData; } -// tslint:disable-next-line:no-any export function validateJSON(json: string | undefined): IDataObject | undefined { let result; try { diff --git a/packages/nodes-base/nodes/Mandrill/GenericFunctions.ts b/packages/nodes-base/nodes/Mandrill/GenericFunctions.ts index 16e09ae5d4..275d600fa4 100644 --- a/packages/nodes-base/nodes/Mandrill/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Mandrill/GenericFunctions.ts @@ -10,10 +10,9 @@ export async function mandrillApiRequest( resource: string, method: string, action: string, - // tslint:disable-next-line:no-any + body: any = {}, headers?: object, - // tslint:disable-next-line:no-any ): Promise { const credentials = await this.getCredentials('mandrillApi'); @@ -36,7 +35,6 @@ export async function mandrillApiRequest( } } -// tslint:disable-next-line:no-any export function getToEmailArray(toEmail: string): any { let toEmailArray; if (toEmail.split(',').length > 0) { @@ -68,7 +66,6 @@ export function getGoogleAnalyticsDomainsArray(s: string): string[] { return array; } -// tslint:disable-next-line:no-any export function getTags(s: string): any[] { let array = []; if (s.split(',').length > 0) { @@ -79,7 +76,6 @@ export function getTags(s: string): any[] { return array; } -// tslint:disable-next-line:no-any export function validateJSON(json: string | undefined): any { let result; try { diff --git a/packages/nodes-base/nodes/Marketstack/Marketstack.node.ts b/packages/nodes-base/nodes/Marketstack/Marketstack.node.ts index 3abf8dc1b4..de5a1e00e4 100644 --- a/packages/nodes-base/nodes/Marketstack/Marketstack.node.ts +++ b/packages/nodes-base/nodes/Marketstack/Marketstack.node.ts @@ -87,7 +87,7 @@ export class Marketstack implements INodeType { const resource = this.getNodeParameter('resource', 0) as Resource; const operation = this.getNodeParameter('operation', 0) as Operation; - let responseData: any; // tslint:disable-line: no-any + let responseData: any; const returnData: INodeExecutionData[] = []; for (let i = 0; i < items.length; i++) { diff --git a/packages/nodes-base/nodes/Matrix/GenericFunctions.ts b/packages/nodes-base/nodes/Matrix/GenericFunctions.ts index bac9ee3525..c1c1eb9cfc 100644 --- a/packages/nodes-base/nodes/Matrix/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Matrix/GenericFunctions.ts @@ -15,7 +15,6 @@ export async function matrixApiRequest( query: object = {}, headers: {} | undefined = undefined, option: {} = {}, - // tslint:disable-next-line:no-any ): Promise { let options: OptionsWithUri = { method, @@ -35,7 +34,7 @@ export async function matrixApiRequest( delete options.qs; } try { - let response: any; // tslint:disable-line:no-any + let response: any; const credentials = await this.getCredentials('matrixApi'); @@ -62,7 +61,6 @@ export async function handleMatrixCall( index: number, resource: string, operation: string, - // tslint:disable-next-line:no-any ): Promise { if (resource === 'account') { if (operation === 'me') { diff --git a/packages/nodes-base/nodes/Mautic/GenericFunctions.ts b/packages/nodes-base/nodes/Mautic/GenericFunctions.ts index 0cdea199b4..62baf83dc0 100644 --- a/packages/nodes-base/nodes/Mautic/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Mautic/GenericFunctions.ts @@ -12,11 +12,10 @@ export async function mauticApiRequest( this: IHookFunctions | IExecuteFunctions | IExecuteSingleFunctions | ILoadOptionsFunctions, method: string, endpoint: string, - // tslint:disable-next-line:no-any + body: any = {}, query?: IDataObject, uri?: string, - // tslint:disable-next-line:no-any ): Promise { const authenticationMethod = this.getNodeParameter('authentication', 0, 'credentials') as string; @@ -70,10 +69,9 @@ export async function mauticApiRequestAllItems( propertyName: string, method: string, endpoint: string, - // tslint:disable-next-line:no-any + body: any = {}, query: IDataObject = {}, - // tslint:disable-next-line:no-any ): Promise { const returnData: IDataObject[] = []; @@ -95,7 +93,6 @@ export async function mauticApiRequestAllItems( return returnData; } -// tslint:disable-next-line:no-any export function validateJSON(json: string | undefined): any { let result; try { diff --git a/packages/nodes-base/nodes/Medium/GenericFunctions.ts b/packages/nodes-base/nodes/Medium/GenericFunctions.ts index 6a35e05ac5..9d47838f8c 100644 --- a/packages/nodes-base/nodes/Medium/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Medium/GenericFunctions.ts @@ -13,11 +13,10 @@ export async function mediumApiRequest( this: IHookFunctions | IExecuteFunctions | IExecuteSingleFunctions | ILoadOptionsFunctions, method: string, endpoint: string, - // tslint:disable-next-line:no-any + body: any = {}, query: IDataObject = {}, uri?: string, - // tslint:disable-next-line:no-any ): Promise { const authenticationMethod = this.getNodeParameter('authentication', 0); diff --git a/packages/nodes-base/nodes/MessageBird/GenericFunctions.ts b/packages/nodes-base/nodes/MessageBird/GenericFunctions.ts index 7e71ff4a70..c74856c265 100644 --- a/packages/nodes-base/nodes/MessageBird/GenericFunctions.ts +++ b/packages/nodes-base/nodes/MessageBird/GenericFunctions.ts @@ -14,7 +14,6 @@ export async function messageBirdApiRequest( resource: string, body: IDataObject, query: IDataObject = {}, - // tslint:disable-next-line:no-any ): Promise { const credentials = await this.getCredentials('messageBirdApi'); diff --git a/packages/nodes-base/nodes/Microsoft/Dynamics/GenericFunctions.ts b/packages/nodes-base/nodes/Microsoft/Dynamics/GenericFunctions.ts index 560a4651cc..c60d55152e 100644 --- a/packages/nodes-base/nodes/Microsoft/Dynamics/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Microsoft/Dynamics/GenericFunctions.ts @@ -8,12 +8,11 @@ export async function microsoftApiRequest( this: IExecuteFunctions | IExecuteSingleFunctions | ILoadOptionsFunctions, method: string, resource: string, - // tslint:disable-next-line:no-any + body: any = {}, qs: IDataObject = {}, uri?: string, option: IDataObject = {}, - // tslint:disable-next-line:no-any ): Promise { const credentials = (await this.getCredentials('microsoftDynamicsOAuth2Api')) as { subdomain: string; @@ -51,10 +50,9 @@ export async function microsoftApiRequestAllItems( propertyName: string, method: string, endpoint: string, - // tslint:disable-next-line:no-any + body: any = {}, query: IDataObject = {}, - // tslint:disable-next-line:no-any ): Promise { const returnData: IDataObject[] = []; @@ -100,7 +98,6 @@ export async function getEntityFields( } export function adjustAddresses(addresses: [{ [key: string]: string }]) { - // tslint:disable-next-line: no-any const results: { [key: string]: any } = {}; for (const [index, address] of addresses.entries()) { for (const key of Object.keys(address)) { diff --git a/packages/nodes-base/nodes/Microsoft/Dynamics/MicrosoftDynamicsCrm.node.ts b/packages/nodes-base/nodes/Microsoft/Dynamics/MicrosoftDynamicsCrm.node.ts index 2bb849466f..f1e8ccb020 100644 --- a/packages/nodes-base/nodes/Microsoft/Dynamics/MicrosoftDynamicsCrm.node.ts +++ b/packages/nodes-base/nodes/Microsoft/Dynamics/MicrosoftDynamicsCrm.node.ts @@ -160,7 +160,6 @@ export class MicrosoftDynamicsCrm implements INodeType { if (operation === 'create') { const name = this.getNodeParameter('name', i) as string; const additionalFields = this.getNodeParameter('additionalFields', i) as { - // tslint:disable-next-line: no-any addresses: { address: [{ [key: string]: any }] }; }; const options = this.getNodeParameter('options', i) as { returnFields: string[] }; @@ -245,7 +244,6 @@ export class MicrosoftDynamicsCrm implements INodeType { if (operation === 'update') { const accountId = this.getNodeParameter('accountId', i) as string; const updateFields = this.getNodeParameter('updateFields', i) as { - // tslint:disable-next-line: no-any addresses: { address: [{ [key: string]: any }] }; }; const options = this.getNodeParameter('options', i) as { returnFields: string[] }; diff --git a/packages/nodes-base/nodes/Microsoft/Excel/GenericFunctions.ts b/packages/nodes-base/nodes/Microsoft/Excel/GenericFunctions.ts index cb71779117..849048ddc8 100644 --- a/packages/nodes-base/nodes/Microsoft/Excel/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Microsoft/Excel/GenericFunctions.ts @@ -6,12 +6,11 @@ export async function microsoftApiRequest( this: IExecuteFunctions | IExecuteSingleFunctions | ILoadOptionsFunctions, method: string, resource: string, - // tslint:disable-next-line:no-any + body: any = {}, qs: IDataObject = {}, uri?: string, headers: IDataObject = {}, - // tslint:disable-next-line:no-any ): Promise { const options: OptionsWithUri = { headers: { @@ -39,10 +38,9 @@ export async function microsoftApiRequestAllItems( propertyName: string, method: string, endpoint: string, - // tslint:disable-next-line:no-any + body: any = {}, query: IDataObject = {}, - // tslint:disable-next-line:no-any ): Promise { const returnData: IDataObject[] = []; @@ -67,10 +65,9 @@ export async function microsoftApiRequestAllItemsSkip( propertyName: string, method: string, endpoint: string, - // tslint:disable-next-line:no-any + body: any = {}, query: IDataObject = {}, - // tslint:disable-next-line:no-any ): Promise { const returnData: IDataObject[] = []; diff --git a/packages/nodes-base/nodes/Microsoft/Excel/MicrosoftExcel.node.ts b/packages/nodes-base/nodes/Microsoft/Excel/MicrosoftExcel.node.ts index 18801ffbe1..e8d919c709 100644 --- a/packages/nodes-base/nodes/Microsoft/Excel/MicrosoftExcel.node.ts +++ b/packages/nodes-base/nodes/Microsoft/Excel/MicrosoftExcel.node.ts @@ -197,7 +197,7 @@ export class MicrosoftExcel implements INodeType { ); const columns = responseData.value.map((column: IDataObject) => column.name); - const rows: any[][] = []; // tslint:disable-line:no-any + const rows: any[][] = []; // Bring the items into the correct format for (const item of items) { diff --git a/packages/nodes-base/nodes/Microsoft/GraphSecurity/GenericFunctions.ts b/packages/nodes-base/nodes/Microsoft/GraphSecurity/GenericFunctions.ts index 0e31c79e00..71b89e96c9 100644 --- a/packages/nodes-base/nodes/Microsoft/GraphSecurity/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Microsoft/GraphSecurity/GenericFunctions.ts @@ -13,9 +13,7 @@ export async function msGraphSecurityApiRequest( headers: IDataObject = {}, ) { const { - oauthTokenData: { - access_token, // tslint:disable-line variable-name - }, + oauthTokenData: { access_token }, } = (await this.getCredentials('microsoftGraphSecurityOAuth2Api')) as { oauthTokenData: { access_token: string; diff --git a/packages/nodes-base/nodes/Microsoft/OneDrive/GenericFunctions.ts b/packages/nodes-base/nodes/Microsoft/OneDrive/GenericFunctions.ts index ebdef13758..3aabf8ca26 100644 --- a/packages/nodes-base/nodes/Microsoft/OneDrive/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Microsoft/OneDrive/GenericFunctions.ts @@ -8,13 +8,12 @@ export async function microsoftApiRequest( this: IExecuteFunctions | IExecuteSingleFunctions | ILoadOptionsFunctions, method: string, resource: string, - // tslint:disable-next-line:no-any + body: any = {}, qs: IDataObject = {}, uri?: string, headers: IDataObject = {}, option: IDataObject = { json: true }, - // tslint:disable-next-line:no-any ): Promise { const options: OptionsWithUri = { headers: { @@ -48,10 +47,9 @@ export async function microsoftApiRequestAllItems( propertyName: string, method: string, endpoint: string, - // tslint:disable-next-line:no-any + body: any = {}, query: IDataObject = {}, - // tslint:disable-next-line:no-any ): Promise { const returnData: IDataObject[] = []; @@ -76,10 +74,9 @@ export async function microsoftApiRequestAllItemsSkip( propertyName: string, method: string, endpoint: string, - // tslint:disable-next-line:no-any + body: any = {}, query: IDataObject = {}, - // tslint:disable-next-line:no-any ): Promise { const returnData: IDataObject[] = []; diff --git a/packages/nodes-base/nodes/Microsoft/Outlook/GenericFunctions.ts b/packages/nodes-base/nodes/Microsoft/Outlook/GenericFunctions.ts index 29ca1ee9d5..0d237d07e3 100644 --- a/packages/nodes-base/nodes/Microsoft/Outlook/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Microsoft/Outlook/GenericFunctions.ts @@ -19,13 +19,12 @@ export async function microsoftApiRequest( this: IExecuteFunctions | IExecuteSingleFunctions | ILoadOptionsFunctions, method: string, resource: string, - // tslint:disable-next-line:no-any + body: any = {}, qs: IDataObject = {}, uri?: string, headers: IDataObject = {}, option: IDataObject = { json: true }, - // tslint:disable-next-line:no-any ): Promise { const credentials = await this.getCredentials('microsoftOutlookOAuth2Api'); @@ -67,11 +66,10 @@ export async function microsoftApiRequestAllItems( propertyName: string, method: string, endpoint: string, - // tslint:disable-next-line:no-any + body: any = {}, query: IDataObject = {}, headers: IDataObject = {}, - // tslint:disable-next-line:no-any ): Promise { const returnData: IDataObject[] = []; @@ -101,11 +99,10 @@ export async function microsoftApiRequestAllItemsSkip( propertyName: string, method: string, endpoint: string, - // tslint:disable-next-line:no-any + body: any = {}, query: IDataObject = {}, headers: IDataObject = {}, - // tslint:disable-next-line:no-any ): Promise { const returnData: IDataObject[] = []; diff --git a/packages/nodes-base/nodes/Microsoft/Sql/GenericFunctions.ts b/packages/nodes-base/nodes/Microsoft/Sql/GenericFunctions.ts index c222c7149d..b73dc43cea 100644 --- a/packages/nodes-base/nodes/Microsoft/Sql/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Microsoft/Sql/GenericFunctions.ts @@ -59,7 +59,7 @@ export function createTableStruct( * @param {ITables} tables The ITables to be processed. * @param {function} buildQueryQueue function that builds the queue of promises */ -// tslint:disable-next-line: no-any + export function executeQueryQueue(tables: ITables, buildQueryQueue: Function): Promise { return Promise.all( Object.keys(tables).map((table) => { @@ -83,7 +83,7 @@ export function executeQueryQueue(tables: ITables, buildQueryQueue: Function): P * @param {IDataObject} item The item to extract */ export function extractValues(item: IDataObject): string { - return `(${Object.values(item as any) // tslint:disable-line:no-any + return `(${Object.values(item as any) .map((val) => { //the column cannot be found in the input //so, set it to null in the sql query diff --git a/packages/nodes-base/nodes/Microsoft/Teams/GenericFunctions.ts b/packages/nodes-base/nodes/Microsoft/Teams/GenericFunctions.ts index b7040fd4b8..6933d76ea3 100644 --- a/packages/nodes-base/nodes/Microsoft/Teams/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Microsoft/Teams/GenericFunctions.ts @@ -8,12 +8,11 @@ export async function microsoftApiRequest( this: IExecuteFunctions | IExecuteSingleFunctions | ILoadOptionsFunctions, method: string, resource: string, - // tslint:disable-next-line:no-any + body: any = {}, qs: IDataObject = {}, uri?: string, headers: IDataObject = {}, - // tslint:disable-next-line:no-any ): Promise { const options: OptionsWithUri = { headers: { @@ -41,10 +40,9 @@ export async function microsoftApiRequestAllItems( propertyName: string, method: string, endpoint: string, - // tslint:disable-next-line:no-any + body: any = {}, query: IDataObject = {}, - // tslint:disable-next-line:no-any ): Promise { const returnData: IDataObject[] = []; @@ -68,10 +66,9 @@ export async function microsoftApiRequestAllItemsSkip( propertyName: string, method: string, endpoint: string, - // tslint:disable-next-line:no-any + body: any = {}, query: IDataObject = {}, - // tslint:disable-next-line:no-any ): Promise { const returnData: IDataObject[] = []; diff --git a/packages/nodes-base/nodes/Mindee/GenericFunctions.ts b/packages/nodes-base/nodes/Mindee/GenericFunctions.ts index a23bb4714d..d2278c8003 100644 --- a/packages/nodes-base/nodes/Mindee/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Mindee/GenericFunctions.ts @@ -8,10 +8,9 @@ export async function mindeeApiRequest( this: IExecuteFunctions | IExecuteSingleFunctions | ILoadOptionsFunctions, method: string, path: string, - body: any = {}, // tslint:disable-line:no-any + body: any = {}, qs: IDataObject = {}, option = {}, - // tslint:disable-next-line:no-any ): Promise { const resource = this.getNodeParameter('resource', 0); diff --git a/packages/nodes-base/nodes/Misp/GenericFunctions.ts b/packages/nodes-base/nodes/Misp/GenericFunctions.ts index 0f5439d70d..45c5e1ca3e 100644 --- a/packages/nodes-base/nodes/Misp/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Misp/GenericFunctions.ts @@ -102,7 +102,7 @@ export function throwOnMissingSharingGroup(this: IExecuteFunctions, fields: IDat const isValidUrl = (str: string) => { try { - new URL(str); // tslint:disable-line: no-unused-expression + new URL(str); return true; } catch (error) { return false; diff --git a/packages/nodes-base/nodes/Mocean/GenericFunctions.ts b/packages/nodes-base/nodes/Mocean/GenericFunctions.ts index b2d6251eae..e468a69aff 100644 --- a/packages/nodes-base/nodes/Mocean/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Mocean/GenericFunctions.ts @@ -12,7 +12,6 @@ export async function moceanApiRequest( endpoint: string, body: IDataObject, query?: IDataObject, - // tslint:disable-next-line:no-any ): Promise { const credentials = await this.getCredentials('moceanApi'); diff --git a/packages/nodes-base/nodes/MondayCom/GenericFunctions.ts b/packages/nodes-base/nodes/MondayCom/GenericFunctions.ts index d3450bc0f9..1a9a310320 100644 --- a/packages/nodes-base/nodes/MondayCom/GenericFunctions.ts +++ b/packages/nodes-base/nodes/MondayCom/GenericFunctions.ts @@ -8,10 +8,9 @@ import { get } from 'lodash'; export async function mondayComApiRequest( this: IExecuteFunctions | IWebhookFunctions | IHookFunctions | ILoadOptionsFunctions, - // tslint:disable-next-line:no-any + body: any = {}, option: IDataObject = {}, - // tslint:disable-next-line:no-any ): Promise { const authenticationMethod = this.getNodeParameter('authentication', 0) as string; @@ -45,9 +44,8 @@ export async function mondayComApiRequest( export async function mondayComApiRequestAllItems( this: IHookFunctions | IExecuteFunctions | ILoadOptionsFunctions, propertyName: string, - // tslint:disable-next-line:no-any + body: any = {}, - // tslint:disable-next-line:no-any ): Promise { const returnData: IDataObject[] = []; diff --git a/packages/nodes-base/nodes/MoveBinaryData/MoveBinaryData.node.ts b/packages/nodes-base/nodes/MoveBinaryData/MoveBinaryData.node.ts index ec58033557..a717305ca4 100644 --- a/packages/nodes-base/nodes/MoveBinaryData/MoveBinaryData.node.ts +++ b/packages/nodes-base/nodes/MoveBinaryData/MoveBinaryData.node.ts @@ -21,7 +21,7 @@ iconv.encodingExists('utf8'); // Create options for bomAware and encoding const bomAware: string[] = []; const encodeDecodeOptions: INodePropertyOptions[] = []; -const encodings = (iconv as any).encodings; // tslint:disable-line:no-any +const encodings = (iconv as any).encodings; Object.keys(encodings).forEach((encoding) => { if (!(encoding.startsWith('_') || typeof encodings[encoding] === 'string')) { // only encodings without direct alias or internals diff --git a/packages/nodes-base/nodes/Msg91/GenericFunctions.ts b/packages/nodes-base/nodes/Msg91/GenericFunctions.ts index e935e3b1d5..ebab4cc55d 100644 --- a/packages/nodes-base/nodes/Msg91/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Msg91/GenericFunctions.ts @@ -12,7 +12,6 @@ export async function msg91ApiRequest( endpoint: string, body: IDataObject, query?: IDataObject, - // tslint:disable-next-line:no-any ): Promise { const credentials = await this.getCredentials('msg91Api'); diff --git a/packages/nodes-base/nodes/MySql/MySql.node.ts b/packages/nodes-base/nodes/MySql/MySql.node.ts index 04dd0918b5..ac96d5f4db 100644 --- a/packages/nodes-base/nodes/MySql/MySql.node.ts +++ b/packages/nodes-base/nodes/MySql/MySql.node.ts @@ -337,7 +337,7 @@ export class MySql implements INodeType { .map((_item) => insertPlaceholder) .join(',')};`; const queryItems = insertItems.reduce( - (collection, item) => collection.concat(Object.values(item as any)), // tslint:disable-line:no-any + (collection, item) => collection.concat(Object.values(item as any)), [], ); diff --git a/packages/nodes-base/nodes/N8n/GenericFunctions.ts b/packages/nodes-base/nodes/N8n/GenericFunctions.ts index 50bf67e50c..9139136473 100644 --- a/packages/nodes-base/nodes/N8n/GenericFunctions.ts +++ b/packages/nodes-base/nodes/N8n/GenericFunctions.ts @@ -24,7 +24,6 @@ export async function apiRequest( endpoint: string, body: object, query?: IDataObject, - // tslint:disable-next-line:no-any ): Promise { query = query || {}; @@ -60,7 +59,6 @@ export async function apiRequestAllItems( endpoint: string, body: object, query?: IDataObject, - // tslint:disable-next-line:no-any ): Promise { query = query || {}; const returnData: IDataObject[] = []; diff --git a/packages/nodes-base/nodes/Nasa/GenericFunctions.ts b/packages/nodes-base/nodes/Nasa/GenericFunctions.ts index 1f9d758a15..0225964150 100644 --- a/packages/nodes-base/nodes/Nasa/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Nasa/GenericFunctions.ts @@ -11,7 +11,6 @@ export async function nasaApiRequest( qs: IDataObject, option: IDataObject = {}, uri?: string | undefined, - // tslint:disable-next-line:no-any ): Promise { const credentials = await this.getCredentials('nasaApi'); @@ -41,7 +40,6 @@ export async function nasaApiRequestAllItems( method: string, resource: string, query: IDataObject = {}, - // tslint:disable-next-line:no-any ): Promise { const returnData: IDataObject[] = []; diff --git a/packages/nodes-base/nodes/Netlify/GenericFunctions.ts b/packages/nodes-base/nodes/Netlify/GenericFunctions.ts index b609e43f3c..f5756ebb8d 100644 --- a/packages/nodes-base/nodes/Netlify/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Netlify/GenericFunctions.ts @@ -13,12 +13,11 @@ export async function netlifyApiRequest( this: IHookFunctions | IExecuteFunctions | IExecuteSingleFunctions | ILoadOptionsFunctions, method: string, endpoint: string, - // tslint:disable-next-line:no-any + body: any = {}, query: IDataObject = {}, uri?: string, option: IDataObject = {}, - // tslint:disable-next-line:no-any ): Promise { const options: OptionsWithUri = { method, @@ -54,10 +53,9 @@ export async function netlifyRequestAllItems( this: IExecuteFunctions | ILoadOptionsFunctions, method: string, endpoint: string, - // tslint:disable-next-line:no-any + body: any = {}, query: IDataObject = {}, - // tslint:disable-next-line:no-any ): Promise { const returnData: IDataObject[] = []; diff --git a/packages/nodes-base/nodes/NextCloud/NextCloud.node.ts b/packages/nodes-base/nodes/NextCloud/NextCloud.node.ts index 688efd2842..824114fee6 100644 --- a/packages/nodes-base/nodes/NextCloud/NextCloud.node.ts +++ b/packages/nodes-base/nodes/NextCloud/NextCloud.node.ts @@ -876,7 +876,7 @@ export class NextCloud implements INodeType { let endpoint = ''; let requestMethod = ''; - let responseData: any; // tslint:disable-line:no-any + let responseData: any; let body: string | Buffer | IDataObject = ''; const headers: IDataObject = {}; diff --git a/packages/nodes-base/nodes/NocoDB/GenericFunctions.ts b/packages/nodes-base/nodes/NocoDB/GenericFunctions.ts index bc6bf21132..0c390ec1c3 100644 --- a/packages/nodes-base/nodes/NocoDB/GenericFunctions.ts +++ b/packages/nodes-base/nodes/NocoDB/GenericFunctions.ts @@ -30,7 +30,6 @@ export async function apiRequest( query?: IDataObject, uri?: string, option: IDataObject = {}, - // tslint:disable-next-line:no-any ): Promise { const authenticationMethod = this.getNodeParameter('authentication', 0) as string; const credentials = await this.getCredentials(authenticationMethod); @@ -75,7 +74,6 @@ export async function apiRequestAllItems( endpoint: string, body: IDataObject, query?: IDataObject, - // tslint:disable-next-line:no-any ): Promise { const version = this.getNode().typeVersion as number; diff --git a/packages/nodes-base/nodes/Notion/Filters.ts b/packages/nodes-base/nodes/Notion/Filters.ts index 11fb386543..75e4d918b7 100644 --- a/packages/nodes-base/nodes/Notion/Filters.ts +++ b/packages/nodes-base/nodes/Notion/Filters.ts @@ -1,4 +1,3 @@ -// tslint:disable-next-line: no-any export const filters = (conditions: any) => [ { displayName: 'Property Name or ID', diff --git a/packages/nodes-base/nodes/Notion/GenericFunctions.ts b/packages/nodes-base/nodes/Notion/GenericFunctions.ts index 80fe60474d..b4c89db131 100644 --- a/packages/nodes-base/nodes/Notion/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Notion/GenericFunctions.ts @@ -41,12 +41,11 @@ export async function notionApiRequest( | IPollFunctions, method: string, resource: string, - // tslint:disable-next-line:no-any + body: any = {}, qs: IDataObject = {}, uri?: string, option: IDataObject = {}, - // tslint:disable-next-line:no-any ): Promise { try { let options: OptionsWithUri = { @@ -77,10 +76,9 @@ export async function notionApiRequestAllItems( propertyName: string, method: string, endpoint: string, - // tslint:disable-next-line:no-any + body: any = {}, query: IDataObject = {}, - // tslint:disable-next-line:no-any ): Promise { const resource = this.getNodeParameter('resource', 0); @@ -251,7 +249,7 @@ export function formatBlocks(blocks: IDataObject[]) { [block.type as string]: { ...(block.type === 'to_do' ? { checked: block.checked } : {}), // prettier-ignore - // tslint:disable-next-line: no-any + text: (block.richText === false) ? formatText(block.textContent as string).text : getTexts((block.text as IDataObject).text as any || []), }, }); @@ -259,9 +257,7 @@ export function formatBlocks(blocks: IDataObject[]) { return results; } -// tslint:disable-next-line: no-any function getPropertyKeyValue(value: any, type: string, timezone: string, version = 1) { - // tslint:disable-next-line: no-any const ignoreIfEmpty = (v: T, cb: (v: T) => any) => !v && value.ignoreIfEmpty ? undefined : cb(v); let result: IDataObject = {}; @@ -289,7 +285,7 @@ function getPropertyKeyValue(value: any, type: string, timezone: string, version case 'relation': result = { type: 'relation', - // tslint:disable-next-line: no-any + relation: value.relationValue.reduce((acc: [], cur: any) => { return acc.concat(cur.split(',').map((relation: string) => ({ id: relation.trim() }))); }, []), @@ -303,7 +299,7 @@ function getPropertyKeyValue(value: any, type: string, timezone: string, version ? multiSelectValue : multiSelectValue.split(',').map((v: string) => v.trim()) ) - // tslint:disable-next-line: no-any + .filter((value: any) => value !== null) .map((option: string) => (!uuidValidate(option) ? { name: option } : { id: option })), }; @@ -403,7 +399,6 @@ function getNameAndType(key: string) { export function mapProperties(properties: IDataObject[], timezone: string, version = 1) { return properties .filter( - // tslint:disable-next-line: no-any (property): property is Record => typeof property.key === 'string', ) @@ -436,7 +431,6 @@ export function mapSorting( } export function mapFilters(filters: IDataObject[], timezone: string) { - // tslint:disable-next-line: no-any return filters.reduce((obj, value: { [key: string]: any }) => { let key = getNameAndType(value.key).type; @@ -481,16 +475,13 @@ export function mapFilters(filters: IDataObject[], timezone: string) { }, {}); } -// tslint:disable-next-line: no-any function simplifyProperty(property: any) { - // tslint:disable-next-line: no-any let result: any; const type = (property as IDataObject).type as string; if (['text'].includes(property.type)) { result = property.plain_text; } else if (['rich_text', 'title'].includes(property.type)) { if (Array.isArray(property[type]) && property[type].length !== 0) { - // tslint:disable-next-line: no-any result = property[type].map((text: any) => simplifyProperty(text) as string).join(''); } else { result = ''; @@ -507,13 +498,11 @@ function simplifyProperty(property: any) { 'date', ].includes(property.type) ) { - // tslint:disable-next-line: no-any result = property[type] as any; } else if (['created_by', 'last_edited_by', 'select'].includes(property.type)) { result = property[type] ? property[type].name : null; } else if (['people'].includes(property.type)) { if (Array.isArray(property[type])) { - // tslint:disable-next-line: no-any result = property[type].map((person: any) => person.person?.email || {}); } else { result = property[type]; @@ -545,7 +534,6 @@ function simplifyProperty(property: any) { } } else if (['files'].includes(property.type)) { result = property[type].map( - // tslint:disable-next-line: no-any (file: { type: string; [key: string]: any }) => file[file.type].url, ); } else if (['status'].includes(property.type)) { @@ -554,9 +542,7 @@ function simplifyProperty(property: any) { return result; } -// tslint:disable-next-line: no-any export function simplifyProperties(properties: any) { - // tslint:disable-next-line: no-any const results: any = {}; for (const key of Object.keys(properties)) { results[`${key}`] = simplifyProperty(properties[key]); @@ -564,7 +550,6 @@ export function simplifyProperties(properties: any) { return results; } -// tslint:disable-next-line: no-any export function simplifyObjects(objects: any, download = false, version = 2) { if (!Array.isArray(objects)) { objects = [objects]; @@ -751,7 +736,7 @@ export function getConditions() { } // prettier-ignore -export async function downloadFiles(this: IExecuteFunctions | IPollFunctions, records: [{ properties: { [key: string]: any | { id: string, type: string, files: [{ external: { url: string } } | { file: { url: string } }] } } }]): Promise { // tslint:disable-line:no-any +export async function downloadFiles(this: IExecuteFunctions | IPollFunctions, records: [{ properties: { [key: string]: any | { id: string, type: string, files: [{ external: { url: string } } | { file: { url: string } }] } } }]): Promise { const elements: INodeExecutionData[] = []; for (const record of records) { const element: INodeExecutionData = { json: {}, binary: {} }; @@ -804,7 +789,6 @@ export function extractDatabaseId(database: string) { } } -// tslint:disable-next-line: no-any function prepend(stringKey: string, properties: { [key: string]: any }) { for (const key of Object.keys(properties)) { properties[`${stringKey}_${snakeCase(key)}`] = properties[key]; @@ -813,7 +797,6 @@ function prepend(stringKey: string, properties: { [key: string]: any }) { return properties; } -// tslint:disable-next-line: no-any export function getPropertyTitle(properties: { [key: string]: any }) { return ( Object.values(properties).filter((property) => property.type === 'title')[0].title[0] @@ -934,7 +917,6 @@ export function getSearchFilters(resource: string) { ]; } -// tslint:disable-next-line:no-any export function validateJSON(json: string | undefined): any { let result; try { diff --git a/packages/nodes-base/nodes/Notion/v1/NotionV1.node.ts b/packages/nodes-base/nodes/Notion/v1/NotionV1.node.ts index ce484e605b..752890bc73 100644 --- a/packages/nodes-base/nodes/Notion/v1/NotionV1.node.ts +++ b/packages/nodes-base/nodes/Notion/v1/NotionV1.node.ts @@ -345,7 +345,7 @@ export class NotionV1 implements INodeType { if (operation === 'create') { for (let i = 0; i < length; i++) { const simple = this.getNodeParameter('simple', i) as boolean; - // tslint:disable-next-line: no-any + const body: { [key: string]: any } = { parent: {}, properties: {}, @@ -455,7 +455,7 @@ export class NotionV1 implements INodeType { i, [], ) as IDataObject[]; - // tslint:disable-next-line: no-any + const body: { [key: string]: any } = { properties: {}, }; @@ -513,7 +513,7 @@ export class NotionV1 implements INodeType { if (operation === 'create') { for (let i = 0; i < length; i++) { const simple = this.getNodeParameter('simple', i) as boolean; - // tslint:disable-next-line: no-any + const body: { [key: string]: any } = { parent: {}, properties: {}, diff --git a/packages/nodes-base/nodes/Notion/v2/NotionV2.node.ts b/packages/nodes-base/nodes/Notion/v2/NotionV2.node.ts index 4852827b1d..f1e25b74dd 100644 --- a/packages/nodes-base/nodes/Notion/v2/NotionV2.node.ts +++ b/packages/nodes-base/nodes/Notion/v2/NotionV2.node.ts @@ -430,7 +430,7 @@ export class NotionV2 implements INodeType { for (let i = 0; i < length; i++) { const title = this.getNodeParameter('title', i) as string; const simple = this.getNodeParameter('simple', i) as boolean; - // tslint:disable-next-line: no-any + const body: { [key: string]: any } = { parent: {}, properties: {}, @@ -585,7 +585,7 @@ export class NotionV2 implements INodeType { i, [], ) as IDataObject[]; - // tslint:disable-next-line: no-any + const body: { [key: string]: any } = { properties: {}, }; @@ -664,7 +664,7 @@ export class NotionV2 implements INodeType { if (operation === 'create') { for (let i = 0; i < length; i++) { const simple = this.getNodeParameter('simple', i) as boolean; - // tslint:disable-next-line: no-any + const body: { [key: string]: any } = { parent: {}, properties: {}, diff --git a/packages/nodes-base/nodes/Onfleet/GenericFunctions.ts b/packages/nodes-base/nodes/Onfleet/GenericFunctions.ts index fb4d0c04cd..41254f043e 100644 --- a/packages/nodes-base/nodes/Onfleet/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Onfleet/GenericFunctions.ts @@ -17,12 +17,11 @@ export async function onfleetApiRequest( this: IWebhookFunctions | IHookFunctions | IExecuteFunctions | ILoadOptionsFunctions, method: string, resource: string, - // tslint:disable-next-line:no-any + body: any = {}, - // tslint:disable-next-line:no-any + qs?: any, uri?: string, - // tslint:disable-next-line:no-any ): Promise { const credentials = await this.getCredentials('onfleetApi'); @@ -54,10 +53,9 @@ export async function onfleetApiRequestAllItems( propertyName: string, method: string, endpoint: string, - // tslint:disable-next-line: no-any + body: any = {}, query: IDataObject = {}, - // tslint:disable-next-line:no-any ): Promise { const returnData: IDataObject[] = []; diff --git a/packages/nodes-base/nodes/Onfleet/Onfleet.ts b/packages/nodes-base/nodes/Onfleet/Onfleet.ts index 632a364945..1d74c10ffb 100644 --- a/packages/nodes-base/nodes/Onfleet/Onfleet.ts +++ b/packages/nodes-base/nodes/Onfleet/Onfleet.ts @@ -828,7 +828,7 @@ export class Onfleet { /* Clone a task */ /* -------------------------------------------------------------------------- */ const id = this.getNodeParameter('id', index) as string; - // tslint:disable-next-line: no-any + const taskData = Onfleet.getTaskFields.call(this, index, operation) as any; if (!taskData) { continue; diff --git a/packages/nodes-base/nodes/OpenThesaurus/GenericFunctions.ts b/packages/nodes-base/nodes/OpenThesaurus/GenericFunctions.ts index 21253a5053..6aee380cad 100644 --- a/packages/nodes-base/nodes/OpenThesaurus/GenericFunctions.ts +++ b/packages/nodes-base/nodes/OpenThesaurus/GenericFunctions.ts @@ -13,12 +13,11 @@ export async function openThesaurusApiRequest( this: IHookFunctions | IExecuteFunctions | IExecuteSingleFunctions | ILoadOptionsFunctions, method: string, resource: string, - // tslint:disable-next-line:no-any + body: any = {}, qs: IDataObject = {}, uri?: string, option: IDataObject = {}, - // tslint:disable-next-line:no-any ): Promise { try { let options: OptionsWithUri = { diff --git a/packages/nodes-base/nodes/Orbit/GenericFunctions.ts b/packages/nodes-base/nodes/Orbit/GenericFunctions.ts index f5a5ba79b3..79e7d6575e 100644 --- a/packages/nodes-base/nodes/Orbit/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Orbit/GenericFunctions.ts @@ -15,12 +15,11 @@ export async function orbitApiRequest( this: IHookFunctions | IExecuteFunctions | IExecuteSingleFunctions | ILoadOptionsFunctions, method: string, resource: string, - // tslint:disable-next-line:no-any + body: any = {}, qs: IDataObject = {}, uri?: string, option: IDataObject = {}, - // tslint:disable-next-line:no-any ): Promise { try { const credentials = await this.getCredentials('orbitApi'); @@ -52,10 +51,9 @@ export async function orbitApiRequestAllItems( propertyName: string, method: string, resource: string, - // tslint:disable-next-line:no-any + body: any = {}, query: IDataObject = {}, - // tslint:disable-next-line:no-any ): Promise { const returnData: IDataObject[] = []; diff --git a/packages/nodes-base/nodes/Paddle/GenericFunctions.ts b/packages/nodes-base/nodes/Paddle/GenericFunctions.ts index 1ac516e75c..67fdbc2ea2 100644 --- a/packages/nodes-base/nodes/Paddle/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Paddle/GenericFunctions.ts @@ -19,11 +19,10 @@ export async function paddleApiRequest( | IWebhookFunctions, endpoint: string, method: string, - // tslint:disable-next-line:no-any + body: any = {}, _query?: IDataObject, _uri?: string, - // tslint:disable-next-line:no-any ): Promise { const credentials = await this.getCredentials('paddleApi'); const productionUrl = 'https://vendors.paddle.com/api'; @@ -61,10 +60,9 @@ export async function paddleApiRequestAllItems( propertyName: string, endpoint: string, method: string, - // tslint:disable-next-line:no-any + body: any = {}, query: IDataObject = {}, - // tslint:disable-next-line:no-any ): Promise { const returnData: IDataObject[] = []; @@ -85,7 +83,6 @@ export async function paddleApiRequestAllItems( return returnData; } -// tslint:disable-next-line:no-any export function validateJSON(json: string | undefined): any { let result; try { diff --git a/packages/nodes-base/nodes/PagerDuty/GenericFunctions.ts b/packages/nodes-base/nodes/PagerDuty/GenericFunctions.ts index d6d61b7cd1..3dacbeb2bd 100644 --- a/packages/nodes-base/nodes/PagerDuty/GenericFunctions.ts +++ b/packages/nodes-base/nodes/PagerDuty/GenericFunctions.ts @@ -10,12 +10,11 @@ export async function pagerDutyApiRequest( this: IExecuteFunctions | IWebhookFunctions | IHookFunctions | ILoadOptionsFunctions, method: string, resource: string, - // tslint:disable-next-line:no-any + body: any = {}, query: IDataObject = {}, uri?: string, headers: IDataObject = {}, - // tslint:disable-next-line:no-any ): Promise { const authenticationMethod = this.getNodeParameter('authentication', 0); @@ -62,10 +61,9 @@ export async function pagerDutyApiRequestAllItems( propertyName: string, method: string, endpoint: string, - // tslint:disable-next-line:no-any + body: any = {}, query: IDataObject = {}, - // tslint:disable-next-line:no-any ): Promise { const returnData: IDataObject[] = []; diff --git a/packages/nodes-base/nodes/PayPal/GenericFunctions.ts b/packages/nodes-base/nodes/PayPal/GenericFunctions.ts index b17990f6f4..9a2077a993 100644 --- a/packages/nodes-base/nodes/PayPal/GenericFunctions.ts +++ b/packages/nodes-base/nodes/PayPal/GenericFunctions.ts @@ -20,11 +20,10 @@ export async function payPalApiRequest( | IWebhookFunctions, endpoint: string, method: string, - // tslint:disable-next-line:no-any + body: any = {}, query?: IDataObject, uri?: string, - // tslint:disable-next-line:no-any ): Promise { const credentials = await this.getCredentials('payPalApi'); const env = getEnvironment(credentials.env as string); @@ -63,7 +62,6 @@ async function getAccessToken( | IExecuteSingleFunctions | ILoadOptionsFunctions | IWebhookFunctions, - // tslint:disable-next-line:no-any ): Promise { const credentials = await this.getCredentials('payPalApi'); const env = getEnvironment(credentials!.env as string); @@ -99,11 +97,10 @@ export async function payPalApiRequestAllItems( propertyName: string, endpoint: string, method: string, - // tslint:disable-next-line:no-any + body: any = {}, query?: IDataObject, uri?: string, - // tslint:disable-next-line:no-any ): Promise { const returnData: IDataObject[] = []; @@ -129,7 +126,6 @@ function getNext(links: IDataObject[]): string | undefined { return undefined; } -// tslint:disable-next-line:no-any export function validateJSON(json: string | undefined): any { let result; try { diff --git a/packages/nodes-base/nodes/Peekalink/GenericFunctions.ts b/packages/nodes-base/nodes/Peekalink/GenericFunctions.ts index 2fba88679d..f73d204745 100644 --- a/packages/nodes-base/nodes/Peekalink/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Peekalink/GenericFunctions.ts @@ -13,12 +13,11 @@ export async function peekalinkApiRequest( this: IHookFunctions | IExecuteFunctions | IExecuteSingleFunctions | ILoadOptionsFunctions, method: string, resource: string, - // tslint:disable-next-line:no-any + body: any = {}, qs: IDataObject = {}, uri?: string, option: IDataObject = {}, - // tslint:disable-next-line:no-any ): Promise { try { const credentials = await this.getCredentials('peekalinkApi'); diff --git a/packages/nodes-base/nodes/Phantombuster/GenericFunctions.ts b/packages/nodes-base/nodes/Phantombuster/GenericFunctions.ts index db7215e1a1..5b5abe5f8f 100644 --- a/packages/nodes-base/nodes/Phantombuster/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Phantombuster/GenericFunctions.ts @@ -8,11 +8,10 @@ export async function phantombusterApiRequest( this: IExecuteFunctions | IExecuteSingleFunctions | ILoadOptionsFunctions, method: string, path: string, - // tslint:disable-next-line:no-any + body: any = {}, qs: IDataObject = {}, _option = {}, - // tslint:disable-next-line:no-any ): Promise { const options: OptionsWithUri = { headers: {}, diff --git a/packages/nodes-base/nodes/PhilipsHue/GenericFunctions.ts b/packages/nodes-base/nodes/PhilipsHue/GenericFunctions.ts index 297e39d25a..f1f5cbe891 100644 --- a/packages/nodes-base/nodes/PhilipsHue/GenericFunctions.ts +++ b/packages/nodes-base/nodes/PhilipsHue/GenericFunctions.ts @@ -8,12 +8,11 @@ export async function philipsHueApiRequest( this: IExecuteFunctions | ILoadOptionsFunctions, method: string, resource: string, - // tslint:disable-next-line:no-any + body: any = {}, qs: IDataObject = {}, uri?: string, headers: IDataObject = {}, - // tslint:disable-next-line:no-any ): Promise { const options: OptionsWithUri = { headers: { @@ -48,9 +47,7 @@ export async function philipsHueApiRequest( } } -export async function getUser( - this: IExecuteFunctions | ILoadOptionsFunctions, // tslint:disable-next-line:no-any -): Promise { +export async function getUser(this: IExecuteFunctions | ILoadOptionsFunctions): Promise { const { whitelist } = await philipsHueApiRequest.call(this, 'GET', '/api/0/config', {}, {}); //check if there is a n8n user for (const user of Object.keys(whitelist)) { diff --git a/packages/nodes-base/nodes/Pipedrive/GenericFunctions.ts b/packages/nodes-base/nodes/Pipedrive/GenericFunctions.ts index 99e836bf15..f0e1722266 100644 --- a/packages/nodes-base/nodes/Pipedrive/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Pipedrive/GenericFunctions.ts @@ -30,7 +30,6 @@ export async function pipedriveApiRequest( query: IDataObject = {}, formData?: IDataObject, downloadFile?: boolean, - // tslint:disable-next-line:no-any ): Promise { const authenticationMethod = this.getNodeParameter('authentication', 0); @@ -101,7 +100,6 @@ export async function pipedriveApiRequestAllItems( endpoint: string, body: IDataObject, query?: IDataObject, - // tslint:disable-next-line:no-any ): Promise { if (query === undefined) { query = {}; diff --git a/packages/nodes-base/nodes/PostHog/GenericFunctions.ts b/packages/nodes-base/nodes/PostHog/GenericFunctions.ts index 72de1695cc..fe0de09a77 100644 --- a/packages/nodes-base/nodes/PostHog/GenericFunctions.ts +++ b/packages/nodes-base/nodes/PostHog/GenericFunctions.ts @@ -8,11 +8,10 @@ export async function posthogApiRequest( this: IExecuteFunctions | ILoadOptionsFunctions, method: string, path: string, - // tslint:disable-next-line:no-any + body: any = {}, qs: IDataObject = {}, _option = {}, - // tslint:disable-next-line:no-any ): Promise { const credentials = await this.getCredentials('postHogApi'); @@ -43,14 +42,14 @@ export async function posthogApiRequest( export interface IEvent { event: string; - properties: { [key: string]: any }; // tslint:disable-line:no-any + properties: { [key: string]: any }; } export interface IAlias { type: string; event: string; - properties: { [key: string]: any }; // tslint:disable-line:no-any - context: { [key: string]: any }; // tslint:disable-line:no-any + properties: { [key: string]: any }; + context: { [key: string]: any }; } export interface ITrack { @@ -60,13 +59,13 @@ export interface ITrack { messageId?: string; distinct_id: string; category?: string; - properties: { [key: string]: any }; // tslint:disable-line:no-any - context: { [key: string]: any }; // tslint:disable-line:no-any + properties: { [key: string]: any }; + context: { [key: string]: any }; } export interface IIdentity { event: string; messageId?: string; distinct_id: string; - properties: { [key: string]: any }; // tslint:disable-line:no-any + properties: { [key: string]: any }; } diff --git a/packages/nodes-base/nodes/Postmark/GenericFunctions.ts b/packages/nodes-base/nodes/Postmark/GenericFunctions.ts index a45ceeb979..fb041bf81a 100644 --- a/packages/nodes-base/nodes/Postmark/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Postmark/GenericFunctions.ts @@ -8,10 +8,9 @@ export async function postmarkApiRequest( this: IExecuteFunctions | IWebhookFunctions | IHookFunctions | ILoadOptionsFunctions, method: string, endpoint: string, - // tslint:disable-next-line:no-any + body: any = {}, option: IDataObject = {}, - // tslint:disable-next-line:no-any ): Promise { let options: OptionsWithUri = { headers: { @@ -35,7 +34,6 @@ export async function postmarkApiRequest( } } -// tslint:disable-next-line: no-any export function convertTriggerObjectToStringArray(webhookObject: any): string[] { const triggers = webhookObject.Triggers; const webhookEvents: string[] = []; diff --git a/packages/nodes-base/nodes/Postmark/PostmarkTrigger.node.ts b/packages/nodes-base/nodes/Postmark/PostmarkTrigger.node.ts index 7d49c8ba6a..346a74bfc7 100644 --- a/packages/nodes-base/nodes/Postmark/PostmarkTrigger.node.ts +++ b/packages/nodes-base/nodes/Postmark/PostmarkTrigger.node.ts @@ -154,7 +154,6 @@ export class PostmarkTrigger implements INodeType { const endpoint = `/webhooks`; - // tslint:disable-next-line: no-any const body: any = { Url: webhookUrl, Triggers: { diff --git a/packages/nodes-base/nodes/ProfitWell/GenericFunctions.ts b/packages/nodes-base/nodes/ProfitWell/GenericFunctions.ts index 7ff64f102f..a81183092c 100644 --- a/packages/nodes-base/nodes/ProfitWell/GenericFunctions.ts +++ b/packages/nodes-base/nodes/ProfitWell/GenericFunctions.ts @@ -13,12 +13,11 @@ export async function profitWellApiRequest( this: IHookFunctions | IExecuteFunctions | IExecuteSingleFunctions | ILoadOptionsFunctions, method: string, resource: string, - // tslint:disable-next-line:no-any + body: any = {}, qs: IDataObject = {}, uri?: string, option: IDataObject = {}, - // tslint:disable-next-line:no-any ): Promise { try { const credentials = await this.getCredentials('profitWellApi'); diff --git a/packages/nodes-base/nodes/Pushbullet/GenericFunctions.ts b/packages/nodes-base/nodes/Pushbullet/GenericFunctions.ts index 2f075bf895..5dc7a7dcc4 100644 --- a/packages/nodes-base/nodes/Pushbullet/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Pushbullet/GenericFunctions.ts @@ -8,12 +8,11 @@ export async function pushbulletApiRequest( this: IExecuteFunctions | ILoadOptionsFunctions, method: string, path: string, - // tslint:disable-next-line:no-any + body: any = {}, qs: IDataObject = {}, uri?: string | undefined, option = {}, - // tslint:disable-next-line:no-any ): Promise { const options: OptionsWithUri = { method, @@ -41,10 +40,9 @@ export async function pushbulletApiRequestAllItems( propertyName: string, method: string, endpoint: string, - // tslint:disable-next-line:no-any + body: any = {}, query: IDataObject = {}, - // tslint:disable-next-line:no-any ): Promise { const returnData: IDataObject[] = []; diff --git a/packages/nodes-base/nodes/Pushcut/GenericFunctions.ts b/packages/nodes-base/nodes/Pushcut/GenericFunctions.ts index b3830146ff..b29003d7e7 100644 --- a/packages/nodes-base/nodes/Pushcut/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Pushcut/GenericFunctions.ts @@ -8,12 +8,11 @@ export async function pushcutApiRequest( this: IExecuteFunctions | ILoadOptionsFunctions | IHookFunctions, method: string, path: string, - // tslint:disable-next-line:no-any + body: any = {}, qs: IDataObject = {}, uri?: string | undefined, option = {}, - // tslint:disable-next-line:no-any ): Promise { const credentials = await this.getCredentials('pushcutApi'); diff --git a/packages/nodes-base/nodes/Pushover/GenericFunctions.ts b/packages/nodes-base/nodes/Pushover/GenericFunctions.ts index 87e49a9ef5..69d2007fc6 100644 --- a/packages/nodes-base/nodes/Pushover/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Pushover/GenericFunctions.ts @@ -6,11 +6,10 @@ export async function pushoverApiRequest( this: IExecuteFunctions | IExecuteSingleFunctions | ILoadOptionsFunctions, method: IHttpRequestMethods, path: string, - // tslint:disable-next-line:no-any + body: any = {}, qs: IDataObject = {}, _option = {}, - // tslint:disable-next-line:no-any ): Promise { const options: IHttpRequestOptions = { headers: { diff --git a/packages/nodes-base/nodes/QuickBase/GenericFunctions.ts b/packages/nodes-base/nodes/QuickBase/GenericFunctions.ts index d4aa1ac6bb..14241386e8 100644 --- a/packages/nodes-base/nodes/QuickBase/GenericFunctions.ts +++ b/packages/nodes-base/nodes/QuickBase/GenericFunctions.ts @@ -13,11 +13,10 @@ export async function quickbaseApiRequest( this: IExecuteFunctions | ILoadOptionsFunctions | IHookFunctions | IWebhookFunctions, method: string, resource: string, - // tslint:disable-next-line:no-any + body: any = {}, qs: IDataObject = {}, option: IDataObject = {}, - // tslint:disable-next-line:no-any ): Promise { const credentials = await this.getCredentials('quickbaseApi'); @@ -64,7 +63,7 @@ export async function quickbaseApiRequest( //@ts-ignore // prettier-ignore -export async function getFieldsObject(this: IHookFunctions | ILoadOptionsFunctions | IExecuteFunctions, tableId: string): any { // tslint:disable-line:no-any +export async function getFieldsObject(this: IHookFunctions | ILoadOptionsFunctions | IExecuteFunctions, tableId: string): any { const fieldsLabelKey: { [key: string]: number } = {}; const fieldsIdKey: { [key: number]: string } = {}; const data = await quickbaseApiRequest.call(this, 'GET', '/fields', {}, { tableId }); @@ -79,10 +78,9 @@ export async function quickbaseApiRequestAllItems( this: IHookFunctions | ILoadOptionsFunctions | IExecuteFunctions, method: string, resource: string, - // tslint:disable-next-line:no-any + body: any = {}, query: IDataObject = {}, - // tslint:disable-next-line:no-any ): Promise { const returnData: IDataObject[] = []; diff --git a/packages/nodes-base/nodes/QuickBooks/GenericFunctions.ts b/packages/nodes-base/nodes/QuickBooks/GenericFunctions.ts index 6572ba2f7c..dc96de00ba 100644 --- a/packages/nodes-base/nodes/QuickBooks/GenericFunctions.ts +++ b/packages/nodes-base/nodes/QuickBooks/GenericFunctions.ts @@ -28,7 +28,6 @@ export async function quickBooksApiRequest( qs: IDataObject, body: IDataObject, option: IDataObject = {}, - // tslint:disable-next-line:no-any ): Promise { const resource = this.getNodeParameter('resource', 0) as string; const operation = this.getNodeParameter('operation', 0) as string; @@ -101,7 +100,6 @@ export async function quickBooksApiRequestAllItems( qs: IDataObject, body: IDataObject, resource: string, - // tslint:disable-next-line:no-any ): Promise { let responseData; let startPosition = 1; @@ -141,7 +139,6 @@ async function getCount( method: string, endpoint: string, qs: IDataObject, - // tslint:disable-next-line:no-any ): Promise { const responseData = await quickBooksApiRequest.call(this, method, endpoint, qs, {}); @@ -156,7 +153,6 @@ export async function handleListing( i: number, endpoint: string, resource: string, - // tslint:disable-next-line:no-any ): Promise { let responseData; diff --git a/packages/nodes-base/nodes/Reddit/GenericFunctions.ts b/packages/nodes-base/nodes/Reddit/GenericFunctions.ts index c1ce273193..9bae3c14f4 100644 --- a/packages/nodes-base/nodes/Reddit/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Reddit/GenericFunctions.ts @@ -12,7 +12,6 @@ export async function redditApiRequest( method: string, endpoint: string, qs: IDataObject, - // tslint:disable-next-line:no-any ): Promise { const resource = this.getNodeParameter('resource', 0) as string; @@ -59,7 +58,6 @@ export async function redditApiRequestAllItems( method: string, endpoint: string, qs: IDataObject, - // tslint:disable-next-line:no-any ): Promise { let responseData; const returnData: IDataObject[] = []; @@ -77,11 +75,11 @@ export async function redditApiRequestAllItems( } if (endpoint === 'api/search_subreddits.json') { - responseData.subreddits.forEach((child: any) => returnData.push(child)); // tslint:disable-line:no-any + responseData.subreddits.forEach((child: any) => returnData.push(child)); } else if (resource === 'postComment' && operation === 'getAll') { - responseData[1].data.children.forEach((child: any) => returnData.push(child.data)); // tslint:disable-line:no-any + responseData[1].data.children.forEach((child: any) => returnData.push(child.data)); } else { - responseData.data.children.forEach((child: any) => returnData.push(child.data)); // tslint:disable-line:no-any + responseData.data.children.forEach((child: any) => returnData.push(child.data)); } if (qs.limit && returnData.length >= qs.limit && returnAll === false) { return returnData; @@ -100,7 +98,6 @@ export async function handleListing( endpoint: string, qs: IDataObject = {}, requestMethod: 'GET' | 'POST' = 'GET', - // tslint:disable-next-line:no-any ): Promise { let responseData; diff --git a/packages/nodes-base/nodes/Redis/Redis.node.ts b/packages/nodes-base/nodes/Redis/Redis.node.ts index 044ab968d1..6c259e378f 100644 --- a/packages/nodes-base/nodes/Redis/Redis.node.ts +++ b/packages/nodes-base/nodes/Redis/Redis.node.ts @@ -512,7 +512,7 @@ export class Redis implements INodeType { } try { const client = await redis.createClient(redisOptions); - // tslint:disable-next-line: no-any + const _data = await new Promise((resolve, reject): any => { client.on('connect', async () => { client.ping('ping', (error, pong) => { diff --git a/packages/nodes-base/nodes/RenameKeys/RenameKeys.node.ts b/packages/nodes-base/nodes/RenameKeys/RenameKeys.node.ts index 152ade565e..e8ed50d60b 100644 --- a/packages/nodes-base/nodes/RenameKeys/RenameKeys.node.ts +++ b/packages/nodes-base/nodes/RenameKeys/RenameKeys.node.ts @@ -156,7 +156,7 @@ export class RenameKeys implements INodeType { let item: INodeExecutionData; let newItem: INodeExecutionData; let renameKeys: IRenameKey[]; - let value: any; // tslint:disable-line:no-any + let value: any; for (let itemIndex = 0; itemIndex < items.length; itemIndex++) { renameKeys = this.getNodeParameter('keys.key', itemIndex, []) as IRenameKey[]; diff --git a/packages/nodes-base/nodes/Rocketchat/GenericFunctions.ts b/packages/nodes-base/nodes/Rocketchat/GenericFunctions.ts index bd619c23c6..28d324fe9d 100644 --- a/packages/nodes-base/nodes/Rocketchat/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Rocketchat/GenericFunctions.ts @@ -7,10 +7,9 @@ export async function rocketchatApiRequest( resource: string, method: string, operation: string, - // tslint:disable-next-line:no-any + body: any = {}, headers?: object, - // tslint:disable-next-line:no-any ): Promise { const credentials = await this.getCredentials('rocketchatApi'); @@ -27,7 +26,6 @@ export async function rocketchatApiRequest( return this.helpers.requestWithAuthentication.call(this, 'rocketchatApi', options); } -// tslint:disable-next-line:no-any export function validateJSON(json: string | undefined): any { let result; try { diff --git a/packages/nodes-base/nodes/S3/GenericFunctions.ts b/packages/nodes-base/nodes/S3/GenericFunctions.ts index e0f9cfbefb..21f105d160 100644 --- a/packages/nodes-base/nodes/S3/GenericFunctions.ts +++ b/packages/nodes-base/nodes/S3/GenericFunctions.ts @@ -27,7 +27,6 @@ export async function s3ApiRequest( headers?: object, option: IDataObject = {}, region?: string, - // tslint:disable-next-line:no-any ): Promise { let credentials; @@ -101,7 +100,6 @@ export async function s3ApiRequestREST( headers?: object, options: IDataObject = {}, region?: string, - // tslint:disable-next-line:no-any ): Promise { const response = await s3ApiRequest.call( this, @@ -131,7 +129,6 @@ export async function s3ApiRequestSOAP( headers?: object, option: IDataObject = {}, region?: string, - // tslint:disable-next-line:no-any ): Promise { const response = await s3ApiRequest.call( this, @@ -169,7 +166,6 @@ export async function s3ApiRequestSOAPAllItems( headers: IDataObject = {}, option: IDataObject = {}, region?: string, - // tslint:disable-next-line:no-any ): Promise { const returnData: IDataObject[] = []; diff --git a/packages/nodes-base/nodes/Salesforce/AccountInterface.ts b/packages/nodes-base/nodes/Salesforce/AccountInterface.ts index a1c6d037ef..25d64573a0 100644 --- a/packages/nodes-base/nodes/Salesforce/AccountInterface.ts +++ b/packages/nodes-base/nodes/Salesforce/AccountInterface.ts @@ -1,5 +1,4 @@ export interface IAccount { - // tslint:disable-next-line: no-any [key: string]: any; Name?: string; Fax?: string; diff --git a/packages/nodes-base/nodes/Salesforce/ContactInterface.ts b/packages/nodes-base/nodes/Salesforce/ContactInterface.ts index bb02d3b9de..cc7d3f7fcf 100644 --- a/packages/nodes-base/nodes/Salesforce/ContactInterface.ts +++ b/packages/nodes-base/nodes/Salesforce/ContactInterface.ts @@ -1,5 +1,4 @@ export interface IContact { - // tslint:disable-next-line: no-any [key: string]: any; LastName?: string; Fax?: string; diff --git a/packages/nodes-base/nodes/Salesforce/GenericFunctions.ts b/packages/nodes-base/nodes/Salesforce/GenericFunctions.ts index 5560ff073e..f9191d52f8 100644 --- a/packages/nodes-base/nodes/Salesforce/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Salesforce/GenericFunctions.ts @@ -14,12 +14,11 @@ export async function salesforceApiRequest( this: IExecuteFunctions | IExecuteSingleFunctions | ILoadOptionsFunctions, method: string, endpoint: string, - // tslint:disable-next-line:no-any + body: any = {}, qs: IDataObject = {}, uri?: string, option: IDataObject = {}, - // tslint:disable-next-line:no-any ): Promise { const authenticationMethod = this.getNodeParameter('authentication', 0, 'oAuth2') as string; try { @@ -75,10 +74,9 @@ export async function salesforceApiRequestAllItems( propertyName: string, method: string, endpoint: string, - // tslint:disable-next-line:no-any + body: any = {}, query: IDataObject = {}, - // tslint:disable-next-line:no-any ): Promise { const returnData: IDataObject[] = []; @@ -114,12 +112,11 @@ function getOptions( this: IExecuteFunctions | IExecuteSingleFunctions | ILoadOptionsFunctions, method: string, endpoint: string, - // tslint:disable-next-line:no-any + body: any, qs: IDataObject, instanceUrl: string, ): OptionsWithUri { - // tslint:disable-line:no-any const options: OptionsWithUri = { headers: { 'Content-Type': 'application/json', @@ -237,7 +234,6 @@ export function getQuery(options: IDataObject, sobject: string, returnAll: boole return query; } -// tslint:disable-next-line:no-any export function getValue(value: any) { if (moment(value).isValid()) { return value; diff --git a/packages/nodes-base/nodes/Salesforce/LeadInterface.ts b/packages/nodes-base/nodes/Salesforce/LeadInterface.ts index 21fa13ffca..35434e099a 100644 --- a/packages/nodes-base/nodes/Salesforce/LeadInterface.ts +++ b/packages/nodes-base/nodes/Salesforce/LeadInterface.ts @@ -1,5 +1,4 @@ export interface ILead { - // tslint:disable-next-line: no-any [key: string]: any; Company?: string; LastName?: string; diff --git a/packages/nodes-base/nodes/Salesforce/OpportunityInterface.ts b/packages/nodes-base/nodes/Salesforce/OpportunityInterface.ts index 011068fa62..a510d75c59 100644 --- a/packages/nodes-base/nodes/Salesforce/OpportunityInterface.ts +++ b/packages/nodes-base/nodes/Salesforce/OpportunityInterface.ts @@ -1,5 +1,4 @@ export interface IOpportunity { - // tslint:disable-next-line: no-any [key: string]: any; Name?: string; StageName?: string; diff --git a/packages/nodes-base/nodes/Salesmate/GenericFunctions.ts b/packages/nodes-base/nodes/Salesmate/GenericFunctions.ts index 3b2231ed5b..2747b73eb4 100644 --- a/packages/nodes-base/nodes/Salesmate/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Salesmate/GenericFunctions.ts @@ -17,12 +17,11 @@ export async function salesmateApiRequest( | IWebhookFunctions, method: string, resource: string, - // tslint:disable-next-line:no-any + body: any = {}, qs: IDataObject = {}, uri?: string, _option: IDataObject = {}, - // tslint:disable-next-line:no-any ): Promise { const credentials = await this.getCredentials('salesmateApi'); @@ -53,10 +52,9 @@ export async function salesmateApiRequestAllItems( propertyName: string, method: string, resource: string, - // tslint:disable-next-line:no-any + body: any = {}, query: IDataObject = {}, - // tslint:disable-next-line:no-any ): Promise { const returnData: IDataObject[] = []; @@ -75,7 +73,6 @@ export async function salesmateApiRequestAllItems( return returnData; } -// tslint:disable-next-line:no-any export function validateJSON(json: string | undefined): any { let result; try { diff --git a/packages/nodes-base/nodes/SeaTable/GenericFunctions.ts b/packages/nodes-base/nodes/SeaTable/GenericFunctions.ts index be6f1a1617..9e7e90a00b 100644 --- a/packages/nodes-base/nodes/SeaTable/GenericFunctions.ts +++ b/packages/nodes-base/nodes/SeaTable/GenericFunctions.ts @@ -30,12 +30,11 @@ export async function seaTableApiRequest( ctx: ICtx, method: string, endpoint: string, - // tslint:disable-next-line:no-any + body: any = {}, qs: IDataObject = {}, url: string | undefined = undefined, option: IDataObject = {}, - // tslint:disable-next-line:no-any ): Promise { const credentials = await this.getCredentials('seaTableApi'); @@ -78,7 +77,6 @@ export async function setableApiRequestAllItems( endpoint: string, body: IDataObject, query?: IDataObject, - // tslint:disable-next-line:no-any ): Promise { if (query === undefined) { query = {}; diff --git a/packages/nodes-base/nodes/SecurityScorecard/GenericFunctions.ts b/packages/nodes-base/nodes/SecurityScorecard/GenericFunctions.ts index 89a83223a8..7e9692aa53 100644 --- a/packages/nodes-base/nodes/SecurityScorecard/GenericFunctions.ts +++ b/packages/nodes-base/nodes/SecurityScorecard/GenericFunctions.ts @@ -8,12 +8,11 @@ export async function scorecardApiRequest( this: IHookFunctions | IExecuteFunctions | ILoadOptionsFunctions, method: string, resource: string, - // tslint:disable-next-line:no-any + body: any = {}, query: IDataObject = {}, uri?: string, option: IDataObject = {}, - // tslint:disable-next-line:no-any ): Promise { const credentials = await this.getCredentials('securityScorecardApi'); diff --git a/packages/nodes-base/nodes/Segment/GenericFunctions.ts b/packages/nodes-base/nodes/Segment/GenericFunctions.ts index abace3af3e..1ef2b7600c 100644 --- a/packages/nodes-base/nodes/Segment/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Segment/GenericFunctions.ts @@ -17,11 +17,10 @@ export async function segmentApiRequest( | IWebhookFunctions, method: string, resource: string, - body: any = {}, // tslint:disable-line:no-any + body: any = {}, qs: IDataObject = {}, uri?: string, _option: IDataObject = {}, - // tslint:disable-next-line:no-any ): Promise { const options: OptionsWithUri = { headers: { diff --git a/packages/nodes-base/nodes/SendGrid/GenericFunctions.ts b/packages/nodes-base/nodes/SendGrid/GenericFunctions.ts index d363c52c29..48979802c3 100644 --- a/packages/nodes-base/nodes/SendGrid/GenericFunctions.ts +++ b/packages/nodes-base/nodes/SendGrid/GenericFunctions.ts @@ -13,11 +13,10 @@ export async function sendGridApiRequest( this: IHookFunctions | IExecuteFunctions | IExecuteSingleFunctions | ILoadOptionsFunctions, endpoint: string, method: string, - // tslint:disable-next-line:no-any + body: any = {}, qs: IDataObject = {}, option: IDataObject = {}, - // tslint:disable-next-line:no-any ): Promise { const host = 'api.sendgrid.com/v3'; @@ -45,10 +44,9 @@ export async function sendGridApiRequestAllItems( endpoint: string, method: string, propertyName: string, - // tslint:disable-next-line:no-any + body: any = {}, query: IDataObject = {}, - // tslint:disable-next-line:no-any ): Promise { const returnData: IDataObject[] = []; diff --git a/packages/nodes-base/nodes/Sendy/GenericFunctions.ts b/packages/nodes-base/nodes/Sendy/GenericFunctions.ts index 15df82202f..e3a2b0f99c 100644 --- a/packages/nodes-base/nodes/Sendy/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Sendy/GenericFunctions.ts @@ -8,11 +8,10 @@ export async function sendyApiRequest( this: IExecuteFunctions | ILoadOptionsFunctions, method: string, path: string, - // tslint:disable-next-line:no-any + body: any = {}, qs: IDataObject = {}, _option = {}, - // tslint:disable-next-line:no-any ): Promise { const credentials = await this.getCredentials('sendyApi'); diff --git a/packages/nodes-base/nodes/SentryIo/GenericFunctions.ts b/packages/nodes-base/nodes/SentryIo/GenericFunctions.ts index 975010e22a..a54ecdd03e 100644 --- a/packages/nodes-base/nodes/SentryIo/GenericFunctions.ts +++ b/packages/nodes-base/nodes/SentryIo/GenericFunctions.ts @@ -19,12 +19,11 @@ export async function sentryIoApiRequest( | IWebhookFunctions, method: string, resource: string, - // tslint:disable-next-line:no-any + body: any = {}, qs: IDataObject = {}, uri?: string, option: IDataObject = {}, - // tslint:disable-next-line:no-any ): Promise { const authentication = this.getNodeParameter('authentication', 0); @@ -84,10 +83,9 @@ export async function sentryApiRequestAllItems( this: IHookFunctions | IExecuteFunctions | ILoadOptionsFunctions, method: string, resource: string, - // tslint:disable-next-line:no-any + body: any = {}, query: IDataObject = {}, - // tslint:disable-next-line:no-any ): Promise { const returnData: IDataObject[] = []; diff --git a/packages/nodes-base/nodes/SentryIo/SentryIo.node.ts b/packages/nodes-base/nodes/SentryIo/SentryIo.node.ts index 4dc545f6fe..942eaaa7eb 100644 --- a/packages/nodes-base/nodes/SentryIo/SentryIo.node.ts +++ b/packages/nodes-base/nodes/SentryIo/SentryIo.node.ts @@ -569,7 +569,7 @@ export class SentryIo implements INodeType { if (additionalFields.commits) { const commits: ICommit[] = []; //@ts-ignore - // tslint:disable-next-line: no-any + additionalFields.commits.commitProperties.map((commit: any) => { const commitObject: ICommit = { id: commit.id }; @@ -623,7 +623,7 @@ export class SentryIo implements INodeType { if (updateFields.commits) { const commits: ICommit[] = []; //@ts-ignore - // tslint:disable-next-line: no-any + updateFields.commits.commitProperties.map((commit: any) => { const commitObject: ICommit = { id: commit.id }; diff --git a/packages/nodes-base/nodes/ServiceNow/GenericFunctions.ts b/packages/nodes-base/nodes/ServiceNow/GenericFunctions.ts index 7a30f18313..12329a7878 100644 --- a/packages/nodes-base/nodes/ServiceNow/GenericFunctions.ts +++ b/packages/nodes-base/nodes/ServiceNow/GenericFunctions.ts @@ -8,12 +8,11 @@ export async function serviceNowApiRequest( this: IExecuteFunctions | ILoadOptionsFunctions, method: string, resource: string, - // tslint:disable-next-line:no-any + body: any = {}, qs: IDataObject = {}, uri?: string, option: IDataObject = {}, - // tslint:disable-next-line:no-any ): Promise { const headers = {} as IDataObject; const authenticationMethod = this.getNodeParameter('authentication', 0, 'oAuth2') as string; @@ -59,10 +58,9 @@ export async function serviceNowRequestAllItems( this: IExecuteFunctions | ILoadOptionsFunctions, method: string, resource: string, - // tslint:disable-next-line:no-any + body: any = {}, query: IDataObject = {}, - // tslint:disable-next-line:no-any ): Promise { const returnData: IDataObject[] = []; let responseData; diff --git a/packages/nodes-base/nodes/Shopify/GenericFunctions.ts b/packages/nodes-base/nodes/Shopify/GenericFunctions.ts index e891f8bd1d..d839bf65de 100644 --- a/packages/nodes-base/nodes/Shopify/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Shopify/GenericFunctions.ts @@ -15,12 +15,11 @@ export async function shopifyApiRequest( this: IHookFunctions | IExecuteFunctions | IExecuteSingleFunctions | ILoadOptionsFunctions, method: string, resource: string, - // tslint:disable-next-line:no-any + body: any = {}, query: IDataObject = {}, uri?: string, option: IDataObject = {}, - // tslint:disable-next-line:no-any ): Promise { const authenticationMethod = this.getNodeParameter('authentication', 0, 'oAuth2') as string; @@ -76,10 +75,9 @@ export async function shopifyApiRequestAllItems( propertyName: string, method: string, resource: string, - // tslint:disable-next-line:no-any + body: any = {}, query: IDataObject = {}, - // tslint:disable-next-line:no-any ): Promise { const returnData: IDataObject[] = []; diff --git a/packages/nodes-base/nodes/Signl4/GenericFunctions.ts b/packages/nodes-base/nodes/Signl4/GenericFunctions.ts index 06eca2f9aa..8f6816f3f6 100644 --- a/packages/nodes-base/nodes/Signl4/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Signl4/GenericFunctions.ts @@ -17,7 +17,6 @@ export async function SIGNL4ApiRequest( body: string, query: IDataObject = {}, option: IDataObject = {}, - // tslint:disable-next-line:no-any ): Promise { const credentials = await this.getCredentials('signl4Api'); diff --git a/packages/nodes-base/nodes/Slack/GenericFunctions.ts b/packages/nodes-base/nodes/Slack/GenericFunctions.ts index d6ae5b7e82..e96409c344 100644 --- a/packages/nodes-base/nodes/Slack/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Slack/GenericFunctions.ts @@ -20,7 +20,6 @@ export async function slackApiRequest( query: object = {}, headers: {} | undefined = undefined, option: {} = {}, - // tslint:disable-next-line:no-any ): Promise { const authenticationMethod = this.getNodeParameter('authentication', 0, 'accessToken') as string; let options: OptionsWithUri = { @@ -47,7 +46,7 @@ export async function slackApiRequest( }; try { - let response: any; // tslint:disable-line:no-any + let response: any; const credentialType = authenticationMethod === 'accessToken' ? 'slackApi' : 'slackOAuth2Api'; response = await this.helpers.requestWithAuthentication.call(this, credentialType, options, { oauth2: oAuth2Options, @@ -84,10 +83,9 @@ export async function slackApiRequestAllItems( propertyName: string, method: string, endpoint: string, - // tslint:disable-next-line:no-any + body: any = {}, query: IDataObject = {}, - // tslint:disable-next-line:no-any ): Promise { const returnData: IDataObject[] = []; let responseData; @@ -118,7 +116,6 @@ export async function slackApiRequestAllItems( return returnData; } -// tslint:disable-next-line:no-any export function validateJSON(json: string | undefined): any { let result; try { diff --git a/packages/nodes-base/nodes/Sms77/GenericFunctions.ts b/packages/nodes-base/nodes/Sms77/GenericFunctions.ts index cb73b4af04..b13fc895c7 100644 --- a/packages/nodes-base/nodes/Sms77/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Sms77/GenericFunctions.ts @@ -16,7 +16,6 @@ export async function sms77ApiRequest( endpoint: string, body: IDataObject, qs: IDataObject = {}, - // tslint:disable-next-line:no-any ): Promise { const options: OptionsWithUri = { headers: { diff --git a/packages/nodes-base/nodes/Spontit/GenericFunctions.ts b/packages/nodes-base/nodes/Spontit/GenericFunctions.ts index 5c431b2955..d12969c045 100644 --- a/packages/nodes-base/nodes/Spontit/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Spontit/GenericFunctions.ts @@ -13,10 +13,9 @@ export async function spontitApiRequest( this: IExecuteFunctions | ILoadOptionsFunctions | IHookFunctions | IWebhookFunctions, method: string, resource: string, - // tslint:disable-next-line:no-any + body: any = {}, qs: IDataObject = {}, - // tslint:disable-next-line:no-any ): Promise { const credentials = await this.getCredentials('spontitApi'); diff --git a/packages/nodes-base/nodes/Spotify/GenericFunctions.ts b/packages/nodes-base/nodes/Spotify/GenericFunctions.ts index 20655a9410..fb4a26a8d0 100644 --- a/packages/nodes-base/nodes/Spotify/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Spotify/GenericFunctions.ts @@ -17,7 +17,6 @@ export async function spotifyApiRequest( body: object, query?: object, uri?: string, - // tslint:disable-next-line:no-any ): Promise { const options: OptionsWithUri = { method, @@ -48,7 +47,6 @@ export async function spotifyApiRequestAllItems( endpoint: string, body: object, query?: object, - // tslint:disable-next-line:no-any ): Promise { const returnData: IDataObject[] = []; diff --git a/packages/nodes-base/nodes/SseTrigger/SseTrigger.node.ts b/packages/nodes-base/nodes/SseTrigger/SseTrigger.node.ts index 8478bc7c0e..c164d38e36 100644 --- a/packages/nodes-base/nodes/SseTrigger/SseTrigger.node.ts +++ b/packages/nodes-base/nodes/SseTrigger/SseTrigger.node.ts @@ -37,7 +37,6 @@ export class SseTrigger implements INodeType { const eventSource = new EventSource(url); eventSource.onmessage = (event) => { - // tslint:disable-next-line:no-any const eventData = jsonParse(event.data, { errorMessage: 'Invalid JSON for event data' }); this.emit([this.helpers.returnJsonArray([eventData])]); }; diff --git a/packages/nodes-base/nodes/Ssh/Ssh.node.ts b/packages/nodes-base/nodes/Ssh/Ssh.node.ts index d7ca1e7151..661bc1fb3a 100644 --- a/packages/nodes-base/nodes/Ssh/Ssh.node.ts +++ b/packages/nodes-base/nodes/Ssh/Ssh.node.ts @@ -277,7 +277,7 @@ export class Ssh implements INodeType { username: credentials.username as string, port: credentials.port as number, privateKey: path, - } as any; // tslint:disable-line: no-any + } as any; if (credentials.passphrase) { options.passphrase = credentials.passphrase as string; diff --git a/packages/nodes-base/nodes/Stackby/GenericFunction.ts b/packages/nodes-base/nodes/Stackby/GenericFunction.ts index bb15a4e9ef..6f0b8b493a 100644 --- a/packages/nodes-base/nodes/Stackby/GenericFunction.ts +++ b/packages/nodes-base/nodes/Stackby/GenericFunction.ts @@ -16,7 +16,6 @@ export async function apiRequest( query?: IDataObject, uri?: string, option: IDataObject = {}, - // tslint:disable-next-line:no-any ): Promise { const credentials = await this.getCredentials('stackbyApi'); @@ -59,7 +58,6 @@ export async function apiRequestAllItems( endpoint: string, body: IDataObject = {}, query: IDataObject = {}, - // tslint:disable-next-line:no-any ): Promise { query.maxrecord = 100; diff --git a/packages/nodes-base/nodes/Stackby/Stackby.node.ts b/packages/nodes-base/nodes/Stackby/Stackby.node.ts index 171258bb09..67a46dc023 100644 --- a/packages/nodes-base/nodes/Stackby/Stackby.node.ts +++ b/packages/nodes-base/nodes/Stackby/Stackby.node.ts @@ -188,7 +188,7 @@ export class Stackby implements INodeType { responseData = await apiRequest.call(this, 'GET', `/rowlist/${stackId}/${table}`, {}, qs); returnData.push.apply( returnData, - // tslint:disable-next-line:no-any + responseData.map((data: any) => data.field), ); } catch (error) { @@ -251,7 +251,6 @@ export class Stackby implements INodeType { const columns = this.getNodeParameter('columns', i) as string; const columnList = columns.split(',').map((column) => column.trim()); - // tslint:disable-next-line: no-any const record: { [key: string]: any } = {}; for (const column of columnList) { if (items[i].json[column] === undefined) { @@ -280,7 +279,7 @@ export class Stackby implements INodeType { returnData.push.apply( returnData, - // tslint:disable-next-line:no-any + responseData.map((data: any) => data.field), ); } catch (error) { @@ -330,7 +329,7 @@ export class Stackby implements INodeType { returnData.push.apply( returnData, - // tslint:disable-next-line:no-any + responseData.map((data: any) => data.field), ); } catch (error) { diff --git a/packages/nodes-base/nodes/StopAndError/StopAndError.node.ts b/packages/nodes-base/nodes/StopAndError/StopAndError.node.ts index e04d2d0b09..3e24398754 100644 --- a/packages/nodes-base/nodes/StopAndError/StopAndError.node.ts +++ b/packages/nodes-base/nodes/StopAndError/StopAndError.node.ts @@ -92,7 +92,7 @@ export class StopAndError implements INodeType { toThrow = this.getNodeParameter('errorMessage', 0) as string; } else { const json = this.getNodeParameter('errorObject', 0) as string; - // tslint:disable-next-line:no-any + const errorObject = jsonParse(json); toThrow = { diff --git a/packages/nodes-base/nodes/Storyblok/GenericFunctions.ts b/packages/nodes-base/nodes/Storyblok/GenericFunctions.ts index ffca6c8fb1..4c46cd8b23 100644 --- a/packages/nodes-base/nodes/Storyblok/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Storyblok/GenericFunctions.ts @@ -13,11 +13,10 @@ export async function storyblokApiRequest( this: IHookFunctions | IExecuteFunctions | IExecuteSingleFunctions | ILoadOptionsFunctions, method: string, resource: string, - // tslint:disable-next-line:no-any + body: any = {}, qs: IDataObject = {}, option: IDataObject = {}, - // tslint:disable-next-line:no-any ): Promise { const authenticationMethod = this.getNodeParameter('source', 0) as string; @@ -66,10 +65,9 @@ export async function storyblokApiRequestAllItems( propertyName: string, method: string, resource: string, - // tslint:disable-next-line:no-any + body: any = {}, query: IDataObject = {}, - // tslint:disable-next-line:no-any ): Promise { const returnData: IDataObject[] = []; @@ -88,7 +86,6 @@ export async function storyblokApiRequestAllItems( return returnData; } -// tslint:disable-next-line:no-any export function validateJSON(json: string | undefined): any { let result; try { diff --git a/packages/nodes-base/nodes/Strapi/GenericFunctions.ts b/packages/nodes-base/nodes/Strapi/GenericFunctions.ts index e38bb958d5..f778cce519 100644 --- a/packages/nodes-base/nodes/Strapi/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Strapi/GenericFunctions.ts @@ -13,12 +13,11 @@ export async function strapiApiRequest( this: IExecuteFunctions | ILoadOptionsFunctions | IHookFunctions | IWebhookFunctions, method: string, resource: string, - // tslint:disable-next-line:no-any + body: any = {}, qs: IDataObject = {}, uri?: string, headers: IDataObject = {}, - // tslint:disable-next-line:no-any ): Promise { const credentials = await this.getCredentials('strapiApi'); @@ -53,7 +52,6 @@ export async function strapiApiRequest( export async function getToken( this: IExecuteFunctions | ILoadOptionsFunctions | IHookFunctions | IWebhookFunctions, - // tslint:disable-next-line:no-any ): Promise { const credentials = await this.getCredentials('strapiApi'); let options = {} as OptionsWithUri; @@ -79,11 +77,10 @@ export async function strapiApiRequestAllItems( this: IHookFunctions | ILoadOptionsFunctions | IExecuteFunctions, method: string, resource: string, - // tslint:disable-next-line:no-any + body: any = {}, query: IDataObject = {}, headers: IDataObject = {}, - // tslint:disable-next-line:no-any ): Promise { const returnData: IDataObject[] = []; const { apiVersion } = await this.getCredentials('strapiApi'); @@ -125,7 +122,6 @@ export async function strapiApiRequestAllItems( return returnData; } -// tslint:disable-next-line:no-any export function validateJSON(json: string | undefined): any { let result; try { diff --git a/packages/nodes-base/nodes/Strava/GenericFunctions.ts b/packages/nodes-base/nodes/Strava/GenericFunctions.ts index 4600d60d6d..0ce16aa3c7 100644 --- a/packages/nodes-base/nodes/Strava/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Strava/GenericFunctions.ts @@ -19,12 +19,11 @@ export async function stravaApiRequest( | IWebhookFunctions, method: string, resource: string, - // tslint:disable-next-line:no-any + body: any = {}, qs: IDataObject = {}, uri?: string, headers: IDataObject = {}, - // tslint:disable-next-line:no-any ): Promise { const options: OptionsWithUri = { method, @@ -67,10 +66,9 @@ export async function stravaApiRequestAllItems( this: IHookFunctions | ILoadOptionsFunctions | IExecuteFunctions, method: string, resource: string, - // tslint:disable-next-line:no-any + body: any = {}, query: IDataObject = {}, - // tslint:disable-next-line:no-any ): Promise { const returnData: IDataObject[] = []; diff --git a/packages/nodes-base/nodes/Supabase/GenericFunctions.ts b/packages/nodes-base/nodes/Supabase/GenericFunctions.ts index 48f06b3ceb..34b98f739a 100644 --- a/packages/nodes-base/nodes/Supabase/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Supabase/GenericFunctions.ts @@ -25,12 +25,11 @@ export async function supabaseApiRequest( | IWebhookFunctions, method: string, resource: string, - // tslint:disable-next-line:no-any + body: any = {}, qs: IDataObject = {}, uri?: string, headers: IDataObject = {}, - // tslint:disable-next-line:no-any ): Promise { const credentials = (await this.getCredentials('supabaseApi')) as { host: string; @@ -307,7 +306,6 @@ export const buildGetQuery = (obj: IDataObject, value: IDataObject) => { export async function validateCredentials( this: ICredentialTestFunctions, decryptedCredentials: ICredentialDataDecryptedObject, - // tslint:disable-next-line:no-any ): Promise { const credentials = decryptedCredentials; diff --git a/packages/nodes-base/nodes/SurveyMonkey/GenericFunctions.ts b/packages/nodes-base/nodes/SurveyMonkey/GenericFunctions.ts index 8bb1621cc4..9c33f09d22 100644 --- a/packages/nodes-base/nodes/SurveyMonkey/GenericFunctions.ts +++ b/packages/nodes-base/nodes/SurveyMonkey/GenericFunctions.ts @@ -8,12 +8,11 @@ export async function surveyMonkeyApiRequest( this: IExecuteFunctions | IWebhookFunctions | IHookFunctions | ILoadOptionsFunctions, method: string, resource: string, - // tslint:disable-next-line:no-any + body: any = {}, query: IDataObject = {}, uri?: string, option: IDataObject = {}, - // tslint:disable-next-line:no-any ): Promise { const authenticationMethod = this.getNodeParameter('authentication', 0); @@ -58,10 +57,9 @@ export async function surveyMonkeyRequestAllItems( propertyName: string, method: string, endpoint: string, - // tslint:disable-next-line:no-any + body: any = {}, query: IDataObject = {}, - // tslint:disable-next-line:no-any ): Promise { const returnData: IDataObject[] = []; diff --git a/packages/nodes-base/nodes/SurveyMonkey/SurveyMonkeyTrigger.node.ts b/packages/nodes-base/nodes/SurveyMonkey/SurveyMonkeyTrigger.node.ts index 4012fa711c..5074cbc9ca 100644 --- a/packages/nodes-base/nodes/SurveyMonkey/SurveyMonkeyTrigger.node.ts +++ b/packages/nodes-base/nodes/SurveyMonkey/SurveyMonkeyTrigger.node.ts @@ -514,7 +514,6 @@ export class SurveyMonkeyTrigger implements INodeType { return {}; } - // tslint:disable-next-line:no-any let responseData = jsonParse(data.join('')); let endpoint = ''; diff --git a/packages/nodes-base/nodes/SyncroMSP/v1/transport/index.ts b/packages/nodes-base/nodes/SyncroMSP/v1/transport/index.ts index b7da0d4f9e..cf6ede6bbd 100644 --- a/packages/nodes-base/nodes/SyncroMSP/v1/transport/index.ts +++ b/packages/nodes-base/nodes/SyncroMSP/v1/transport/index.ts @@ -61,7 +61,6 @@ export async function apiRequestAllItems( export async function validateCredentials( this: ICredentialTestFunctions, decryptedCredentials: ICredentialDataDecryptedObject, - // tslint:disable-next-line:no-any ): Promise { const credentials = decryptedCredentials; diff --git a/packages/nodes-base/nodes/Taiga/GenericFunctions.ts b/packages/nodes-base/nodes/Taiga/GenericFunctions.ts index 3867431d98..a6f999514b 100644 --- a/packages/nodes-base/nodes/Taiga/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Taiga/GenericFunctions.ts @@ -65,7 +65,6 @@ export async function taigaApiRequest( query = {}, uri?: string | undefined, option = {}, - // tslint:disable-next-line:no-any ): Promise { const credentials = await this.getCredentials('taigaApi'); @@ -103,10 +102,9 @@ export async function taigaApiRequestAllItems( this: IHookFunctions | IExecuteFunctions | ILoadOptionsFunctions, method: string, resource: string, - // tslint:disable-next-line:no-any + body: any = {}, query: IDataObject = {}, - // tslint:disable-next-line:no-any ): Promise { const returnData: IDataObject[] = []; diff --git a/packages/nodes-base/nodes/Tapfiliate/GenericFunctions.ts b/packages/nodes-base/nodes/Tapfiliate/GenericFunctions.ts index b82619db11..ce30d39776 100644 --- a/packages/nodes-base/nodes/Tapfiliate/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Tapfiliate/GenericFunctions.ts @@ -13,12 +13,11 @@ export async function tapfiliateApiRequest( this: IHookFunctions | IExecuteFunctions | IExecuteSingleFunctions | ILoadOptionsFunctions, method: string, endpoint: string, - // tslint:disable-next-line:no-any + body: any = {}, qs: IDataObject = {}, uri?: string | undefined, option: IDataObject = {}, - // tslint:disable-next-line:no-any ): Promise { const credentials = await this.getCredentials('tapfiliateApi'); @@ -51,10 +50,9 @@ export async function tapfiliateApiRequestAllItems( this: IExecuteFunctions | ILoadOptionsFunctions, method: string, endpoint: string, - // tslint:disable-next-line:no-any + body: any = {}, query: IDataObject = {}, - // tslint:disable-next-line:no-any ): Promise { const returnData: IDataObject[] = []; diff --git a/packages/nodes-base/nodes/Telegram/GenericFunctions.ts b/packages/nodes-base/nodes/Telegram/GenericFunctions.ts index d9235e5f90..9f2fbebf00 100644 --- a/packages/nodes-base/nodes/Telegram/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Telegram/GenericFunctions.ts @@ -146,7 +146,6 @@ export async function apiRequest( body: IDataObject, query?: IDataObject, option: IDataObject = {}, - // tslint:disable-next-line:no-any ): Promise { const credentials = await this.getCredentials('telegramApi'); diff --git a/packages/nodes-base/nodes/TheHive/GenericFunctions.ts b/packages/nodes-base/nodes/TheHive/GenericFunctions.ts index 73fe0522e5..b7bb38e3ff 100644 --- a/packages/nodes-base/nodes/TheHive/GenericFunctions.ts +++ b/packages/nodes-base/nodes/TheHive/GenericFunctions.ts @@ -11,12 +11,11 @@ export async function theHiveApiRequest( this: IHookFunctions | IExecuteFunctions | ILoadOptionsFunctions, method: string, resource: string, - // tslint:disable-next-line:no-any + body: any = {}, query: IDataObject = {}, uri?: string, option: IDataObject = {}, - // tslint:disable-next-line:no-any ): Promise { const credentials = await this.getCredentials('theHiveApi'); diff --git a/packages/nodes-base/nodes/TheHive/QueryFunctions.ts b/packages/nodes-base/nodes/TheHive/QueryFunctions.ts index c1fd08e6a7..09c79d87f2 100644 --- a/packages/nodes-base/nodes/TheHive/QueryFunctions.ts +++ b/packages/nodes-base/nodes/TheHive/QueryFunctions.ts @@ -25,23 +25,23 @@ export type IQueryObject = { }; // Query Functions -// tslint:disable-next-line:no-any + export function Eq(field: string, value: any): IQueryObject { return { _field: field, _value: value }; } -// tslint:disable-next-line:no-any + export function Gt(field: string, value: any): IQueryObject { return { _gt: { field: value } }; } -// tslint:disable-next-line:no-any + export function Gte(field: string, value: any): IQueryObject { return { _gte: { field: value } }; } -// tslint:disable-next-line:no-any + export function Lt(field: string, value: any): IQueryObject { return { _lt: { field: value } }; } -// tslint:disable-next-line:no-any + export function Lte(field: string, value: any): IQueryObject { return { _lte: { field: value } }; } @@ -54,7 +54,7 @@ export function Or(...criteria: IQueryObject[]): IQueryObject { export function Not(criteria: IQueryObject[]): IQueryObject { return { _not: criteria }; } -// tslint:disable-next-line:no-any + export function In(field: string, values: any[]): IQueryObject { return { _in: { _field: field, _values: values } }; } @@ -64,7 +64,7 @@ export function Contains(field: string): IQueryObject { export function Id(id: string | number): IQueryObject { return { _id: id }; } -// tslint:disable-next-line:no-any + export function Between(field: string, fromValue: any, toValue: any): IQueryObject { return { _between: { _field: field, _from: fromValue, _to: toValue } }; } diff --git a/packages/nodes-base/nodes/TheHive/TheHive.node.ts b/packages/nodes-base/nodes/TheHive/TheHive.node.ts index 827f5e8628..d974dd3563 100644 --- a/packages/nodes-base/nodes/TheHive/TheHive.node.ts +++ b/packages/nodes-base/nodes/TheHive/TheHive.node.ts @@ -323,7 +323,7 @@ export class TheHive implements INodeType { if (resource === 'alert') { if (operation === 'count') { const filters = this.getNodeParameter('filters', i, {}) as INodeParameters; - const countQueryAttributs: any = prepareOptional(filters); // tslint:disable-line:no-any + const countQueryAttributs: any = prepareOptional(filters); const _countSearchQuery: IQueryObject = And(); @@ -536,7 +536,7 @@ export class TheHive implements INodeType { const version = credentials.apiVersion; const filters = this.getNodeParameter('filters', i, {}) as INodeParameters; - const queryAttributs: any = prepareOptional(filters); // tslint:disable-line:no-any + const queryAttributs: any = prepareOptional(filters); const options = this.getNodeParameter('options', i); const _searchQuery: IQueryObject = And(); @@ -745,7 +745,6 @@ export class TheHive implements INodeType { if (resource === 'observable') { if (operation === 'count') { - // tslint:disable-next-line:no-any const countQueryAttributs: any = prepareOptional( this.getNodeParameter('filters', i, {}) as INodeParameters, ); @@ -809,7 +808,7 @@ export class TheHive implements INodeType { }; }, ); - let response: any; // tslint:disable-line:no-any + let response: any; let body: IDataObject; responseData = []; for (const analyzer of analyzers) { @@ -1065,7 +1064,6 @@ export class TheHive implements INodeType { const version = credentials.apiVersion; - // tslint:disable-next-line:no-any const queryAttributs: any = prepareOptional( this.getNodeParameter('filters', i, {}) as INodeParameters, ); @@ -1175,7 +1173,7 @@ export class TheHive implements INodeType { if (resource === 'case') { if (operation === 'count') { const filters = this.getNodeParameter('filters', i, {}) as INodeParameters; - const countQueryAttributs: any = prepareOptional(filters); // tslint:disable-line:no-any + const countQueryAttributs: any = prepareOptional(filters); const _countSearchQuery: IQueryObject = And(); @@ -1344,7 +1342,7 @@ export class TheHive implements INodeType { const version = credentials.apiVersion; const filters = this.getNodeParameter('filters', i, {}) as INodeParameters; - const queryAttributs: any = prepareOptional(filters); // tslint:disable-line:no-any + const queryAttributs: any = prepareOptional(filters); const _searchQuery: IQueryObject = And(); @@ -1450,7 +1448,6 @@ export class TheHive implements INodeType { if (resource === 'task') { if (operation === 'count') { - // tslint:disable-next-line:no-any const countQueryAttributs: any = prepareOptional( this.getNodeParameter('filters', i, {}) as INodeParameters, ); @@ -1670,7 +1667,6 @@ export class TheHive implements INodeType { const version = credentials.apiVersion; - // tslint:disable-next-line:no-any const queryAttributs: any = prepareOptional( this.getNodeParameter('filters', i, {}) as INodeParameters, ); diff --git a/packages/nodes-base/nodes/Todoist/GenericFunctions.ts b/packages/nodes-base/nodes/Todoist/GenericFunctions.ts index bd8ff96a0a..821b9d793d 100644 --- a/packages/nodes-base/nodes/Todoist/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Todoist/GenericFunctions.ts @@ -16,10 +16,9 @@ export async function todoistApiRequest( this: Context, method: string, resource: string, - // tslint:disable-next-line:no-any - body: any = {}, // tslint:disable-line:no-any + + body: any = {}, qs: IDataObject = {}, - // tslint:disable-next-line:no-any ): Promise { const authentication = this.getNodeParameter('authentication', 0) as string; @@ -46,9 +45,8 @@ export async function todoistApiRequest( export async function todoistSyncRequest( this: Context, - body: any = {}, // tslint:disable-line:no-any + body: any = {}, qs: IDataObject = {}, - // tslint:disable-next-line:no-any ): Promise { const authentication = this.getNodeParameter('authentication', 0, 'oAuth2'); diff --git a/packages/nodes-base/nodes/Toggl/GenericFunctions.ts b/packages/nodes-base/nodes/Toggl/GenericFunctions.ts index 2ebeb189b0..6fd51ae4bb 100644 --- a/packages/nodes-base/nodes/Toggl/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Toggl/GenericFunctions.ts @@ -21,11 +21,10 @@ export async function togglApiRequest( | ILoadOptionsFunctions, method: string, resource: string, - // tslint:disable-next-line:no-any + body: any = {}, query?: IDataObject, uri?: string, - // tslint:disable-next-line:no-any ): Promise { const credentials = await this.getCredentials('togglApi'); const headerWithAuthentication = Object.assign( diff --git a/packages/nodes-base/nodes/TravisCi/GenericFunctions.ts b/packages/nodes-base/nodes/TravisCi/GenericFunctions.ts index 585167ceba..de6fad8c46 100644 --- a/packages/nodes-base/nodes/TravisCi/GenericFunctions.ts +++ b/packages/nodes-base/nodes/TravisCi/GenericFunctions.ts @@ -15,12 +15,11 @@ export async function travisciApiRequest( this: IHookFunctions | IExecuteFunctions | IExecuteSingleFunctions | ILoadOptionsFunctions, method: string, resource: string, - // tslint:disable-next-line:no-any + body: any = {}, qs: IDataObject = {}, uri?: string, option: IDataObject = {}, - // tslint:disable-next-line:no-any ): Promise { const credentials = await this.getCredentials('travisCiApi'); let options: OptionsWithUri = { @@ -56,10 +55,9 @@ export async function travisciApiRequestAllItems( propertyName: string, method: string, resource: string, - // tslint:disable-next-line:no-any + body: any = {}, query: IDataObject = {}, - // tslint:disable-next-line:no-any ): Promise { const returnData: IDataObject[] = []; diff --git a/packages/nodes-base/nodes/Trello/GenericFunctions.ts b/packages/nodes-base/nodes/Trello/GenericFunctions.ts index 0b993b2147..01604c3457 100644 --- a/packages/nodes-base/nodes/Trello/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Trello/GenericFunctions.ts @@ -14,7 +14,6 @@ export async function apiRequest( endpoint: string, body: object, query?: IDataObject, - // tslint:disable-next-line:no-any ): Promise { query = query || {}; @@ -35,7 +34,6 @@ export async function apiRequestAllItems( endpoint: string, body: IDataObject, query: IDataObject = {}, - // tslint:disable-next-line:no-any ): Promise { query.limit = 30; diff --git a/packages/nodes-base/nodes/Twilio/GenericFunctions.ts b/packages/nodes-base/nodes/Twilio/GenericFunctions.ts index a70a4f90a7..1b2629ec8f 100644 --- a/packages/nodes-base/nodes/Twilio/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Twilio/GenericFunctions.ts @@ -14,7 +14,6 @@ export async function twilioApiRequest( endpoint: string, body: IDataObject, query?: IDataObject, - // tslint:disable-next-line:no-any ): Promise { const credentials = (await this.getCredentials('twilioApi')) as { accountSid: string; diff --git a/packages/nodes-base/nodes/Twist/GenericFunctions.ts b/packages/nodes-base/nodes/Twist/GenericFunctions.ts index 0ad9dd44a7..87962977b7 100644 --- a/packages/nodes-base/nodes/Twist/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Twist/GenericFunctions.ts @@ -8,11 +8,10 @@ export async function twistApiRequest( this: IExecuteFunctions | ILoadOptionsFunctions, method: string, endpoint: string, - // tslint:disable-next-line:no-any + body: any = {}, qs: IDataObject = {}, option: IDataObject = {}, - // tslint:disable-next-line:no-any ): Promise { const options: OptionsWithUri = { method, diff --git a/packages/nodes-base/nodes/Twitter/GenericFunctions.ts b/packages/nodes-base/nodes/Twitter/GenericFunctions.ts index 6959694f21..0cd186af21 100644 --- a/packages/nodes-base/nodes/Twitter/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Twitter/GenericFunctions.ts @@ -20,12 +20,11 @@ export async function twitterApiRequest( this: IExecuteFunctions | IExecuteSingleFunctions | ILoadOptionsFunctions | IHookFunctions, method: string, resource: string, - // tslint:disable-next-line:no-any + body: any = {}, qs: IDataObject = {}, uri?: string, option: IDataObject = {}, - // tslint:disable-next-line:no-any ): Promise { let options: OptionsWithUrl = { method, @@ -56,10 +55,9 @@ export async function twitterApiRequestAllItems( propertyName: string, method: string, endpoint: string, - // tslint:disable-next-line:no-any + body: any = {}, query: IDataObject = {}, - // tslint:disable-next-line:no-any ): Promise { const returnData: IDataObject[] = []; diff --git a/packages/nodes-base/nodes/Typeform/GenericFunctions.ts b/packages/nodes-base/nodes/Typeform/GenericFunctions.ts index 0e9a4659fa..69071d9d11 100644 --- a/packages/nodes-base/nodes/Typeform/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Typeform/GenericFunctions.ts @@ -39,7 +39,6 @@ export async function apiRequest( endpoint: string, body: object, query?: IDataObject, - // tslint:disable-next-line:no-any ): Promise { const authenticationMethod = this.getNodeParameter('authentication', 0); @@ -78,7 +77,6 @@ export async function apiRequestAllItems( body: IDataObject, query?: IDataObject, _dataKey?: string, - // tslint:disable-next-line:no-any ): Promise { if (query === undefined) { query = {}; diff --git a/packages/nodes-base/nodes/UProc/GenericFunctions.ts b/packages/nodes-base/nodes/UProc/GenericFunctions.ts index 2aa7ad121b..a334cf4540 100644 --- a/packages/nodes-base/nodes/UProc/GenericFunctions.ts +++ b/packages/nodes-base/nodes/UProc/GenericFunctions.ts @@ -10,11 +10,10 @@ import { IDataObject, IHttpRequestMethods, IHttpRequestOptions, NodeApiError } f export async function uprocApiRequest( this: IHookFunctions | IExecuteFunctions | IExecuteSingleFunctions | ILoadOptionsFunctions, method: string, - body: any = {}, // tslint:disable-line:no-any + body: any = {}, qs: IDataObject = {}, uri?: string, _option: IDataObject = {}, - // tslint:disable-next-line:no-any ): Promise { const options: IHttpRequestOptions = { method: method as IHttpRequestMethods, diff --git a/packages/nodes-base/nodes/UProc/ToolDescription.ts b/packages/nodes-base/nodes/UProc/ToolDescription.ts index 463ff687b8..a1d78bf1c0 100644 --- a/packages/nodes-base/nodes/UProc/ToolDescription.ts +++ b/packages/nodes-base/nodes/UProc/ToolDescription.ts @@ -49,7 +49,7 @@ for (const group of (groups as IDataObject).groups as IDataObject[]) { } //Tool - item.options = options.sort((a, b) => (a.name > b.name ? 1 : -1)) as any; // tslint:disable-line:no-any + item.options = options.sort((a, b) => (a.name > b.name ? 1 : -1)) as any; item.default = options[0].value as string; operations.push(item); } diff --git a/packages/nodes-base/nodes/UProc/UProc.node.ts b/packages/nodes-base/nodes/UProc/UProc.node.ts index b0913df085..e05744fa34 100644 --- a/packages/nodes-base/nodes/UProc/UProc.node.ts +++ b/packages/nodes-base/nodes/UProc/UProc.node.ts @@ -82,7 +82,7 @@ export class UProc implements INodeType { const dataWebhook = additionalOptions.dataWebhook as string; interface LooseObject { - [key: string]: any; // tslint:disable-line:no-any + [key: string]: any; } const fields = toolParameters diff --git a/packages/nodes-base/nodes/UnleashedSoftware/GenericFunctions.ts b/packages/nodes-base/nodes/UnleashedSoftware/GenericFunctions.ts index 2a30e83e6d..c975df2a7f 100644 --- a/packages/nodes-base/nodes/UnleashedSoftware/GenericFunctions.ts +++ b/packages/nodes-base/nodes/UnleashedSoftware/GenericFunctions.ts @@ -17,12 +17,11 @@ export async function unleashedApiRequest( this: IHookFunctions | IExecuteFunctions | IExecuteSingleFunctions | ILoadOptionsFunctions, method: string, path: string, - // tslint:disable-next-line:no-any + body: any = {}, query: IDataObject = {}, pageNumber?: number, headers?: object, - // tslint:disable-next-line:no-any ): Promise { const paginatedPath = pageNumber ? `/${path}/${pageNumber}` : `/${path}`; @@ -65,10 +64,9 @@ export async function unleashedApiRequestAllItems( propertyName: string, method: string, endpoint: string, - // tslint:disable-next-line:no-any + body: any = {}, query: IDataObject = {}, - // tslint:disable-next-line:no-any ): Promise { const returnData: IDataObject[] = []; let responseData; @@ -90,7 +88,7 @@ export async function unleashedApiRequestAllItems( //.NET code is serializing dates in the following format: "/Date(1586833770780)/" //which is useless on JS side and could not treated as a date for other nodes //so we need to convert all of the fields that has it. -// tslint:disable-next-line:no-any + export function convertNETDates(item: { [key: string]: any }) { Object.keys(item).forEach((path) => { const type = typeof item[path] as string; diff --git a/packages/nodes-base/nodes/Uplead/GenericFunctions.ts b/packages/nodes-base/nodes/Uplead/GenericFunctions.ts index 9653414ca6..a8c7368c38 100644 --- a/packages/nodes-base/nodes/Uplead/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Uplead/GenericFunctions.ts @@ -11,12 +11,11 @@ export async function upleadApiRequest( this: IHookFunctions | IExecuteFunctions | IExecuteSingleFunctions | ILoadOptionsFunctions, method: string, resource: string, - // tslint:disable-next-line:no-any + body: any = {}, qs: IDataObject = {}, uri?: string, option: IDataObject = {}, - // tslint:disable-next-line:no-any ): Promise { const credentials = await this.getCredentials('upleadApi'); let options: OptionsWithUri = { diff --git a/packages/nodes-base/nodes/Venafi/Datacenter/GenericFunctions.ts b/packages/nodes-base/nodes/Venafi/Datacenter/GenericFunctions.ts index 6d3f22d38c..0078ac8bd8 100644 --- a/packages/nodes-base/nodes/Venafi/Datacenter/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Venafi/Datacenter/GenericFunctions.ts @@ -19,7 +19,6 @@ export async function venafiApiRequest( qs: IDataObject = {}, uri?: string, headers: IDataObject = {}, - // tslint:disable-next-line:no-any ): Promise { const credentials = (await this.getCredentials('venafiTlsProtectDatacenterApi')) as IDataObject; @@ -66,7 +65,6 @@ export async function venafiApiRequestAllItems( endpoint: string, body: IDataObject = {}, query: IDataObject = {}, - // tslint:disable-next-line:no-any ): Promise { const returnData: IDataObject[] = []; diff --git a/packages/nodes-base/nodes/Venafi/ProtectCloud/GenericFunctions.ts b/packages/nodes-base/nodes/Venafi/ProtectCloud/GenericFunctions.ts index f93ee0c0f8..539d83ff1f 100644 --- a/packages/nodes-base/nodes/Venafi/ProtectCloud/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Venafi/ProtectCloud/GenericFunctions.ts @@ -16,7 +16,6 @@ export async function venafiApiRequest( qs: IDataObject = {}, uri?: string, option: IDataObject = {}, - // tslint:disable-next-line:no-any ): Promise { const operation = this.getNodeParameter('operation', 0); @@ -65,10 +64,9 @@ export async function venafiApiRequestAllItems( propertyName: string, method: string, endpoint: string, - // tslint:disable-next-line:no-any + body: any = {}, query: IDataObject = {}, - // tslint:disable-next-line:no-any ): Promise { const returnData: IDataObject[] = []; @@ -116,7 +114,6 @@ export async function encryptPassphrase( const promise = () => { return new Promise((resolve, reject) => { - // tslint:disable-next-line:no-any nacl_factory.instantiate((nacl: any) => { try { const passphraseUTF8 = nacl.encode_utf8(passphrase) as string; diff --git a/packages/nodes-base/nodes/Vero/GenericFunctions.ts b/packages/nodes-base/nodes/Vero/GenericFunctions.ts index 2a7ef47763..0e2dc908dc 100644 --- a/packages/nodes-base/nodes/Vero/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Vero/GenericFunctions.ts @@ -6,12 +6,11 @@ export async function veroApiRequest( this: IExecuteFunctions | IExecuteSingleFunctions | ILoadOptionsFunctions, method: string, resource: string, - // tslint:disable-next-line:no-any + body: any = {}, qs: IDataObject = {}, uri?: string, option: IDataObject = {}, - // tslint:disable-next-line:no-any ): Promise { const credentials = await this.getCredentials('veroApi'); @@ -37,7 +36,6 @@ export async function veroApiRequest( } } -// tslint:disable-next-line:no-any export function validateJSON(json: string | undefined): any { let result; try { diff --git a/packages/nodes-base/nodes/Vonage/GenericFunctions.ts b/packages/nodes-base/nodes/Vonage/GenericFunctions.ts index 78b3cfeffd..e0bb72d37d 100644 --- a/packages/nodes-base/nodes/Vonage/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Vonage/GenericFunctions.ts @@ -8,11 +8,10 @@ export async function vonageApiRequest( this: IExecuteFunctions | IExecuteSingleFunctions | ILoadOptionsFunctions, method: string, path: string, - // tslint:disable-next-line:no-any + body: any = {}, qs: IDataObject = {}, _option = {}, - // tslint:disable-next-line:no-any ): Promise { const credentials = await this.getCredentials('vonageApi'); diff --git a/packages/nodes-base/nodes/Wekan/GenericFunctions.ts b/packages/nodes-base/nodes/Wekan/GenericFunctions.ts index b0bb2fa2d5..a96bc99153 100644 --- a/packages/nodes-base/nodes/Wekan/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Wekan/GenericFunctions.ts @@ -10,7 +10,6 @@ export async function apiRequest( endpoint: string, body: object, query?: IDataObject, - // tslint:disable-next-line:no-any ): Promise { const credentials = await this.getCredentials('wekanApi'); diff --git a/packages/nodes-base/nodes/WooCommerce/GenericFunctions.ts b/packages/nodes-base/nodes/WooCommerce/GenericFunctions.ts index b4f2f27047..49139a89dc 100644 --- a/packages/nodes-base/nodes/WooCommerce/GenericFunctions.ts +++ b/packages/nodes-base/nodes/WooCommerce/GenericFunctions.ts @@ -27,12 +27,11 @@ export async function woocommerceApiRequest( | IWebhookFunctions, method: string, resource: string, - // tslint:disable-next-line:no-any + body: any = {}, qs: IDataObject = {}, uri?: string, option: IDataObject = {}, - // tslint:disable-next-line:no-any ): Promise { const credentials = await this.getCredentials('wooCommerceApi'); @@ -55,10 +54,9 @@ export async function woocommerceApiRequestAllItems( this: IExecuteFunctions | ILoadOptionsFunctions | IHookFunctions, method: string, endpoint: string, - // tslint:disable-next-line:no-any + body: any = {}, query: IDataObject = {}, - // tslint:disable-next-line:no-any ): Promise { const returnData: IDataObject[] = []; diff --git a/packages/nodes-base/nodes/WooCommerce/OrderInterface.ts b/packages/nodes-base/nodes/WooCommerce/OrderInterface.ts index 5a59c4c02a..cf1466d0a8 100644 --- a/packages/nodes-base/nodes/WooCommerce/OrderInterface.ts +++ b/packages/nodes-base/nodes/WooCommerce/OrderInterface.ts @@ -46,7 +46,7 @@ export interface ICouponLine { } export interface IOrder { - [index: string]: any; // tslint:disable-line:no-any + [index: string]: any; billing?: IAddress; coupon_lines?: ICouponLine[]; currency?: string; diff --git a/packages/nodes-base/nodes/Wordpress/GenericFunctions.ts b/packages/nodes-base/nodes/Wordpress/GenericFunctions.ts index 573e48420d..26a8ee9ddf 100644 --- a/packages/nodes-base/nodes/Wordpress/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Wordpress/GenericFunctions.ts @@ -8,12 +8,11 @@ export async function wordpressApiRequest( this: IExecuteFunctions | IExecuteSingleFunctions | ILoadOptionsFunctions, method: string, resource: string, - // tslint:disable-next-line:no-any + body: any = {}, qs: IDataObject = {}, uri?: string, option: IDataObject = {}, - // tslint:disable-next-line:no-any ): Promise { const credentials = await this.getCredentials('wordpressApi'); @@ -45,10 +44,9 @@ export async function wordpressApiRequestAllItems( this: IExecuteFunctions | ILoadOptionsFunctions, method: string, endpoint: string, - // tslint:disable-next-line:no-any + body: any = {}, query: IDataObject = {}, - // tslint:disable-next-line:no-any ): Promise { const returnData: IDataObject[] = []; diff --git a/packages/nodes-base/nodes/Workable/GenericFunctions.ts b/packages/nodes-base/nodes/Workable/GenericFunctions.ts index a847340f0d..7a1a0b40c5 100644 --- a/packages/nodes-base/nodes/Workable/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Workable/GenericFunctions.ts @@ -13,12 +13,11 @@ export async function workableApiRequest( this: IHookFunctions | IExecuteFunctions | IExecuteSingleFunctions | ILoadOptionsFunctions, method: string, resource: string, - // tslint:disable-next-line:no-any + body: any = {}, qs: IDataObject = {}, uri?: string, option: IDataObject = {}, - // tslint:disable-next-line:no-any ): Promise { const credentials = (await this.getCredentials('workableApi')) as { accessToken: string; diff --git a/packages/nodes-base/nodes/Wufoo/GenericFunctions.ts b/packages/nodes-base/nodes/Wufoo/GenericFunctions.ts index ea26907174..ccb2a76a27 100644 --- a/packages/nodes-base/nodes/Wufoo/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Wufoo/GenericFunctions.ts @@ -13,12 +13,11 @@ export async function wufooApiRequest( this: IHookFunctions | IExecuteFunctions | IExecuteSingleFunctions | ILoadOptionsFunctions, method: string, resource: string, - // tslint:disable-next-line:no-any + body: any = {}, qs: IDataObject = {}, uri?: string, option: IDataObject = {}, - // tslint:disable-next-line:no-any ): Promise { const credentials = await this.getCredentials('wufooApi'); diff --git a/packages/nodes-base/nodes/Wufoo/WufooTrigger.node.ts b/packages/nodes-base/nodes/Wufoo/WufooTrigger.node.ts index e0f15e6bbe..409d16f1ed 100644 --- a/packages/nodes-base/nodes/Wufoo/WufooTrigger.node.ts +++ b/packages/nodes-base/nodes/Wufoo/WufooTrigger.node.ts @@ -154,7 +154,6 @@ export class WufooTrigger implements INodeType { return {}; } - // tslint:disable-next-line:no-any const fieldsObject = jsonParse(req.body.FieldStructure, { errorMessage: "Invalid JSON in request body field 'FieldStructure'", }); diff --git a/packages/nodes-base/nodes/Xero/GenericFunctions.ts b/packages/nodes-base/nodes/Xero/GenericFunctions.ts index 0e05a22db0..cb99717f43 100644 --- a/packages/nodes-base/nodes/Xero/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Xero/GenericFunctions.ts @@ -8,12 +8,11 @@ export async function xeroApiRequest( this: IExecuteFunctions | IExecuteSingleFunctions | ILoadOptionsFunctions, method: string, resource: string, - // tslint:disable-next-line:no-any + body: any = {}, qs: IDataObject = {}, uri?: string, headers: IDataObject = {}, - // tslint:disable-next-line:no-any ): Promise { const options: OptionsWithUri = { headers: { @@ -48,10 +47,9 @@ export async function xeroApiRequestAllItems( propertyName: string, method: string, endpoint: string, - // tslint:disable-next-line:no-any + body: any = {}, query: IDataObject = {}, - // tslint:disable-next-line:no-any ): Promise { const returnData: IDataObject[] = []; diff --git a/packages/nodes-base/nodes/Yourls/GenericFunctions.ts b/packages/nodes-base/nodes/Yourls/GenericFunctions.ts index 729eedeab6..3c15e70b21 100644 --- a/packages/nodes-base/nodes/Yourls/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Yourls/GenericFunctions.ts @@ -7,10 +7,9 @@ import { IDataObject, NodeApiError, NodeOperationError } from 'n8n-workflow'; export async function yourlsApiRequest( this: IExecuteFunctions | IExecuteSingleFunctions | ILoadOptionsFunctions, method: string, - // tslint:disable-next-line:no-any + body: any = {}, qs: IDataObject = {}, - // tslint:disable-next-line:no-any ): Promise { const credentials = await this.getCredentials('yourlsApi'); diff --git a/packages/nodes-base/nodes/Zendesk/GenericFunctions.ts b/packages/nodes-base/nodes/Zendesk/GenericFunctions.ts index f1444e8c74..24900a39c4 100644 --- a/packages/nodes-base/nodes/Zendesk/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Zendesk/GenericFunctions.ts @@ -13,12 +13,11 @@ export async function zendeskApiRequest( this: IHookFunctions | IExecuteFunctions | IExecuteSingleFunctions | ILoadOptionsFunctions, method: string, resource: string, - // tslint:disable-next-line:no-any + body: any = {}, qs: IDataObject = {}, uri?: string, option: IDataObject = {}, - // tslint:disable-next-line:no-any ): Promise { const authenticationMethod = this.getNodeParameter('authentication', 0); @@ -60,10 +59,9 @@ export async function zendeskApiRequestAllItems( propertyName: string, method: string, resource: string, - // tslint:disable-next-line:no-any + body: any = {}, query: IDataObject = {}, - // tslint:disable-next-line:no-any ): Promise { const returnData: IDataObject[] = []; @@ -83,7 +81,6 @@ export async function zendeskApiRequestAllItems( return returnData; } -// tslint:disable-next-line:no-any export function validateJSON(json: string | undefined): any { let result; try { diff --git a/packages/nodes-base/nodes/Zoom/GenericFunctions.ts b/packages/nodes-base/nodes/Zoom/GenericFunctions.ts index 77f588b19a..903bae2819 100644 --- a/packages/nodes-base/nodes/Zoom/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Zoom/GenericFunctions.ts @@ -12,7 +12,6 @@ export async function zoomApiRequest( query: object = {}, headers: {} | undefined = undefined, option: {} = {}, - // tslint:disable-next-line:no-any ): Promise { const authenticationMethod = this.getNodeParameter('authentication', 0, 'accessToken') as string; @@ -53,7 +52,6 @@ export async function zoomApiRequestAllItems( endpoint: string, body: IDataObject = {}, query: IDataObject = {}, - // tslint:disable-next-line:no-any ): Promise { const returnData: IDataObject[] = []; let responseData; diff --git a/packages/nodes-base/nodes/Zulip/GenericFunctions.ts b/packages/nodes-base/nodes/Zulip/GenericFunctions.ts index a5c2bc838d..c1faa37a54 100644 --- a/packages/nodes-base/nodes/Zulip/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Zulip/GenericFunctions.ts @@ -8,12 +8,11 @@ export async function zulipApiRequest( this: IExecuteFunctions | IWebhookFunctions | IHookFunctions | ILoadOptionsFunctions, method: string, resource: string, - // tslint:disable-next-line:no-any + body: any = {}, query: IDataObject = {}, uri?: string, option: IDataObject = {}, - // tslint:disable-next-line:no-any ): Promise { const credentials = await this.getCredentials('zulipApi'); @@ -47,7 +46,6 @@ export async function zulipApiRequest( } } -// tslint:disable-next-line:no-any export function validateJSON(json: string | undefined): any { let result; try { diff --git a/packages/nodes-base/nodes/utils/allCurrencies.ts b/packages/nodes-base/nodes/utils/allCurrencies.ts index 9e8d31403a..e8271b9acb 100644 --- a/packages/nodes-base/nodes/utils/allCurrencies.ts +++ b/packages/nodes-base/nodes/utils/allCurrencies.ts @@ -170,5 +170,4 @@ export const allCurrencies = [ { name: 'South African Rand', value: 'zar' }, { name: 'Zambian Kwacha', value: 'zmw' }, { name: 'Zimbabwean Dollar', value: 'zwl' }, - // tslint:disable-next-line: semicolon ]; diff --git a/packages/nodes-base/nodes/utils/utilities.ts b/packages/nodes-base/nodes/utils/utilities.ts index bdff1cea06..920087e1e0 100644 --- a/packages/nodes-base/nodes/utils/utilities.ts +++ b/packages/nodes-base/nodes/utils/utilities.ts @@ -14,7 +14,6 @@ * // => [['a', 'b', 'c'], ['d']] */ -// tslint:disable-next-line:no-any export function chunk(array: any[], size = 1) { const length = array == null ? 0 : array.length; if (!length || size < 1) { @@ -41,11 +40,9 @@ export function chunk(array: any[], size = 1) { * */ -// tslint:disable-next-line:no-any export function flatten(nestedArray: any[][]) { const result = []; - // tslint:disable-next-line:no-any (function loop(array: any[]) { for (let i = 0; i < array.length; i++) { if (Array.isArray(array[i])) { diff --git a/packages/nodes-base/package.json b/packages/nodes-base/package.json index 8e8e197fc0..42c8e091ed 100644 --- a/packages/nodes-base/package.json +++ b/packages/nodes-base/package.json @@ -19,8 +19,8 @@ "build:translations": "gulp build:translations", "build:metadata": "pnpm n8n-generate-known && pnpm n8n-generate-ui-types", "format": "prettier --write . --ignore-path ../../.prettierignore", - "lint": "tslint -p tsconfig.json -c tslint.json && eslint nodes credentials", - "lintfix": "tslint --fix -p tsconfig.json -c tslint.json && eslint nodes credentials --fix", + "lint": "eslint nodes credentials", + "lintfix": "eslint nodes credentials --fix", "watch": "tsc-watch --onSuccess \"pnpm n8n-generate-ui-types\"", "test": "jest" }, diff --git a/packages/nodes-base/tslint.json b/packages/nodes-base/tslint.json deleted file mode 100644 index 90064da5db..0000000000 --- a/packages/nodes-base/tslint.json +++ /dev/null @@ -1,83 +0,0 @@ -{ - "linterOptions": { - "exclude": ["node_modules/**/*"] - }, - "defaultSeverity": "error", - "jsRules": {}, - "rules": { - "array-type": [true, "array-simple"], - "arrow-return-shorthand": true, - "ban": [ - true, - { - "name": "Array", - "message": "tsstyle#array-constructor" - } - ], - "ban-types": [ - true, - ["Object", "Use {} instead."], - ["String", "Use 'string' instead."], - ["Number", "Use 'number' instead."], - ["Boolean", "Use 'boolean' instead."] - ], - "class-name": true, - "curly": [true, "ignore-same-line"], - "forin": true, - "jsdoc-format": true, - "label-position": true, - "indent": [true, "tabs", 2], - "member-access": [true, "no-public"], - "new-parens": true, - "no-angle-bracket-type-assertion": true, - "no-any": true, - "no-arg": true, - "no-conditional-assignment": true, - "no-construct": true, - "no-debugger": true, - "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": [false, "allow-declarations"], - "no-reference": true, - "no-string-throw": true, - "no-unused-expression": true, - "no-var-keyword": true, - "object-literal-shorthand": true, - "only-arrow-functions": [true, "allow-declarations", "allow-named-functions"], - "prefer-const": true, - "radix": true, - "semicolon": [true, "always", "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"], - "use-isnan": true, - "quotes": ["error", "single"], - "variable-name": [ - true, - "check-format", - "ban-keywords", - "allow-leading-underscore", - "allow-trailing-underscore" - ] - }, - "rulesDirectory": [] -}