refactor: Clear unused ESLint directives from BE packages (no-changelog) (#6798)
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
/* eslint-disable no-prototype-builtins */
|
||||
import type { INode, IWorkflowCredentials } from 'n8n-workflow';
|
||||
import * as Db from '@/Db';
|
||||
|
||||
@@ -11,14 +10,12 @@ export async function WorkflowCredentials(nodes: INode[]): Promise<IWorkflowCred
|
||||
let type;
|
||||
let nodeCredentials;
|
||||
let foundCredentials;
|
||||
// eslint-disable-next-line no-restricted-syntax
|
||||
|
||||
for (node of nodes) {
|
||||
if (node.disabled === true || !node.credentials) {
|
||||
// eslint-disable-next-line no-continue
|
||||
continue;
|
||||
}
|
||||
|
||||
// eslint-disable-next-line no-restricted-syntax
|
||||
for (type of Object.keys(node.credentials)) {
|
||||
if (!returnCredentials[type]) {
|
||||
returnCredentials[type] = {};
|
||||
@@ -32,7 +29,6 @@ export async function WorkflowCredentials(nodes: INode[]): Promise<IWorkflowCred
|
||||
}
|
||||
|
||||
if (!returnCredentials[type][nodeCredentials.id]) {
|
||||
// eslint-disable-next-line no-await-in-loop
|
||||
foundCredentials = await Db.collections.Credentials.findOneBy({
|
||||
id: nodeCredentials.id,
|
||||
type,
|
||||
@@ -42,7 +38,7 @@ export async function WorkflowCredentials(nodes: INode[]): Promise<IWorkflowCred
|
||||
`Could not find credentials for type "${type}" with ID "${nodeCredentials.id}".`,
|
||||
);
|
||||
}
|
||||
// eslint-disable-next-line prefer-destructuring
|
||||
|
||||
returnCredentials[type][nodeCredentials.id] = foundCredentials;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user