mirror of
https://github.com/n8n-io/n8n.git
synced 2024-11-09 22:24:05 -08:00
refactor: Remove unused vars to fix build (no-changelog) (#4584)
* 🔥 Remove unused vars to fix build * 👕 Make unused vars severity conditional
This commit is contained in:
parent
277b6b73c3
commit
52f38df867
2
.github/workflows/ci-master.yml
vendored
2
.github/workflows/ci-master.yml
vendored
|
@ -41,4 +41,6 @@ jobs:
|
|||
pnpm test:e2e:ci:smoke
|
||||
|
||||
- name: Lint
|
||||
env:
|
||||
CI_LINT_MASTER: true
|
||||
run: pnpm lint
|
||||
|
|
|
@ -359,12 +359,10 @@ const config = (module.exports = {
|
|||
|
||||
/**
|
||||
* https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/no-unused-vars.md
|
||||
*
|
||||
* Disabled because eslint-plugin-diff fails to catch it. TODO: Revisit.
|
||||
*/
|
||||
'no-unused-vars': 'off',
|
||||
'@typescript-eslint/no-unused-vars': [
|
||||
'error',
|
||||
process.env.CI_LINT_MASTER ? 'warn' : 'error',
|
||||
{
|
||||
argsIgnorePattern: '^_',
|
||||
destructuredArrayIgnorePattern: '^_',
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { IExecuteFunctions } from 'n8n-core';
|
||||
|
||||
import { IDataObject, ILoadOptionsFunctions, NodeApiError } from 'n8n-workflow';
|
||||
import { IDataObject, ILoadOptionsFunctions } from 'n8n-workflow';
|
||||
|
||||
import { OptionsWithUri } from 'request';
|
||||
|
||||
|
|
|
@ -7,7 +7,6 @@ import {
|
|||
IDataObject,
|
||||
ILoadOptionsFunctions,
|
||||
INodeExecutionData,
|
||||
NodeApiError,
|
||||
} from 'n8n-workflow';
|
||||
|
||||
interface IAttachment {
|
||||
|
|
|
@ -7,8 +7,7 @@ import {
|
|||
IWebhookFunctions,
|
||||
} from 'n8n-core';
|
||||
|
||||
|
||||
import { IHttpRequestOptions, NodeApiError } from 'n8n-workflow';
|
||||
import { IHttpRequestOptions } from 'n8n-workflow';
|
||||
|
||||
export async function awsApiRequest(
|
||||
this: IHookFunctions | IExecuteFunctions | ILoadOptionsFunctions | IWebhookFunctions,
|
||||
|
|
|
@ -9,7 +9,7 @@ import {
|
|||
IWebhookFunctions,
|
||||
} from 'n8n-core';
|
||||
|
||||
import { IDataObject, IHttpRequestOptions, NodeApiError } from 'n8n-workflow';
|
||||
import { IDataObject, IHttpRequestOptions } from 'n8n-workflow';
|
||||
|
||||
import { pascalCase } from 'change-case';
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@ import {
|
|||
IWebhookFunctions,
|
||||
} from 'n8n-core';
|
||||
|
||||
import { IDataObject, IHttpRequestOptions, JsonObject, NodeApiError } from 'n8n-workflow';
|
||||
import { IDataObject, IHttpRequestOptions } from 'n8n-workflow';
|
||||
|
||||
export async function awsApiRequest(
|
||||
this: IHookFunctions | IExecuteFunctions | ILoadOptionsFunctions | IWebhookFunctions,
|
||||
|
|
|
@ -2,7 +2,7 @@ import { OptionsWithUri } from 'request';
|
|||
|
||||
import { IExecuteFunctions, ILoadOptionsFunctions } from 'n8n-core';
|
||||
|
||||
import { IDataObject, IHookFunctions, IWebhookFunctions, NodeApiError } from 'n8n-workflow';
|
||||
import { IDataObject, IHookFunctions, IWebhookFunctions } from 'n8n-workflow';
|
||||
|
||||
const BEEMINDER_URI = 'https://www.beeminder.com/api/v1';
|
||||
|
||||
|
|
|
@ -8,7 +8,6 @@ import {
|
|||
IDataObject,
|
||||
IHookFunctions,
|
||||
IWebhookFunctions,
|
||||
NodeApiError,
|
||||
} from 'n8n-workflow';
|
||||
|
||||
export async function calendlyApiRequest(
|
||||
|
|
|
@ -2,7 +2,7 @@ import { OptionsWithUri } from 'request';
|
|||
|
||||
import { IExecuteFunctions, ILoadOptionsFunctions, IPollFunctions } from 'n8n-core';
|
||||
|
||||
import { IDataObject, NodeApiError } from 'n8n-workflow';
|
||||
import { IDataObject } from 'n8n-workflow';
|
||||
|
||||
export async function clockifyApiRequest(
|
||||
this: ILoadOptionsFunctions | IPollFunctions | IExecuteFunctions,
|
||||
|
|
|
@ -7,7 +7,7 @@ import {
|
|||
ILoadOptionsFunctions,
|
||||
} from 'n8n-core';
|
||||
|
||||
import { IDataObject, NodeApiError } from 'n8n-workflow';
|
||||
import { IDataObject } from 'n8n-workflow';
|
||||
|
||||
import moment from 'moment';
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { IExecuteFunctions, IHookFunctions, ILoadOptionsFunctions } from 'n8n-core';
|
||||
|
||||
import { IDataObject, IHttpRequestMethods, IHttpRequestOptions, NodeApiError } from 'n8n-workflow';
|
||||
import { IDataObject, IHttpRequestMethods, IHttpRequestOptions } from 'n8n-workflow';
|
||||
|
||||
import { get } from 'lodash';
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { IExecuteFunctions, IHookFunctions } from 'n8n-core';
|
||||
|
||||
import { IDataObject, ILoadOptionsFunctions, NodeApiError } from 'n8n-workflow';
|
||||
import { IDataObject, ILoadOptionsFunctions } from 'n8n-workflow';
|
||||
|
||||
import { OptionsWithUri } from 'request';
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@ import {
|
|||
ILoadOptionsFunctions,
|
||||
} from 'n8n-core';
|
||||
|
||||
import { IDataObject, JsonObject, NodeApiError } from 'n8n-workflow';
|
||||
import { IDataObject } from 'n8n-workflow';
|
||||
|
||||
export async function ghostApiRequest(
|
||||
this: IHookFunctions | IExecuteFunctions | IExecuteSingleFunctions | ILoadOptionsFunctions,
|
||||
|
|
|
@ -7,7 +7,7 @@ import {
|
|||
ILoadOptionsFunctions,
|
||||
} from 'n8n-core';
|
||||
|
||||
import { IDataObject, JsonObject, NodeApiError } from 'n8n-workflow';
|
||||
import { IDataObject } from 'n8n-workflow';
|
||||
|
||||
export async function jiraSoftwareCloudApiRequest(
|
||||
this: IHookFunctions | IExecuteFunctions | IExecuteSingleFunctions | ILoadOptionsFunctions,
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { IExecuteFunctions, IHookFunctions } from 'n8n-core';
|
||||
|
||||
import { IDataObject, ILoadOptionsFunctions, NodeApiError } from 'n8n-workflow';
|
||||
import { IDataObject, ILoadOptionsFunctions } from 'n8n-workflow';
|
||||
|
||||
import { OptionsWithUri } from 'request';
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@ import { OptionsWithUri } from 'request';
|
|||
|
||||
import { IExecuteFunctions, IExecuteSingleFunctions, ILoadOptionsFunctions } from 'n8n-core';
|
||||
|
||||
import { IDataObject, IHookFunctions, JsonObject, NodeApiError } from 'n8n-workflow';
|
||||
import { IDataObject, IHookFunctions } from 'n8n-workflow';
|
||||
|
||||
export async function mailjetApiRequest(
|
||||
this: IExecuteFunctions | IExecuteSingleFunctions | IHookFunctions | ILoadOptionsFunctions,
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
import { IExecuteFunctions, IHookFunctions } from 'n8n-core';
|
||||
|
||||
import { JsonObject, NodeApiError } from 'n8n-workflow';
|
||||
|
||||
import { OptionsWithUri } from 'request';
|
||||
|
||||
/**
|
||||
|
|
|
@ -8,7 +8,6 @@ import {
|
|||
INodeExecutionData,
|
||||
IPollFunctions,
|
||||
jsonParse,
|
||||
NodeApiError,
|
||||
NodeOperationError,
|
||||
} from 'n8n-workflow';
|
||||
|
||||
|
|
|
@ -1,13 +1,6 @@
|
|||
import { IPollFunctions } from 'n8n-core';
|
||||
|
||||
import {
|
||||
IDataObject,
|
||||
ILoadOptionsFunctions,
|
||||
INodeExecutionData,
|
||||
INodePropertyOptions,
|
||||
INodeType,
|
||||
INodeTypeDescription,
|
||||
} from 'n8n-workflow';
|
||||
import { IDataObject, INodeExecutionData, INodeType, INodeTypeDescription } from 'n8n-workflow';
|
||||
|
||||
import { notionApiRequest, simplifyObjects } from './GenericFunctions';
|
||||
|
||||
|
@ -89,14 +82,15 @@ export class NotionTrigger implements INodeType {
|
|||
type: 'regex',
|
||||
properties: {
|
||||
regex:
|
||||
'(?:https|http):\/\/www.notion.so\/(?:[a-z0-9\-]{2,}\/)?([0-9a-f]{8}[0-9a-f]{4}4[0-9a-f]{3}[89ab][0-9a-f]{3}[0-9a-f]{12}).*',
|
||||
'(?:https|http)://www.notion.so/(?:[a-z0-9-]{2,}/)?([0-9a-f]{8}[0-9a-f]{4}4[0-9a-f]{3}[89ab][0-9a-f]{3}[0-9a-f]{12}).*',
|
||||
errorMessage: 'Not a valid Notion Database URL',
|
||||
},
|
||||
},
|
||||
],
|
||||
extractValue: {
|
||||
type: 'regex',
|
||||
regex: '(?:https|http):\/\/www.notion.so\/(?:[a-z0-9\-]{2,}\/)?([0-9a-f]{8}[0-9a-f]{4}4[0-9a-f]{3}[89ab][0-9a-f]{3}[0-9a-f]{12})',
|
||||
regex:
|
||||
'(?:https|http)://www.notion.so/(?:[a-z0-9-]{2,}/)?([0-9a-f]{8}[0-9a-f]{4}4[0-9a-f]{3}[89ab][0-9a-f]{3}[0-9a-f]{12})',
|
||||
},
|
||||
},
|
||||
{
|
||||
|
@ -108,7 +102,8 @@ export class NotionTrigger implements INodeType {
|
|||
{
|
||||
type: 'regex',
|
||||
properties: {
|
||||
regex: '^(([0-9a-f]{8}[0-9a-f]{4}4[0-9a-f]{3}[89ab][0-9a-f]{3}[0-9a-f]{12})|([0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}))[ \t]*',
|
||||
regex:
|
||||
'^(([0-9a-f]{8}[0-9a-f]{4}4[0-9a-f]{3}[89ab][0-9a-f]{3}[0-9a-f]{12})|([0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}))[ \t]*',
|
||||
errorMessage: 'Not a valid Notion Database ID',
|
||||
},
|
||||
},
|
||||
|
@ -125,7 +120,7 @@ export class NotionTrigger implements INodeType {
|
|||
event: ['pageAddedToDatabase', 'pagedUpdatedInDatabase'],
|
||||
},
|
||||
},
|
||||
description: "The Notion Database to operate on",
|
||||
description: 'The Notion Database to operate on',
|
||||
},
|
||||
{
|
||||
displayName: 'Simplify',
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
import { OptionsWithUri } from 'request';
|
||||
|
||||
import { IExecuteFunctions, ILoadOptionsFunctions } from 'n8n-core';
|
||||
import { NodeApiError } from 'n8n-workflow';
|
||||
|
||||
export async function rocketchatApiRequest(
|
||||
this: IExecuteFunctions | ILoadOptionsFunctions,
|
||||
|
|
|
@ -6,7 +6,7 @@ import {
|
|||
ILoadOptionsFunctions,
|
||||
IWebhookFunctions,
|
||||
} from 'n8n-core';
|
||||
import { IDataObject, NodeApiError } from 'n8n-workflow';
|
||||
import { IDataObject } from 'n8n-workflow';
|
||||
|
||||
export async function segmentApiRequest(
|
||||
this:
|
||||
|
|
|
@ -7,7 +7,7 @@ import {
|
|||
ILoadOptionsFunctions,
|
||||
} from 'n8n-core';
|
||||
|
||||
import { IDataObject, NodeApiError } from 'n8n-workflow';
|
||||
import { IDataObject } from 'n8n-workflow';
|
||||
|
||||
export async function sendGridApiRequest(
|
||||
this: IHookFunctions | IExecuteFunctions | IExecuteSingleFunctions | ILoadOptionsFunctions,
|
||||
|
|
|
@ -7,7 +7,7 @@ import {
|
|||
ILoadOptionsFunctions,
|
||||
} from 'n8n-core';
|
||||
|
||||
import { IDataObject, IOAuth2Options, NodeApiError } from 'n8n-workflow';
|
||||
import { IDataObject, IOAuth2Options } from 'n8n-workflow';
|
||||
|
||||
import { snakeCase } from 'change-case';
|
||||
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
import { IExecuteFunctions, IHookFunctions } from 'n8n-core';
|
||||
|
||||
import { NodeApiError } from 'n8n-workflow';
|
||||
|
||||
import { flow, isEmpty, omit } from 'lodash';
|
||||
|
||||
import { IDataObject, ILoadOptionsFunctions, INodePropertyOptions } from 'n8n-workflow';
|
||||
|
|
|
@ -2,7 +2,7 @@ import { OptionsWithUri } from 'request';
|
|||
|
||||
import { IExecuteFunctions, IHookFunctions, ILoadOptionsFunctions } from 'n8n-core';
|
||||
|
||||
import { IDataObject, jsonParse, NodeApiError } from 'n8n-workflow';
|
||||
import { IDataObject, jsonParse } from 'n8n-workflow';
|
||||
|
||||
import moment from 'moment';
|
||||
import { Eq } from './QueryFunctions';
|
||||
|
|
|
@ -2,7 +2,7 @@ import { IExecuteFunctions, IHookFunctions, ILoadOptionsFunctions } from 'n8n-co
|
|||
|
||||
import { OptionsWithUri } from 'request';
|
||||
|
||||
import { IDataObject, JsonObject, NodeApiError } from 'n8n-workflow';
|
||||
import { IDataObject } from 'n8n-workflow';
|
||||
|
||||
/**
|
||||
* Make an API request to Trello
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
import { IExecuteFunctions, IHookFunctions, ILoadOptionsFunctions } from 'n8n-core';
|
||||
import { NodeApiError } from 'n8n-workflow';
|
||||
|
||||
import { OptionsWithUri } from 'request';
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { IExecuteFunctions, IHookFunctions } from 'n8n-core';
|
||||
|
||||
import { IDataObject, NodeApiError } from 'n8n-workflow';
|
||||
import { IDataObject } from 'n8n-workflow';
|
||||
|
||||
import { OptionsWithUri } from 'request';
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@ import { OptionsWithUri } from 'request';
|
|||
|
||||
import { IExecuteFunctions } from 'n8n-core';
|
||||
|
||||
import { IDataObject, NodeApiError } from 'n8n-workflow';
|
||||
import { IDataObject } from 'n8n-workflow';
|
||||
|
||||
export async function urlScanIoApiRequest(
|
||||
this: IExecuteFunctions,
|
||||
|
|
|
@ -7,7 +7,7 @@ import {
|
|||
IWebhookFunctions,
|
||||
} from 'n8n-core';
|
||||
|
||||
import { IDataObject, NodeApiError } from 'n8n-workflow';
|
||||
import { IDataObject } from 'n8n-workflow';
|
||||
|
||||
export async function webflowApiRequest(
|
||||
this: IHookFunctions | IExecuteFunctions | ILoadOptionsFunctions | IWebhookFunctions,
|
||||
|
|
|
@ -2,7 +2,7 @@ import { IExecuteFunctions, IHookFunctions, ILoadOptionsFunctions } from 'n8n-co
|
|||
|
||||
import { OptionsWithUri } from 'request';
|
||||
|
||||
import { IDataObject, JsonObject, NodeApiError, NodeOperationError } from 'n8n-workflow';
|
||||
import { IDataObject } from 'n8n-workflow';
|
||||
|
||||
export async function apiRequest(
|
||||
this: IHookFunctions | IExecuteFunctions | ILoadOptionsFunctions,
|
||||
|
|
|
@ -8,7 +8,7 @@ import {
|
|||
IWebhookFunctions,
|
||||
} from 'n8n-core';
|
||||
|
||||
import { ICredentialDataDecryptedObject, IDataObject, NodeApiError } from 'n8n-workflow';
|
||||
import { ICredentialDataDecryptedObject, IDataObject } from 'n8n-workflow';
|
||||
|
||||
import { ICouponLine, IFeeLine, ILineItem, IShoppingLine } from './OrderInterface';
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@ import {
|
|||
ILoadOptionsFunctions,
|
||||
} from 'n8n-core';
|
||||
|
||||
import { IDataObject, JsonObject, NodeApiError } from 'n8n-workflow';
|
||||
import { IDataObject } from 'n8n-workflow';
|
||||
|
||||
export async function wufooApiRequest(
|
||||
this: IHookFunctions | IExecuteFunctions | IExecuteSingleFunctions | ILoadOptionsFunctions,
|
||||
|
|
|
@ -7,7 +7,7 @@ import {
|
|||
ILoadOptionsFunctions,
|
||||
} from 'n8n-core';
|
||||
|
||||
import { IDataObject, JsonObject, NodeApiError } from 'n8n-workflow';
|
||||
import { IDataObject } from 'n8n-workflow';
|
||||
|
||||
export async function zendeskApiRequest(
|
||||
this: IHookFunctions | IExecuteFunctions | IExecuteSingleFunctions | ILoadOptionsFunctions,
|
||||
|
|
Loading…
Reference in a new issue