style: remove redundant eslint suppressions (#1667)

This commit is contained in:
Piotr Idzik
2024-06-11 22:10:48 +02:00
committed by GitHub
parent 1554ba5f9c
commit 79b93d35b6
6 changed files with 1 additions and 11 deletions

View File

@ -6,7 +6,6 @@ describe('RatInAMaze', () => {
for (const value of values) { for (const value of values) {
// we deliberately want to check whether this constructor call fails or not // we deliberately want to check whether this constructor call fails or not
// eslint-disable-next-line no-new
expect(() => { expect(() => {
new RatInAMaze(value) new RatInAMaze(value)
}).toThrow() }).toThrow()
@ -15,7 +14,6 @@ describe('RatInAMaze', () => {
it('should fail for an empty array', () => { it('should fail for an empty array', () => {
// we deliberately want to check whether this constructor call fails or not // we deliberately want to check whether this constructor call fails or not
// eslint-disable-next-line no-new
expect(() => { expect(() => {
new RatInAMaze([]) new RatInAMaze([])
}).toThrow() }).toThrow()
@ -28,7 +26,6 @@ describe('RatInAMaze', () => {
] ]
// we deliberately want to check whether this constructor call fails or not // we deliberately want to check whether this constructor call fails or not
// eslint-disable-next-line no-new
expect(() => { expect(() => {
new RatInAMaze(array) new RatInAMaze(array)
}).toThrow() }).toThrow()
@ -39,7 +36,6 @@ describe('RatInAMaze', () => {
for (const value of values) { for (const value of values) {
// we deliberately want to check whether this constructor call fails or not // we deliberately want to check whether this constructor call fails or not
// eslint-disable-next-line no-new
expect(() => { expect(() => {
new RatInAMaze(value) new RatInAMaze(value)
}).toThrow() }).toThrow()

View File

@ -27,7 +27,6 @@ const solved = [
describe('Sudoku', () => { describe('Sudoku', () => {
it('should create a valid board successfully', () => { it('should create a valid board successfully', () => {
// we deliberately want to check whether this constructor call fails or not // we deliberately want to check whether this constructor call fails or not
// eslint-disable-next-line no-new
expect(() => { expect(() => {
new Sudoku(data) new Sudoku(data)
}).not.toThrow() }).not.toThrow()

View File

@ -12,7 +12,6 @@
*/ */
function QuickSelect(items, kth) { function QuickSelect(items, kth) {
// eslint-disable-line no-unused-vars
if (kth < 1 || kth > items.length) { if (kth < 1 || kth > items.length) {
throw new RangeError('Index Out of Bound') throw new RangeError('Index Out of Bound')
} }

View File

@ -15,7 +15,6 @@ function plotLine(label, points, width, height) {
// Chart-class from chartjs // Chart-class from chartjs
const chart = new Chart(canvas, { const chart = new Chart(canvas, {
// eslint-disable-line
type: 'scatter', type: 'scatter',
data: { data: {
datasets: [ datasets: [

View File

@ -22,13 +22,12 @@ describe('FindMinIterator', () => {
}) })
test('given empty generator then min is undefined', () => { test('given empty generator then min is undefined', () => {
const src = function* () {} // eslint-disable-line const src = function* () {}
expect(FindMinIterator(src())).toBeUndefined() expect(FindMinIterator(src())).toBeUndefined()
}) })
test('given generator then min is found', () => { test('given generator then min is found', () => {
const src = function* () { const src = function* () {
// eslint-disable-line
yield 1 yield 1
yield -1 yield -1
yield 0 yield 0
@ -38,7 +37,6 @@ describe('FindMinIterator', () => {
test('given string generator then min string length is found', () => { test('given string generator then min string length is found', () => {
const src = function* () { const src = function* () {
// eslint-disable-line
yield 'abc' yield 'abc'
yield 'de' yield 'de'
yield 'qwerty' yield 'qwerty'

View File

@ -69,7 +69,6 @@ function testDepthFirst(
replacementColor, replacementColor,
testLocation testLocation
) { ) {
// eslint-disable-line
const rgbData = generateTestRgbData() const rgbData = generateTestRgbData()
depthFirstSearch(rgbData, fillLocation, targetColor, replacementColor) depthFirstSearch(rgbData, fillLocation, targetColor, replacementColor)
return rgbData[testLocation[0]][testLocation[1]] return rgbData[testLocation[0]][testLocation[1]]