mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 10:02:05 +00:00
refactor(core): Remove linting exceptions in nodes-base (#4794)
* ⚡ enabled array-type * ⚡ await-thenable on * ⚡ ban-types on * ⚡ default-param-last on * ⚡ dot-notation on * ⚡ member-delimiter-style on * ⚡ no-duplicate-imports on * ⚡ no-empty-interface on * ⚡ no-floating-promises on * ⚡ no-for-in-array on * ⚡ no-invalid-void-type on * ⚡ no-loop-func on * ⚡ no-shadow on * ⚡ ban-ts-comment re enabled * ⚡ @typescript-eslint/lines-between-class-members on * address my own comment * @typescript-eslint/return-await on * @typescript-eslint/promise-function-async on * @typescript-eslint/no-unnecessary-boolean-literal-compare on * @typescript-eslint/no-unnecessary-type-assertion on * prefer-const on * @typescript-eslint/prefer-optional-chain on Co-authored-by: कारतोफ्फेलस्क्रिप्ट™ <aditya@netroy.in>
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
import { IExecuteFunctions } from 'n8n-core';
|
||||
import {
|
||||
IBinaryData,
|
||||
IDataObject,
|
||||
INodeExecutionData,
|
||||
INodeType,
|
||||
@@ -304,7 +303,7 @@ export class FacebookGraphApi implements INodeType {
|
||||
let graphApiVersion = this.getNodeParameter('graphApiVersion', itemIndex) as string;
|
||||
const node = this.getNodeParameter('node', itemIndex) as string;
|
||||
const edge = this.getNodeParameter('edge', itemIndex) as string;
|
||||
const options = this.getNodeParameter('options', itemIndex, {}) as IDataObject;
|
||||
const options = this.getNodeParameter('options', itemIndex, {});
|
||||
|
||||
if (graphApiVersion !== '') {
|
||||
graphApiVersion += '/';
|
||||
@@ -324,13 +323,9 @@ export class FacebookGraphApi implements INodeType {
|
||||
json: true,
|
||||
gzip: true,
|
||||
qs: {
|
||||
access_token: graphApiCredentials!.accessToken,
|
||||
access_token: graphApiCredentials.accessToken,
|
||||
},
|
||||
rejectUnauthorized: !this.getNodeParameter(
|
||||
'allowUnauthorizedCerts',
|
||||
itemIndex,
|
||||
false,
|
||||
) as boolean,
|
||||
rejectUnauthorized: !this.getNodeParameter('allowUnauthorizedCerts', itemIndex, false),
|
||||
};
|
||||
|
||||
if (options !== undefined) {
|
||||
@@ -400,7 +395,7 @@ export class FacebookGraphApi implements INodeType {
|
||||
);
|
||||
}
|
||||
|
||||
const binaryProperty = item.binary[binaryPropertyName] as IBinaryData;
|
||||
const binaryProperty = item.binary[binaryPropertyName];
|
||||
|
||||
const binaryDataBuffer = await this.helpers.getBinaryDataBuffer(
|
||||
itemIndex,
|
||||
@@ -421,7 +416,7 @@ export class FacebookGraphApi implements INodeType {
|
||||
// Now that the options are all set make the actual http request
|
||||
response = await this.helpers.request(requestOptions);
|
||||
} catch (error) {
|
||||
if (this.continueOnFail() === false) {
|
||||
if (!this.continueOnFail()) {
|
||||
throw new NodeApiError(this.getNode(), error);
|
||||
}
|
||||
|
||||
@@ -446,7 +441,7 @@ export class FacebookGraphApi implements INodeType {
|
||||
}
|
||||
|
||||
if (typeof response === 'string') {
|
||||
if (this.continueOnFail() === false) {
|
||||
if (!this.continueOnFail()) {
|
||||
throw new NodeOperationError(this.getNode(), 'Response body is not valid JSON.', {
|
||||
itemIndex,
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user