Content-Length: 4568 | pFad | http://github.com/TheAlgorithms/JavaScript/pull/1667.patch
thub.com
From 7d086ccc25bf9879e4e21a1b3c95e410f8cca444 Mon Sep 17 00:00:00 2001
From: Piotr Idzik
Date: Sat, 8 Jun 2024 21:37:02 +0000
Subject: [PATCH] style: remove redundant eslint suppressions
---
Backtracking/tests/RatInAMaze.test.js | 4 ----
Backtracking/tests/Sudoku.test.js | 1 -
Data-Structures/Array/QuickSelect.js | 1 -
Maths/test/EulerMethod.manual-test.js | 1 -
Maths/test/FindMinIterator.test.js | 4 +---
Recursive/test/FloodFill.test.js | 1 -
6 files changed, 1 insertion(+), 11 deletions(-)
diff --git a/Backtracking/tests/RatInAMaze.test.js b/Backtracking/tests/RatInAMaze.test.js
index 6cc5b31aae..52f620027b 100644
--- a/Backtracking/tests/RatInAMaze.test.js
+++ b/Backtracking/tests/RatInAMaze.test.js
@@ -6,7 +6,6 @@ describe('RatInAMaze', () => {
for (const value of values) {
// we deliberately want to check whether this constructor call fails or not
- // eslint-disable-next-line no-new
expect(() => {
new RatInAMaze(value)
}).toThrow()
@@ -15,7 +14,6 @@ describe('RatInAMaze', () => {
it('should fail for an empty array', () => {
// we deliberately want to check whether this constructor call fails or not
- // eslint-disable-next-line no-new
expect(() => {
new RatInAMaze([])
}).toThrow()
@@ -28,7 +26,6 @@ describe('RatInAMaze', () => {
]
// we deliberately want to check whether this constructor call fails or not
- // eslint-disable-next-line no-new
expect(() => {
new RatInAMaze(array)
}).toThrow()
@@ -39,7 +36,6 @@ describe('RatInAMaze', () => {
for (const value of values) {
// we deliberately want to check whether this constructor call fails or not
- // eslint-disable-next-line no-new
expect(() => {
new RatInAMaze(value)
}).toThrow()
diff --git a/Backtracking/tests/Sudoku.test.js b/Backtracking/tests/Sudoku.test.js
index 8cbe187089..c70f7de67a 100644
--- a/Backtracking/tests/Sudoku.test.js
+++ b/Backtracking/tests/Sudoku.test.js
@@ -27,7 +27,6 @@ const solved = [
describe('Sudoku', () => {
it('should create a valid board successfully', () => {
// we deliberately want to check whether this constructor call fails or not
- // eslint-disable-next-line no-new
expect(() => {
new Sudoku(data)
}).not.toThrow()
diff --git a/Data-Structures/Array/QuickSelect.js b/Data-Structures/Array/QuickSelect.js
index d01555ed95..53c8c8e855 100644
--- a/Data-Structures/Array/QuickSelect.js
+++ b/Data-Structures/Array/QuickSelect.js
@@ -12,7 +12,6 @@
*/
function QuickSelect(items, kth) {
- // eslint-disable-line no-unused-vars
if (kth < 1 || kth > items.length) {
throw new RangeError('Index Out of Bound')
}
diff --git a/Maths/test/EulerMethod.manual-test.js b/Maths/test/EulerMethod.manual-test.js
index 27b4631a80..e1959280a5 100644
--- a/Maths/test/EulerMethod.manual-test.js
+++ b/Maths/test/EulerMethod.manual-test.js
@@ -15,7 +15,6 @@ function plotLine(label, points, width, height) {
// Chart-class from chartjs
const chart = new Chart(canvas, {
- // eslint-disable-line
type: 'scatter',
data: {
datasets: [
diff --git a/Maths/test/FindMinIterator.test.js b/Maths/test/FindMinIterator.test.js
index 7b7229b106..792cb7695e 100644
--- a/Maths/test/FindMinIterator.test.js
+++ b/Maths/test/FindMinIterator.test.js
@@ -22,13 +22,12 @@ describe('FindMinIterator', () => {
})
test('given empty generator then min is undefined', () => {
- const src = function* () {} // eslint-disable-line
+ const src = function* () {}
expect(FindMinIterator(src())).toBeUndefined()
})
test('given generator then min is found', () => {
const src = function* () {
- // eslint-disable-line
yield 1
yield -1
yield 0
@@ -38,7 +37,6 @@ describe('FindMinIterator', () => {
test('given string generator then min string length is found', () => {
const src = function* () {
- // eslint-disable-line
yield 'abc'
yield 'de'
yield 'qwerty'
diff --git a/Recursive/test/FloodFill.test.js b/Recursive/test/FloodFill.test.js
index 618692dd97..eb44e75e09 100644
--- a/Recursive/test/FloodFill.test.js
+++ b/Recursive/test/FloodFill.test.js
@@ -69,7 +69,6 @@ function testDepthFirst(
replacementColor,
testLocation
) {
- // eslint-disable-line
const rgbData = generateTestRgbData()
depthFirstSearch(rgbData, fillLocation, targetColor, replacementColor)
return rgbData[testLocation[0]][testLocation[1]]
--- a PPN by Garber Painting Akron. With Image Size Reduction included!Fetched URL: http://github.com/TheAlgorithms/JavaScript/pull/1667.patch
Alternative Proxies:
Alternative Proxy
pFad Proxy
pFad v3 Proxy
pFad v4 Proxy