Skip to content

style: remove redundant eslint suppressions #1667

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions Backtracking/tests/RatInAMaze.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand All @@ -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()
Expand All @@ -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()
Expand All @@ -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()
Expand Down
1 change: 0 additions & 1 deletion Backtracking/tests/Sudoku.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
1 change: 0 additions & 1 deletion Data-Structures/Array/QuickSelect.js
Original file line number Diff line number Diff line change
Expand Up @@ -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')
}
Expand Down
1 change: 0 additions & 1 deletion Maths/test/EulerMethod.manual-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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: [
Expand Down
4 changes: 1 addition & 3 deletions Maths/test/FindMinIterator.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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'
Expand Down
1 change: 0 additions & 1 deletion Recursive/test/FloodFill.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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]]
Expand Down
Loading