From eed68987a73423706000ad1f2358d0a08d74f328 Mon Sep 17 00:00:00 2001 From: Minh Luc Van Date: Sat, 26 Nov 2022 11:15:47 +0700 Subject: [PATCH] fix lint --- nodes/Browserless/BrowserlessDescriptions.ts | 8 ++++---- nodes/Browserless/GenericFunctions.ts | 6 +++--- nodes/Browserless/__test__/GenericFunctions.test.ts | 12 ++++++------ nodes/Browserless/types.ts | 4 ++-- 4 files changed, 15 insertions(+), 15 deletions(-) diff --git a/nodes/Browserless/BrowserlessDescriptions.ts b/nodes/Browserless/BrowserlessDescriptions.ts index 642703d..38039cf 100644 --- a/nodes/Browserless/BrowserlessDescriptions.ts +++ b/nodes/Browserless/BrowserlessDescriptions.ts @@ -165,9 +165,9 @@ export const browserlessBrowserOptionsFields: INodeProperties = { description: 'Any parameter that starts with "--" is treated as a command-line flag and is passed directly to chrome when it starts. See https://peter.sh/experiments/chromium-command-line-switches/ for a list of possible parameters.', type: 'string', default: '', - } - ] -} + }, + ], +}; export const browserlessPageOptionsFileds: INodeProperties = { displayName: 'Additional Options', @@ -399,7 +399,7 @@ export const browserlessPageOptionsFileds: INodeProperties = { gotoOptions: { 'timeout': 0, 'waitUntil': 'load', - } + }, }, typeOptions: { multipleValues: false, diff --git a/nodes/Browserless/GenericFunctions.ts b/nodes/Browserless/GenericFunctions.ts index 8d239d7..1059cf1 100644 --- a/nodes/Browserless/GenericFunctions.ts +++ b/nodes/Browserless/GenericFunctions.ts @@ -150,7 +150,7 @@ export async function browserlessApiRequestScrape( encoding: 'arraybuffer', json: false, returnFullResponse: true, - timeout + timeout, }) as IN8nHttpFullResponse; const binaryData = await prepareBinaryResponse.call(this, response, 'data.pdf'); return binaryData; @@ -196,7 +196,7 @@ export function getCommonOptions(this: IExecuteFunctions, i: number) { options['setExtraHTTPHeaders'].push({ name: 'Cache-Control', - value: 'no-cache' + value: 'no-cache', }); if(options['addScriptTag']) { @@ -221,7 +221,7 @@ export function getNodeCommoonOptions(this: IExecuteFunctions): BrowserlessCommo const browserOptionsRaw = this.getNodeParameter('browserOptions', 0) as any; const browserOptions = parseBrowserOptions(browserOptionsRaw); return { - browserOptions + browserOptions, }; } diff --git a/nodes/Browserless/__test__/GenericFunctions.test.ts b/nodes/Browserless/__test__/GenericFunctions.test.ts index be23cbd..8cdb9f5 100644 --- a/nodes/Browserless/__test__/GenericFunctions.test.ts +++ b/nodes/Browserless/__test__/GenericFunctions.test.ts @@ -49,9 +49,9 @@ describe('parseFixedCollectionOptions', () => { "gotoOptions": { "gotoOptions": { "timeout": 0, - "waitUntil": "load" - } - } + "waitUntil": "load", + }, + }, }; const parsedFixedCollectionOptions = parseCollectionOptions(browserlessPageOptionsFileds, collectionOptions); @@ -65,8 +65,8 @@ describe('parseFixedCollectionOptions', () => { expect(results.value).toMatchSnapshot({ gotoOptions: { "timeout": 0, - "waitUntil": "load" - } - }) + "waitUntil": "load", + }, + }); }); }); diff --git a/nodes/Browserless/types.ts b/nodes/Browserless/types.ts index 287df96..8227c14 100644 --- a/nodes/Browserless/types.ts +++ b/nodes/Browserless/types.ts @@ -26,11 +26,11 @@ export type BrowserlessBrowserOptions = { trackingId?: string; keepalive?: number; flags?: string; -} +}; export type BrowserlessCommonOptions = { browserOptions: BrowserlessBrowserOptions; -} +}; export type browserlessApiRequestOptions = { common: BrowserlessCommonOptions;