mirror of
https://github.com/TheAlgorithms/JavaScript.git
synced 2025-07-04 07:29:47 +08:00
style: remove redundant eslint suppressions (#1667)
This commit is contained in:
@ -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()
|
||||
|
@ -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()
|
||||
|
@ -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')
|
||||
}
|
||||
|
@ -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: [
|
||||
|
@ -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'
|
||||
|
@ -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]]
|
||||
|
Reference in New Issue
Block a user