mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-19 11:01:15 +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:
@@ -526,7 +526,6 @@ export class Switch implements INodeType {
|
||||
let mode: string;
|
||||
let outputIndex: number;
|
||||
let ruleData: INodeParameters;
|
||||
let value1: NodeParameterValue, value2: NodeParameterValue;
|
||||
|
||||
// The compare operations
|
||||
const compareOperationFunctions: {
|
||||
@@ -637,7 +636,7 @@ export class Switch implements INodeType {
|
||||
|
||||
const dataType = this.getNodeParameter('dataType', 0) as string;
|
||||
|
||||
value1 = this.getNodeParameter('value1', itemIndex) as NodeParameterValue;
|
||||
let value1 = this.getNodeParameter('value1', itemIndex) as NodeParameterValue;
|
||||
if (dataType === 'dateTime') {
|
||||
value1 = convertDateTime(value1);
|
||||
}
|
||||
@@ -649,7 +648,7 @@ export class Switch implements INodeType {
|
||||
) as INodeParameters[]) {
|
||||
// Check if the values passes
|
||||
|
||||
value2 = ruleData.value2 as NodeParameterValue;
|
||||
let value2 = ruleData.value2 as NodeParameterValue;
|
||||
if (dataType === 'dateTime') {
|
||||
value2 = convertDateTime(value2);
|
||||
}
|
||||
@@ -659,7 +658,7 @@ export class Switch implements INodeType {
|
||||
value2,
|
||||
);
|
||||
|
||||
if (compareOperationResult === true) {
|
||||
if (compareOperationResult) {
|
||||
// If rule matches add it to the correct output and continue with next item
|
||||
checkIndexRange(ruleData.output as number);
|
||||
returnData[ruleData.output as number].push(item);
|
||||
|
||||
Reference in New Issue
Block a user