refactor: Run lintfix (no-changelog) (#7537)

- Fix autofixable violations
- Remove unused directives
- Allow for PascalCased variables - needed for dynamically imported or
assigned classes, decorators, routers, etc.
This commit is contained in:
Iván Ovejero
2023-10-27 14:15:02 +02:00
committed by GitHub
parent 1c4ac02db5
commit 62c096710f
477 changed files with 706 additions and 1003 deletions

View File

@@ -1,12 +1,10 @@
import { createMockExecuteFunction } from '@test/nodes/Helpers';
import type { IDataObject, INode } from 'n8n-workflow';
import mysql2 from 'mysql2/promise';
import { configureQueryRunner } from '../../v2/helpers/utils';
import type { Mysql2Pool, QueryRunner } from '../../v2/helpers/interfaces';
import { BATCH_MODE } from '../../v2/helpers/interfaces';
import type { IDataObject, INode } from 'n8n-workflow';
import mysql2 from 'mysql2/promise';
import { createMockExecuteFunction } from '@test/nodes/Helpers';
const mySqlMockNode: INode = {
id: '1',

View File

@@ -1,12 +1,12 @@
import type { INodeProperties } from 'n8n-workflow';
import { tableRLC } from '../common.descriptions';
import * as deleteTable from './deleteTable.operation';
import * as executeQuery from './executeQuery.operation';
import * as insert from './insert.operation';
import * as select from './select.operation';
import * as update from './update.operation';
import * as upsert from './upsert.operation';
import { tableRLC } from '../common.descriptions';
export { deleteTable, executeQuery, insert, select, update, upsert };

View File

@@ -13,8 +13,6 @@ import type {
WhereClause,
} from '../../helpers/interfaces';
import { updateDisplayOptions } from '@utils/utilities';
import { addWhereClauses } from '../../helpers/utils';
import {
@@ -22,6 +20,7 @@ import {
selectRowsFixedCollection,
combineConditionsCollection,
} from '../common.descriptions';
import { updateDisplayOptions } from '@utils/utilities';
const properties: INodeProperties[] = [
{

View File

@@ -14,11 +14,10 @@ import type {
import { AUTO_MAP, BATCH_MODE, DATA_MODE } from '../../helpers/interfaces';
import { updateDisplayOptions } from '@utils/utilities';
import { replaceEmptyStringsByNulls } from '../../helpers/utils';
import { optionsCollection } from '../common.descriptions';
import { updateDisplayOptions } from '@utils/utilities';
const properties: INodeProperties[] = [
{

View File

@@ -13,8 +13,6 @@ import type {
WhereClause,
} from '../../helpers/interfaces';
import { updateDisplayOptions } from '@utils/utilities';
import { addSortRules, addWhereClauses } from '../../helpers/utils';
import {
@@ -23,6 +21,7 @@ import {
selectRowsFixedCollection,
combineConditionsCollection,
} from '../common.descriptions';
import { updateDisplayOptions } from '@utils/utilities';
const properties: INodeProperties[] = [
{

View File

@@ -8,11 +8,10 @@ import type {
import type { QueryRunner, QueryValues, QueryWithValues } from '../../helpers/interfaces';
import { AUTO_MAP, DATA_MODE } from '../../helpers/interfaces';
import { updateDisplayOptions } from '@utils/utilities';
import { replaceEmptyStringsByNulls } from '../../helpers/utils';
import { optionsCollection } from '../common.descriptions';
import { updateDisplayOptions } from '@utils/utilities';
const properties: INodeProperties[] = [
{

View File

@@ -8,11 +8,10 @@ import type {
import type { QueryRunner, QueryValues, QueryWithValues } from '../../helpers/interfaces';
import { AUTO_MAP, DATA_MODE } from '../../helpers/interfaces';
import { updateDisplayOptions } from '@utils/utilities';
import { replaceEmptyStringsByNulls } from '../../helpers/utils';
import { optionsCollection } from '../common.descriptions';
import { updateDisplayOptions } from '@utils/utilities';
const properties: INodeProperties[] = [
{

View File

@@ -3,13 +3,12 @@ import { NodeOperationError } from 'n8n-workflow';
import { Client } from 'ssh2';
import type { MySqlType } from './node.type';
import type { QueryRunner } from '../helpers/interfaces';
import * as database from './database/Database.resource';
import { createPool } from '../transport';
import { configureQueryRunner } from '../helpers/utils';
import * as database from './database/Database.resource';
import type { MySqlType } from './node.type';
export async function router(this: IExecuteFunctions): Promise<INodeExecutionData[][]> {
let returnData: INodeExecutionData[] = [];

View File

@@ -9,6 +9,7 @@ import type {
import { NodeOperationError } from 'n8n-workflow';
import { generatePairedItemData } from '../../../../utils/utilities';
import type {
Mysql2Pool,
QueryMode,
@@ -19,7 +20,6 @@ import type {
} from './interfaces';
import { BATCH_MODE } from './interfaces';
import { generatePairedItemData } from '../../../../utils/utilities';
export const prepareQueryAndReplacements = (rawQuery: string, replacements?: QueryValues) => {
if (replacements === undefined) {

View File

@@ -5,9 +5,8 @@ import type {
INodeCredentialTestResult,
} from 'n8n-workflow';
import { createPool } from '../transport';
import { Client } from 'ssh2';
import { createPool } from '../transport';
export async function mysqlConnectionTest(
this: ICredentialTestFunctions,

View File

@@ -1,7 +1,6 @@
import type { IDataObject, ILoadOptionsFunctions, INodeListSearchResult } from 'n8n-workflow';
import { createPool } from '../transport';
import { Client } from 'ssh2';
import { createPool } from '../transport';
export async function searchTables(this: ILoadOptionsFunctions): Promise<INodeListSearchResult> {
const credentials = await this.getCredentials('mySql');

View File

@@ -1,7 +1,6 @@
import type { IDataObject, ILoadOptionsFunctions, INodePropertyOptions } from 'n8n-workflow';
import { createPool } from '../transport';
import { Client } from 'ssh2';
import { createPool } from '../transport';
export async function getColumns(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]> {
const credentials = await this.getCredentials('mySql');

View File

@@ -1,10 +1,10 @@
import type { ICredentialDataDecryptedObject, IDataObject } from 'n8n-workflow';
import { formatPrivateKey } from '@utils/utilities';
import mysql2 from 'mysql2/promise';
import type { Client, ConnectConfig } from 'ssh2';
import type { Mysql2Pool } from '../helpers/interfaces';
import { formatPrivateKey } from '@utils/utilities';
async function createSshConnectConfig(credentials: IDataObject) {
if (credentials.sshAuthenticateWith === 'password') {