mirror of
https://github.com/n8n-io/n8n.git
synced 2024-12-25 04:34:06 -08: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:
parent
8be36c261b
commit
f9f05621a1
|
@ -13,6 +13,7 @@ module.exports = {
|
|||
sourceType: 'module',
|
||||
},
|
||||
ignorePatterns: [
|
||||
'n8n',
|
||||
'.eslintrc.js',
|
||||
'**/*.js',
|
||||
'**/node_modules/**',
|
||||
|
|
3950
package-lock.json
generated
3950
package-lock.json
generated
File diff suppressed because it is too large
Load diff
|
@ -1,13 +1,13 @@
|
|||
#!/usr/bin/env node
|
||||
|
||||
var path = require('path'); // tslint:disable-line:no-var-keyword
|
||||
var path = require('path');
|
||||
|
||||
// Make sure that it also find the config folder when it
|
||||
// did get started from another folder that the root one.
|
||||
process.env.NODE_CONFIG_DIR = process.env.NODE_CONFIG_DIR || path.join(__dirname, 'config');
|
||||
|
||||
// Check if version should be displayed
|
||||
var versionFlags = [ // tslint:disable-line:no-var-keyword
|
||||
var versionFlags = [
|
||||
'-v',
|
||||
'-V',
|
||||
'--version',
|
||||
|
|
|
@ -52,6 +52,7 @@ export class DbRevertMigrationCommand extends Command {
|
|||
if (connection) await connection.close();
|
||||
|
||||
console.error('Error reverting last migration. See log messages for details.');
|
||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
|
||||
logger.error(error.message);
|
||||
this.exit(1);
|
||||
}
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
/* eslint-disable @typescript-eslint/no-unsafe-argument */
|
||||
/* eslint-disable @typescript-eslint/no-unsafe-member-access */
|
||||
/* eslint-disable no-console */
|
||||
import { promises as fs } from 'fs';
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
/* eslint-disable @typescript-eslint/no-unsafe-argument */
|
||||
/* eslint-disable @typescript-eslint/restrict-plus-operands */
|
||||
/* eslint-disable @typescript-eslint/no-unsafe-member-access */
|
||||
/* eslint-disable no-console */
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
/* eslint-disable @typescript-eslint/no-unsafe-argument */
|
||||
/* eslint-disable @typescript-eslint/no-unsafe-member-access */
|
||||
/* eslint-disable no-console */
|
||||
import { Command, flags } from '@oclif/command';
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
/* eslint-disable @typescript-eslint/no-unsafe-argument */
|
||||
/* eslint-disable no-restricted-syntax */
|
||||
/* eslint-disable @typescript-eslint/no-shadow */
|
||||
/* eslint-disable @typescript-eslint/no-unsafe-call */
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
/* eslint-disable @typescript-eslint/no-unsafe-argument */
|
||||
/* eslint-disable no-restricted-syntax */
|
||||
/* eslint-disable @typescript-eslint/restrict-template-expressions */
|
||||
/* eslint-disable @typescript-eslint/no-shadow */
|
||||
|
|
|
@ -327,6 +327,7 @@ export class Start extends Command {
|
|||
if (error.toString().includes('ECONNREFUSED') === true) {
|
||||
logger.warn('Redis unavailable - trying to reconnect...');
|
||||
} else {
|
||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
|
||||
logger.warn('Error with Redis: ', error);
|
||||
}
|
||||
});
|
||||
|
@ -415,6 +416,7 @@ export class Start extends Command {
|
|||
process.stdin.setRawMode(true);
|
||||
process.stdin.resume();
|
||||
process.stdin.setEncoding('utf8');
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||
let inputText = '';
|
||||
|
||||
if (flags.open) {
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
/* eslint-disable @typescript-eslint/no-unsafe-argument */
|
||||
/* eslint-disable @typescript-eslint/no-unsafe-member-access */
|
||||
/* eslint-disable no-console */
|
||||
import { Command, flags } from '@oclif/command';
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
/* eslint-disable @typescript-eslint/no-unsafe-argument */
|
||||
/* eslint-disable no-console */
|
||||
/* eslint-disable @typescript-eslint/no-unsafe-call */
|
||||
/* eslint-disable @typescript-eslint/no-unsafe-member-access */
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
/* eslint-disable @typescript-eslint/no-unsafe-argument */
|
||||
/* eslint-disable no-console */
|
||||
/* eslint-disable @typescript-eslint/no-shadow */
|
||||
/* eslint-disable @typescript-eslint/explicit-module-boundary-types */
|
||||
|
|
1
packages/cli/config/types.d.ts
vendored
1
packages/cli/config/types.d.ts
vendored
|
@ -1,3 +1,4 @@
|
|||
/* eslint-disable @typescript-eslint/naming-convention */
|
||||
/* eslint-disable @typescript-eslint/no-unused-vars */
|
||||
|
||||
import { IBinaryDataConfig } from '../../core/dist/src';
|
||||
|
|
|
@ -93,7 +93,6 @@
|
|||
"supertest": "^6.2.2",
|
||||
"ts-jest": "^27.1.3",
|
||||
"ts-node": "^8.9.1",
|
||||
"tslint": "^6.1.2",
|
||||
"typescript": "~4.6.0"
|
||||
},
|
||||
"dependencies": {
|
||||
|
|
|
@ -121,6 +121,7 @@ export class ActiveWorkflowRunner {
|
|||
workflowName: workflowData.name,
|
||||
workflowId: workflowData.id,
|
||||
});
|
||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
|
||||
this.executeErrorWorkflow(error, workflowData, 'internal');
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
/* eslint-disable @typescript-eslint/no-unsafe-argument */
|
||||
/* eslint-disable @typescript-eslint/no-non-null-assertion */
|
||||
/* eslint-disable no-restricted-syntax */
|
||||
/* eslint-disable @typescript-eslint/no-unsafe-member-access */
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
/* eslint-disable @typescript-eslint/no-unsafe-argument */
|
||||
/* eslint-disable no-underscore-dangle */
|
||||
import { ICredentialDataDecryptedObject } from 'n8n-workflow';
|
||||
|
||||
|
|
|
@ -40,6 +40,7 @@ export class Logger implements ILogger {
|
|||
winston.format.printf(({ level, message, timestamp, metadata }) => {
|
||||
// eslint-disable-next-line @typescript-eslint/restrict-template-expressions
|
||||
return `${timestamp} | ${level.padEnd(18)} | ${message}${
|
||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
|
||||
Object.keys(metadata).length ? ` ${JSON.stringify(inspect(metadata))}` : ''
|
||||
}`;
|
||||
}),
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
/* eslint-disable @typescript-eslint/no-unsafe-argument */
|
||||
import express from 'express';
|
||||
|
||||
import { CredentialsHelper } from '../../../../CredentialsHelper';
|
||||
|
|
|
@ -158,6 +158,7 @@ export function send(processFunction: (req: Request, res: Response) => Promise<a
|
|||
error.message = 'There is already an entry with this name';
|
||||
}
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
|
||||
sendErrorResponse(res, error);
|
||||
}
|
||||
};
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
/* eslint-disable @typescript-eslint/no-unsafe-argument */
|
||||
/* eslint-disable @typescript-eslint/no-unnecessary-boolean-literal-compare */
|
||||
/* eslint-disable @typescript-eslint/no-unnecessary-type-assertion */
|
||||
/* eslint-disable @typescript-eslint/no-use-before-define */
|
||||
|
|
|
@ -254,6 +254,7 @@ export async function compareHash(plaintext: string, hashed: string): Promise<bo
|
|||
'. Comparison against unhashed string. Please check that the value compared against has been hashed.';
|
||||
}
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
|
||||
throw new Error(error);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
/* eslint-disable @typescript-eslint/no-unsafe-argument */
|
||||
/* eslint-disable import/no-cycle */
|
||||
/* eslint-disable @typescript-eslint/no-unsafe-call */
|
||||
/* eslint-disable no-param-reassign */
|
||||
|
@ -125,6 +126,7 @@ export function encodeWebhookResponse(
|
|||
): IExecuteResponsePromiseData {
|
||||
if (typeof response === 'object' && Buffer.isBuffer(response.body)) {
|
||||
response.body = {
|
||||
// eslint-disable-next-line @typescript-eslint/naming-convention
|
||||
'__@N8nEncodedBuffer@__': response.body.toString(BINARY_ENCODING),
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
/* eslint-disable @typescript-eslint/no-unsafe-argument */
|
||||
/* eslint-disable no-console */
|
||||
/* eslint-disable consistent-return */
|
||||
/* eslint-disable @typescript-eslint/restrict-plus-operands */
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
/* eslint-disable @typescript-eslint/no-unsafe-argument */
|
||||
/* eslint-disable import/no-cycle */
|
||||
/* eslint-disable no-restricted-syntax */
|
||||
/* eslint-disable @typescript-eslint/restrict-plus-operands */
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
/* eslint-disable @typescript-eslint/no-unsafe-argument */
|
||||
/* eslint-disable no-restricted-syntax */
|
||||
/* eslint-disable no-console */
|
||||
/* eslint-disable @typescript-eslint/no-non-null-assertion */
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
/* eslint-disable @typescript-eslint/no-unsafe-argument */
|
||||
/* eslint-disable @typescript-eslint/no-unsafe-member-access */
|
||||
/* eslint-disable consistent-return */
|
||||
/* eslint-disable @typescript-eslint/no-unsafe-assignment */
|
||||
|
|
|
@ -83,6 +83,7 @@ credentialsController.get(
|
|||
});
|
||||
}
|
||||
} catch (error) {
|
||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
|
||||
LoggerProxy.error('Request to list credentials failed', error);
|
||||
throw error;
|
||||
}
|
||||
|
|
|
@ -61,7 +61,7 @@ nodesController.post(
|
|||
try {
|
||||
parsedPackageName = parsePackageName(name);
|
||||
} catch (error) {
|
||||
// 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
|
||||
throw new ResponseHelper.ResponseError(error.message, undefined, 400);
|
||||
}
|
||||
|
||||
|
@ -166,14 +166,14 @@ nodesController.get(
|
|||
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access
|
||||
if (error.code === 1) {
|
||||
// Updates available
|
||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access
|
||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-argument
|
||||
pendingUpdates = JSON.parse(error.stdout);
|
||||
}
|
||||
}
|
||||
let hydratedPackages = matchPackagesWithUpdates(packages, pendingUpdates);
|
||||
try {
|
||||
if (config.get('nodes.packagesMissing')) {
|
||||
// eslint-disable-next-line prettier/prettier
|
||||
// eslint-disable-next-line prettier/prettier, @typescript-eslint/no-unsafe-argument
|
||||
hydratedPackages = matchMissingPackages(hydratedPackages, config.get('nodes.packagesMissing'));
|
||||
}
|
||||
} catch (error) {
|
||||
|
|
|
@ -338,6 +338,7 @@ oauth2CredentialController.get(
|
|||
return res.sendFile(pathResolve(__dirname, '../../../templates/oauth-callback.html'));
|
||||
} catch (error) {
|
||||
// Error response
|
||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
|
||||
return ResponseHelper.sendErrorResponse(res, error);
|
||||
}
|
||||
},
|
||||
|
|
|
@ -39,7 +39,6 @@
|
|||
"jest": "^27.4.7",
|
||||
"source-map-support": "^0.5.9",
|
||||
"ts-jest": "^27.1.3",
|
||||
"tslint": "^6.1.2",
|
||||
"typescript": "~4.6.0"
|
||||
},
|
||||
"dependencies": {
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
/* eslint-disable @typescript-eslint/no-unsafe-argument */
|
||||
/* eslint-disable no-continue */
|
||||
/* eslint-disable no-await-in-loop */
|
||||
/* eslint-disable no-restricted-syntax */
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
/* eslint-disable @typescript-eslint/no-unsafe-argument */
|
||||
/* eslint-disable no-lonely-if */
|
||||
/* eslint-disable @typescript-eslint/no-explicit-any */
|
||||
/* eslint-disable no-prototype-builtins */
|
||||
|
@ -955,8 +956,10 @@ export async function requestOAuth2(
|
|||
newRequestOptions?.headers?.Authorization.split(' ')[1];
|
||||
}
|
||||
|
||||
// @ts-ignore
|
||||
if (oAuth2Options?.keyToIncludeInAccessTokenHeader) {
|
||||
Object.assign(newRequestOptions.headers, {
|
||||
// @ts-ignore
|
||||
[oAuth2Options.keyToIncludeInAccessTokenHeader]: token.accessToken,
|
||||
});
|
||||
}
|
||||
|
@ -1011,8 +1014,10 @@ export async function requestOAuth2(
|
|||
);
|
||||
const refreshedRequestOption = newToken.sign(requestOptions as clientOAuth2.RequestObject);
|
||||
|
||||
// @ts-ignore
|
||||
if (oAuth2Options?.keyToIncludeInAccessTokenHeader) {
|
||||
Object.assign(newRequestOptions.headers, {
|
||||
// @ts-ignore
|
||||
[oAuth2Options.keyToIncludeInAccessTokenHeader]: token.accessToken,
|
||||
});
|
||||
}
|
||||
|
@ -1088,8 +1093,10 @@ export async function requestOAuth2(
|
|||
// Make the request again with the new token
|
||||
const newRequestOptions = newToken.sign(requestOptions as clientOAuth2.RequestObject);
|
||||
|
||||
// @ts-ignore
|
||||
if (oAuth2Options?.keyToIncludeInAccessTokenHeader) {
|
||||
Object.assign(newRequestOptions.headers, {
|
||||
// @ts-ignore
|
||||
[oAuth2Options.keyToIncludeInAccessTokenHeader]: token.accessToken,
|
||||
});
|
||||
}
|
||||
|
|
|
@ -215,6 +215,7 @@ export async function getUserSettings(
|
|||
const settingsFile = await fsReadFile(settingsPath, 'utf8');
|
||||
|
||||
try {
|
||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
|
||||
settingsCache = JSON.parse(settingsFile);
|
||||
} catch (error) {
|
||||
throw new Error(
|
||||
|
|
|
@ -47,10 +47,10 @@
|
|||
"@types/jest": "^27.4.0",
|
||||
"@types/markdown-it": "^12.2.3",
|
||||
"@types/sanitize-html": "^2.6.2",
|
||||
"@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",
|
||||
"@vue/cli-plugin-babel": "~4.5.0",
|
||||
"@vue/cli-plugin-eslint": "~4.5.0",
|
||||
"@vue/cli-plugin-eslint": "~5.0.0",
|
||||
"@vue/cli-plugin-typescript": "~4.5.6",
|
||||
"@vue/cli-plugin-unit-jest": "~4.5.0",
|
||||
"@vue/cli-service": "~4.5.0",
|
||||
|
@ -60,7 +60,7 @@
|
|||
"babel-loader": "^8.2.2",
|
||||
"c8": "7.11.0",
|
||||
"core-js": "^3.6.5",
|
||||
"eslint": "^7.32.0",
|
||||
"eslint": "^8.0.0",
|
||||
"eslint-plugin-prettier": "^3.4.0",
|
||||
"eslint-plugin-vue": "^7.16.0",
|
||||
"gulp": "^4.0.0",
|
||||
|
|
|
@ -52,10 +52,10 @@
|
|||
"@types/node": "^16.11.22",
|
||||
"@types/quill": "^2.0.1",
|
||||
"@types/uuid": "^8.3.2",
|
||||
"@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",
|
||||
"@vue/cli-plugin-babel": "~4.5.0",
|
||||
"@vue/cli-plugin-eslint": "~4.5.0",
|
||||
"@vue/cli-plugin-eslint": "~5.0.0",
|
||||
"@vue/cli-plugin-typescript": "~4.5.6",
|
||||
"@vue/cli-plugin-unit-jest": "~4.5.0",
|
||||
"@vue/cli-service": "~4.5.0",
|
||||
|
@ -67,7 +67,7 @@
|
|||
"babel-eslint": "^10.0.1",
|
||||
"cross-env": "^7.0.2",
|
||||
"dateformat": "^3.0.3",
|
||||
"eslint": "^7.32.0",
|
||||
"eslint": "^8.0.0",
|
||||
"eslint-plugin-import": "^2.23.4",
|
||||
"eslint-plugin-vue": "^7.16.0",
|
||||
"file-saver": "^2.0.2",
|
||||
|
|
|
@ -49,7 +49,7 @@ export class Build extends Command {
|
|||
// eslint-disable-next-line @typescript-eslint/restrict-template-expressions, @typescript-eslint/no-unsafe-member-access
|
||||
this.log(`\nGOT ERROR: "${error.message}"`);
|
||||
this.log('====================================');
|
||||
// eslint-disable-next-line @typescript-eslint/restrict-template-expressions, @typescript-eslint/no-unsafe-member-access
|
||||
// eslint-disable-next-line @typescript-eslint/restrict-template-expressions, @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-argument
|
||||
this.log(error.stack);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
/* eslint-disable @typescript-eslint/no-unsafe-argument */
|
||||
/* eslint-disable @typescript-eslint/naming-convention */
|
||||
/* eslint-disable @typescript-eslint/no-unsafe-call */
|
||||
/* eslint-disable @typescript-eslint/no-unsafe-assignment */
|
||||
|
|
|
@ -50,8 +50,7 @@
|
|||
"@types/copyfiles": "^2.1.1",
|
||||
"@types/inquirer": "^6.5.0",
|
||||
"@types/tmp": "^0.2.0",
|
||||
"@types/vorpal": "^1.11.0",
|
||||
"tslint": "^6.1.2"
|
||||
"@types/vorpal": "^1.11.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"@oclif/command": "^1.5.18",
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
/* eslint-disable @typescript-eslint/no-unsafe-argument */
|
||||
/* eslint-disable @typescript-eslint/no-unsafe-member-access */
|
||||
import { ChildProcess, spawn } from 'child_process';
|
||||
|
||||
|
|
|
@ -718,7 +718,7 @@
|
|||
"@types/tmp": "^0.2.0",
|
||||
"@types/uuid": "^8.3.2",
|
||||
"@types/xml2js": "^0.4.3",
|
||||
"eslint-plugin-n8n-nodes-base": "^1.2.8",
|
||||
"eslint-plugin-n8n-nodes-base": "^1.5.2",
|
||||
"gulp": "^4.0.0",
|
||||
"jest": "^27.4.7",
|
||||
"n8n-workflow": "~0.109.0",
|
||||
|
|
|
@ -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 */
|
||||
|
|
Loading…
Reference in a new issue