mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 10:02:05 +00:00
refactor(core): Remove linting exceptions in nodes-base (#4794)
* ⚡ enabled array-type * ⚡ await-thenable on * ⚡ ban-types on * ⚡ default-param-last on * ⚡ dot-notation on * ⚡ member-delimiter-style on * ⚡ no-duplicate-imports on * ⚡ no-empty-interface on * ⚡ no-floating-promises on * ⚡ no-for-in-array on * ⚡ no-invalid-void-type on * ⚡ no-loop-func on * ⚡ no-shadow on * ⚡ ban-ts-comment re enabled * ⚡ @typescript-eslint/lines-between-class-members on * address my own comment * @typescript-eslint/return-await on * @typescript-eslint/promise-function-async on * @typescript-eslint/no-unnecessary-boolean-literal-compare on * @typescript-eslint/no-unnecessary-type-assertion on * prefer-const on * @typescript-eslint/prefer-optional-chain on Co-authored-by: कारतोफ्फेलस्क्रिप्ट™ <aditya@netroy.in>
This commit is contained in:
@@ -129,7 +129,7 @@ export function findMatches(
|
||||
[data1, data2] = [data2, data1];
|
||||
}
|
||||
|
||||
const disableDotNotation = (options.disableDotNotation as boolean) || false;
|
||||
const disableDotNotation = options.disableDotNotation || false;
|
||||
const multipleMatches = (options.multipleMatches as string) || 'all';
|
||||
|
||||
const filteredData = {
|
||||
@@ -147,11 +147,11 @@ export function findMatches(
|
||||
fieldsToMatch.forEach((matchCase) => {
|
||||
let valueToCompare;
|
||||
if (disableDotNotation) {
|
||||
valueToCompare = entry1.json[matchCase.field1 as string];
|
||||
valueToCompare = entry1.json[matchCase.field1];
|
||||
} else {
|
||||
valueToCompare = get(entry1.json, matchCase.field1 as string);
|
||||
valueToCompare = get(entry1.json, matchCase.field1);
|
||||
}
|
||||
lookup[matchCase.field2 as string] = valueToCompare;
|
||||
lookup[matchCase.field2] = valueToCompare;
|
||||
});
|
||||
|
||||
for (const fieldValue of Object.values(lookup)) {
|
||||
@@ -230,10 +230,10 @@ export function mergeMatched(
|
||||
[entry] = addSuffixToEntriesKeys([entry], suffix1);
|
||||
matches = addSuffixToEntriesKeys(matches, suffix2);
|
||||
|
||||
json = mergeIntoSingleObject({ ...entry.json }, ...matches.map((match) => match.json));
|
||||
json = mergeIntoSingleObject({ ...entry.json }, ...matches.map((item) => item.json));
|
||||
binary = mergeIntoSingleObject(
|
||||
{ ...entry.binary },
|
||||
...matches.map((match) => match.binary as IDataObject),
|
||||
...matches.map((item) => item.binary as IDataObject),
|
||||
);
|
||||
} else {
|
||||
let preferInput1 = 'preferInput1';
|
||||
@@ -251,21 +251,21 @@ export function mergeMatched(
|
||||
const [firstMatch, ...restMatches] = matches;
|
||||
json = mergeIntoSingleObject(
|
||||
{ ...firstMatch.json },
|
||||
...restMatches.map((match) => match.json),
|
||||
...restMatches.map((item) => item.json),
|
||||
entry.json,
|
||||
);
|
||||
binary = mergeIntoSingleObject(
|
||||
{ ...firstMatch.binary },
|
||||
...restMatches.map((match) => match.binary as IDataObject),
|
||||
...restMatches.map((item) => item.binary as IDataObject),
|
||||
entry.binary as IDataObject,
|
||||
);
|
||||
}
|
||||
|
||||
if (resolveClash === preferInput2) {
|
||||
json = mergeIntoSingleObject({ ...entry.json }, ...matches.map((match) => match.json));
|
||||
json = mergeIntoSingleObject({ ...entry.json }, ...matches.map((item) => item.json));
|
||||
binary = mergeIntoSingleObject(
|
||||
{ ...entry.binary },
|
||||
...matches.map((match) => match.binary as IDataObject),
|
||||
...matches.map((item) => item.binary as IDataObject),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user