mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 10:02:05 +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:
@@ -37,8 +37,8 @@
|
||||
"@types/luxon": "^2.0.9",
|
||||
"@types/node": "^16.11.22",
|
||||
"@types/xml2js": "^0.4.3",
|
||||
"@typescript-eslint/eslint-plugin": "^4.29.0",
|
||||
"@typescript-eslint/parser": "^4.29.0",
|
||||
"@typescript-eslint/eslint-plugin": "^5.0.0",
|
||||
"@typescript-eslint/parser": "^5.0.0",
|
||||
"eslint": "^7.32.0",
|
||||
"eslint-config-airbnb-typescript": "^12.3.1",
|
||||
"eslint-config-prettier": "^8.3.0",
|
||||
@@ -48,7 +48,6 @@
|
||||
"jest-environment-jsdom": "^27.5.1",
|
||||
"prettier": "^2.3.2",
|
||||
"ts-jest": "^27.1.3",
|
||||
"tslint": "^6.1.2",
|
||||
"typescript": "~4.6.0"
|
||||
},
|
||||
"dependencies": {
|
||||
|
||||
@@ -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