mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-18 18:41:14 +00:00
refactor: Upgrade to ESLint 8 (#3722)
* ⬆️ Upgrade to ESLint 8 * 📦 Update package-lock.json * 👕 Add lint exceptions * 👕 Add more lint exceptions * ➖ Remove `tslint` from some packages * 👕 Except init file * 📦 Update `package-lock.json` * 📦 Update `package-lock.json` * 👕 Add exceptions to new lines coming from `master ` Co-authored-by: Jan Oberhauser <jan.oberhauser@gmail.com>
This commit is contained in:
@@ -273,6 +273,7 @@ export class Expression {
|
||||
throw new Error('Expression resolved to a function. Please add "()"');
|
||||
} else if (returnValue !== null && typeof returnValue === 'object') {
|
||||
if (returnObjectAsString) {
|
||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
|
||||
return this.convertObjectValueToString(returnValue);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
/* eslint-disable @typescript-eslint/naming-convention */
|
||||
/* eslint-disable @typescript-eslint/no-shadow */
|
||||
/* eslint-disable @typescript-eslint/no-unsafe-call */
|
||||
/* eslint-disable no-param-reassign */
|
||||
@@ -180,6 +181,7 @@ abstract class NodeError extends ExecutionBaseError {
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
protected isTraversableObject(value: any): value is JsonObject {
|
||||
return (
|
||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
|
||||
value && typeof value === 'object' && !Array.isArray(value) && !!Object.keys(value).length
|
||||
);
|
||||
}
|
||||
@@ -322,9 +324,10 @@ export class NodeApiError extends NodeError {
|
||||
parseString(xml, { explicitArray: false }, (_, result) => {
|
||||
if (!result) return;
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
|
||||
const topLevelKey = Object.keys(result)[0];
|
||||
this.description = this.findProperty(
|
||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
|
||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-argument
|
||||
result[topLevelKey],
|
||||
ERROR_MESSAGE_PROPERTIES,
|
||||
['Error'].concat(ERROR_NESTING_PROPERTIES),
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
/* eslint-disable @typescript-eslint/no-unsafe-argument */
|
||||
/* eslint-disable @typescript-eslint/no-unsafe-call */
|
||||
/* eslint-disable @typescript-eslint/no-unsafe-return */
|
||||
/* eslint-disable @typescript-eslint/no-unsafe-member-access */
|
||||
|
||||
@@ -61,6 +61,7 @@ export function create(
|
||||
depth === 0 &&
|
||||
target[name.toString()] === undefined &&
|
||||
typeof value === 'object' &&
|
||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
|
||||
Object.keys(value).length === 0
|
||||
// eslint-disable-next-line no-empty
|
||||
) {
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
/* eslint-disable @typescript-eslint/no-unsafe-argument */
|
||||
/* eslint-disable @typescript-eslint/no-unsafe-call */
|
||||
/* eslint-disable @typescript-eslint/no-non-null-assertion */
|
||||
/* eslint-disable import/no-cycle */
|
||||
|
||||
Reference in New Issue
Block a user