Skip to content

Commit

Permalink
Fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
Tyriar committed Nov 8, 2024
1 parent 2aaf813 commit 22a8f39
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down
2 changes: 1 addition & 1 deletion src/sort-lines.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 22a8f39

Please sign in to comment.