mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-18 02:21:13 +00:00
chore: Upgrade nodelinter to 1.16.3 (#11286)
This commit is contained in:
@@ -37,7 +37,7 @@ export function mapItemsNotDefinedErrorIfNeededForRunForAll(code: string, error:
|
||||
// anticipate user expecting `items` to pre-exist as in Function Item node
|
||||
if (error.message === 'items is not defined' && !/(let|const|var) +items +=/.test(code)) {
|
||||
const quoted = error.message.replace('items', '`items`');
|
||||
error.message = (quoted as string) + '. Did you mean `$input.all()`?';
|
||||
error.message = quoted + '. Did you mean `$input.all()`?';
|
||||
}
|
||||
}
|
||||
|
||||
@@ -49,6 +49,6 @@ export function mapItemNotDefinedErrorIfNeededForRunForEach(code: string, error:
|
||||
// anticipate user expecting `items` to pre-exist as in Function Item node
|
||||
if (error.message === 'item is not defined' && !/(let|const|var) +item +=/.test(code)) {
|
||||
const quoted = error.message.replace('item', '`item`');
|
||||
error.message = (quoted as string) + '. Did you mean `$input.item.json`?';
|
||||
error.message = quoted + '. Did you mean `$input.item.json`?';
|
||||
}
|
||||
}
|
||||
|
||||
@@ -277,7 +277,6 @@ export class DebugHelper implements INodeType {
|
||||
message: throwErrorMessage,
|
||||
});
|
||||
case 'Error':
|
||||
// eslint-disable-next-line n8n-nodes-base/node-execute-block-wrong-error-thrown
|
||||
throw new ApplicationError(throwErrorMessage);
|
||||
default:
|
||||
break;
|
||||
|
||||
@@ -677,7 +677,6 @@ export class EmailReadImapV2 implements INodeType {
|
||||
if (connection.closeBox) await connection.closeBox(false);
|
||||
connection.end();
|
||||
} catch (error) {
|
||||
// eslint-disable-next-line n8n-nodes-base/node-execute-block-wrong-error-thrown
|
||||
throw new TriggerCloseError(this.getNode(), { cause: error as Error, level: 'warning' });
|
||||
}
|
||||
};
|
||||
|
||||
@@ -230,7 +230,7 @@ export async function execute(
|
||||
const sheetNameWithRangeForKeyRow = `${sheetNameForKeyRow}!1:${keyRowIndex}`;
|
||||
const sheetData = await sheet.getData(sheetNameWithRangeForKeyRow, 'FORMATTED_VALUE');
|
||||
|
||||
if (sheetData === undefined || !sheetData.length) {
|
||||
if (!sheetData?.length) {
|
||||
dataMode = 'autoMapInputData';
|
||||
}
|
||||
|
||||
|
||||
@@ -1056,10 +1056,10 @@ export class InvoiceNinja implements INodeType {
|
||||
const paymentId = this.getNodeParameter('paymentId', i) as string;
|
||||
const body: IBankTransaction = {};
|
||||
if (bankTransactionId) {
|
||||
body.id = bankTransactionId as string;
|
||||
body.id = bankTransactionId;
|
||||
}
|
||||
if (paymentId) {
|
||||
body.paymentId = paymentId as string;
|
||||
body.paymentId = paymentId;
|
||||
}
|
||||
responseData = await invoiceNinjaApiRequest.call(
|
||||
this,
|
||||
|
||||
@@ -229,7 +229,6 @@ export class Kafka implements INodeType {
|
||||
};
|
||||
if (credentials.authentication === true) {
|
||||
if (!(credentials.username && credentials.password)) {
|
||||
// eslint-disable-next-line n8n-nodes-base/node-execute-block-wrong-error-thrown
|
||||
throw new ApplicationError('Username and password are required for authentication', {
|
||||
level: 'warning',
|
||||
});
|
||||
|
||||
@@ -81,7 +81,6 @@ export class MongoDb implements INodeType {
|
||||
const { databases } = await client.db().admin().listDatabases();
|
||||
|
||||
if (!(databases as IDataObject[]).map((db) => db.name).includes(database)) {
|
||||
// eslint-disable-next-line n8n-nodes-base/node-execute-block-wrong-error-thrown
|
||||
throw new ApplicationError(`Database "${database}" does not exist`, {
|
||||
level: 'warning',
|
||||
});
|
||||
|
||||
@@ -290,7 +290,7 @@ export class PostgresTrigger implements INodeType {
|
||||
await connection.query('SELECT 1');
|
||||
} catch {
|
||||
// connection already closed. Can't perform cleanup
|
||||
// eslint-disable-next-line n8n-nodes-base/node-execute-block-wrong-error-thrown
|
||||
|
||||
throw new TriggerCloseError(this.getNode(), { level: 'warning' });
|
||||
}
|
||||
|
||||
@@ -316,7 +316,6 @@ export class PostgresTrigger implements INodeType {
|
||||
]);
|
||||
}
|
||||
} catch (error) {
|
||||
// eslint-disable-next-line n8n-nodes-base/node-execute-block-wrong-error-thrown
|
||||
throw new TriggerCloseError(this.getNode(), { cause: error as Error, level: 'error' });
|
||||
}
|
||||
} finally {
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
/* eslint-disable n8n-nodes-base/node-filename-against-convention */
|
||||
import { NodeConnectionType } from 'n8n-workflow';
|
||||
import type {
|
||||
INodeTypeBaseDescription,
|
||||
|
||||
@@ -840,7 +840,7 @@
|
||||
"@types/ssh2-sftp-client": "^5.1.0",
|
||||
"@types/uuid": "catalog:",
|
||||
"@types/xml2js": "catalog:",
|
||||
"eslint-plugin-n8n-nodes-base": "^1.16.2",
|
||||
"eslint-plugin-n8n-nodes-base": "^1.16.3",
|
||||
"n8n-core": "workspace:*"
|
||||
},
|
||||
"dependencies": {
|
||||
|
||||
Reference in New Issue
Block a user