From 22a8f39ce6565ed7ce54491b1da64c9ede2e316d Mon Sep 17 00:00:00 2001 From: Daniel Imms <2193314+Tyriar@users.noreply.github.com> Date: Fri, 8 Nov 2024 05:37:56 -0800 Subject: [PATCH] Fix lint --- src/extension.ts | 2 +- src/sort-lines.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/extension.ts b/src/extension.ts index 2688918..1666a63 100644 --- a/src/extension.ts +++ b/src/extension.ts @@ -16,7 +16,7 @@ export function activate(context: vscode.ExtensionContext): void { vscode.commands.registerCommand('sortLines.sortLinesShuffle', sortLines.sortShuffle), vscode.commands.registerCommand('sortLines.removeDuplicateLines', sortLines.removeDuplicateLines), vscode.commands.registerCommand('sortLines.keepOnlyDuplicateLines', sortLines.keepOnlyDuplicateLines), - vscode.commands.registerCommand('sortLines.keepOnlyNotDuplicateLines', sortLines.keepOnlyNotDuplicateLines), + vscode.commands.registerCommand('sortLines.keepOnlyNotDuplicateLines', sortLines.keepOnlyNotDuplicateLines) ]; commands.forEach(command => context.subscriptions.push(command)); diff --git a/src/sort-lines.ts b/src/sort-lines.ts index c1fbe13..64da0c4 100644 --- a/src/sort-lines.ts +++ b/src/sort-lines.ts @@ -61,7 +61,7 @@ function keepOnlyDuplicates(lines: string[]): string[] { } function keepOnlyNotDuplicates(lines: string[]): string[] { - return Array.from(new Set(lines.filter((element, index, array) => (array.lastIndexOf(element) == array.indexOf(element))))); + return Array.from(new Set(lines.filter((element, index, array) => (array.lastIndexOf(element) === array.indexOf(element))))); } function removeBlanks(lines: string[]): void {