From f42433e51ee70c7af763aa90eb38bcb1021176bb Mon Sep 17 00:00:00 2001 From: Oleksii Trekhleb Date: Sun, 26 Jul 2020 13:23:36 +0200 Subject: [PATCH] Fix ESLint issues. --- src/algorithms/sorting/insertion-sort/InsertionSort.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/algorithms/sorting/insertion-sort/InsertionSort.js b/src/algorithms/sorting/insertion-sort/InsertionSort.js index ff53c5a6..aa447542 100644 --- a/src/algorithms/sorting/insertion-sort/InsertionSort.js +++ b/src/algorithms/sorting/insertion-sort/InsertionSort.js @@ -21,7 +21,13 @@ export default class InsertionSort extends Sort { this.callbacks.visitingCallback(array[currentIndex - 1]); // Swap the elements. - [array[currentIndex - 1], array[currentIndex]] = [array[currentIndex], array[currentIndex - 1]]; + [ + array[currentIndex - 1], + array[currentIndex], + ] = [ + array[currentIndex], + array[currentIndex - 1], + ]; // Shift current index left. currentIndex -= 1;