Skip to content

Commit

Permalink
[REFACTOR] Eslint warnings fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
Gonzalo Diaz committed Apr 9, 2024
1 parent f765bf6 commit db7ab37
Show file tree
Hide file tree
Showing 70 changed files with 82 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/hackerrank/implementation/betweenTwoSets.test.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { describe, expect, it } from '@jest/globals';
import { logger as console } from '../../logger';

import { getTotalX, factorOf, isFactor } from './betweenTwoSets';
Expand Down
1 change: 1 addition & 0 deletions src/hackerrank/implementation/birthday.test.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { describe, expect, it } from '@jest/globals';
import { logger as console } from '../../logger';

import { birthday } from './birthday';
Expand Down
1 change: 1 addition & 0 deletions src/hackerrank/implementation/bonAppetit.test.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { describe, expect, it } from '@jest/globals';
import { logger as console } from '../../logger';

import { bonAppetit } from './bonAppetit';
Expand Down
1 change: 1 addition & 0 deletions src/hackerrank/implementation/breakingRecords.test.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { describe, expect, it } from '@jest/globals';
import { logger as console } from '../../logger';

import { breakingRecords } from './breakingRecords';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { describe, expect, it } from '@jest/globals';
import { logger as console } from '../../logger';

import { countApplesAndOranges } from './countApplesAndOranges';
Expand Down
1 change: 1 addition & 0 deletions src/hackerrank/implementation/countingValleys.test.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { describe, expect, it } from '@jest/globals';
import { logger as console } from '../../logger';

import { countingValleys } from './countingValleys';
Expand Down
1 change: 1 addition & 0 deletions src/hackerrank/implementation/dayOfProgrammer.test.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { describe, expect, it } from '@jest/globals';
import { logger as console } from '../../logger';

import { dayOfProgrammer } from './dayOfProgrammer';
Expand Down
1 change: 1 addition & 0 deletions src/hackerrank/implementation/divisibleSumPairs.test.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { describe, expect, it } from '@jest/globals';
import { logger as console } from '../../logger';

import { divisibleSumPairs } from './divisibleSumPairs';
Expand Down
1 change: 1 addition & 0 deletions src/hackerrank/implementation/gradingStudents.test.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { describe, expect, it } from '@jest/globals';
import { logger as console } from '../../logger';

import { gradingStudents } from './gradingStudents';
Expand Down
1 change: 1 addition & 0 deletions src/hackerrank/implementation/jumpingOnClouds.test.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { describe, expect, it } from '@jest/globals';
import { logger as console } from '../../logger';

import { jumpingOnClouds } from './jumpingOnClouds';
Expand Down
1 change: 1 addition & 0 deletions src/hackerrank/implementation/kangaroo.test.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { describe, expect, it } from '@jest/globals';
import { logger as console } from '../../logger';

import { kangaroo } from './kangaroo';
Expand Down
1 change: 1 addition & 0 deletions src/hackerrank/implementation/migratoryBirds.test.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { describe, expect, it } from '@jest/globals';
import { logger as console } from '../../logger';

import { migratoryBirds } from './migratoryBirds';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { describe, expect, it } from '@jest/globals';
import { logger as console } from '../../logger';

import { minimumAbsoluteDifference } from './minimumAbsoluteDifference';
Expand Down
1 change: 1 addition & 0 deletions src/hackerrank/implementation/repeatedString.test.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { describe, expect, it } from '@jest/globals';
import { logger as console } from '../../logger';

import { repeatedString } from './repeatedString';
Expand Down
1 change: 1 addition & 0 deletions src/hackerrank/implementation/sockMerchant.test.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { describe, expect, it } from '@jest/globals';
import { logger as console } from '../../logger';

import { sockMerchant } from './sockMerchant';
Expand Down
1 change: 1 addition & 0 deletions src/hackerrank/projecteuler/euler001.test.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { describe, expect, it } from '@jest/globals';
import { logger as console } from '../../logger';

import { euler001 } from './euler001';
Expand Down
1 change: 1 addition & 0 deletions src/hackerrank/warmup/aVeryBigSum.test.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { describe, expect, it } from '@jest/globals';
import { logger as console } from '../../logger';

import { aVeryBigSum } from './aVeryBigSum';
Expand Down
1 change: 1 addition & 0 deletions src/hackerrank/warmup/birthdayCakeCandles.test.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { describe, expect, it } from '@jest/globals';
import { logger as console } from '../../logger';

import { birthdayCakeCandles } from './birthdayCakeCandles';
Expand Down
1 change: 1 addition & 0 deletions src/hackerrank/warmup/compareTriplets.test.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { describe, expect, it } from '@jest/globals';
import { logger as console } from '../../logger';

import { compareTriplets } from './compareTriplets';
Expand Down
1 change: 1 addition & 0 deletions src/hackerrank/warmup/diagonalDifference.test.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { describe, expect, it } from '@jest/globals';
import { logger as console } from '../../logger';

import { diagonalDifference } from './diagonalDifference';
Expand Down
1 change: 1 addition & 0 deletions src/hackerrank/warmup/miniMaxSum.test.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { describe, expect, it } from '@jest/globals';
import { logger as console } from '../../logger';

import { miniMaxSum } from './miniMaxSum';
Expand Down
1 change: 1 addition & 0 deletions src/hackerrank/warmup/plusMinus.test.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { describe, expect, it } from '@jest/globals';
import { logger as console } from '../../logger';

import { plusMinus } from './plusMinus';
Expand Down
1 change: 1 addition & 0 deletions src/hackerrank/warmup/simpleArraySum.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { logger as console } from '../../logger';

import { simpleArraySum } from './simpleArraySum';

import { describe, expect, it } from '@jest/globals';
describe('problem simpleArraySum', () => {
it('problem simpleArraySum Test case 0', () => {
expect.assertions(1);
Expand Down
1 change: 1 addition & 0 deletions src/hackerrank/warmup/solveMeFirst.test.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { describe, expect, it } from '@jest/globals';
import { logger as console } from '../../logger';

import { solveMeFirst } from './solveMeFirst';
Expand Down
1 change: 1 addition & 0 deletions src/hackerrank/warmup/staircase.test.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { describe, expect, it } from '@jest/globals';
import { logger as console } from '../../logger';

import { staircase } from './staircase';
Expand Down
1 change: 1 addition & 0 deletions src/hackerrank/warmup/timeConversion.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { logger as console } from '../../logger';

import { timeConversion } from './timeConversion';

import { describe, expect, it } from '@jest/globals';
describe('timeConversion', () => {
it('timeConversion example', () => {
expect.assertions(2);
Expand Down
2 changes: 2 additions & 0 deletions src/hello_world.test.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { describe, expect, it } from '@jest/globals';

import { hello } from '../src/hello_world';

describe('test hello', () => {
Expand Down
1 change: 1 addition & 0 deletions src/logger.test.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { describe, expect, it } from '@jest/globals';
import { logger as console } from './logger';

describe('logger', () => {
Expand Down
1 change: 1 addition & 0 deletions src/problem0000.test.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { describe, expect, it } from '@jest/globals';
import { logger as console } from './logger';

import { problem0000 } from './problem0000';
Expand Down
2 changes: 2 additions & 0 deletions src/projecteuler/helpers/bigNumbers.test.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { describe, expect, it } from '@jest/globals';

import {
bigMultiply,
bigMultiplyRowToString,
Expand Down
2 changes: 2 additions & 0 deletions src/projecteuler/helpers/collatz.test.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { describe, expect, it } from '@jest/globals';

import { collatz } from './';

// 13 → 40 → 20 → 10 → 5 → 16 → 8 → 4 → 2 → 1
Expand Down
2 changes: 2 additions & 0 deletions src/projecteuler/helpers/divisors.test.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { describe, expect, it } from '@jest/globals';

import {
abundance,
divisors,
Expand Down
2 changes: 2 additions & 0 deletions src/projecteuler/helpers/isPalindrome.test.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { describe, expect, it } from '@jest/globals';

import { isPalindrome } from './';

describe('number is Palindrome', () => {
Expand Down
2 changes: 2 additions & 0 deletions src/projecteuler/helpers/matrix.test.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { describe, expect, it } from '@jest/globals';

import { matrix } from './';

describe('matrix generator', () => {
Expand Down
2 changes: 2 additions & 0 deletions src/projecteuler/helpers/minmax.test.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { describe, expect, it } from '@jest/globals';

import { minimum, maximum } from './';

describe('maximum and minimum', () => {
Expand Down
2 changes: 2 additions & 0 deletions src/projecteuler/helpers/numberToWord.test.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { describe, expect, it } from '@jest/globals';

import { numberToWord } from './';

describe('transform numbers to word representation in british english', () => {
Expand Down
2 changes: 2 additions & 0 deletions src/projecteuler/helpers/product.test.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { describe, expect, it } from '@jest/globals';

import { product } from './';

describe('product of all numbers in array', () => {
Expand Down
2 changes: 2 additions & 0 deletions src/projecteuler/helpers/sum.test.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { describe, expect, it } from '@jest/globals';

import { sum } from './';

describe('sum all numbers in array', () => {
Expand Down
2 changes: 2 additions & 0 deletions src/projecteuler/helpers/wordScore.test.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { describe, expect, it } from '@jest/globals';

import { wordScore } from './';

describe('wordScore', () => {
Expand Down
1 change: 1 addition & 0 deletions src/projecteuler/lib/BNode.test.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { describe, expect, it } from '@jest/globals';
import { BNode } from './BNode';

describe('class BNode for binary trees', () => {
Expand Down
1 change: 1 addition & 0 deletions src/projecteuler/lib/BNodeBuilder.test.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { describe, expect, it } from '@jest/globals';
import { BNode } from './BNode';
import { BNodeBuilder } from './BNodeBuilder';

Expand Down
1 change: 1 addition & 0 deletions src/projecteuler/problem0001.test.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { describe, expect, it } from '@jest/globals';
import { logger as console } from '../logger';

import { problem0001 } from './problem0001';
Expand Down
1 change: 1 addition & 0 deletions src/projecteuler/problem0002.test.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { describe, expect, it } from '@jest/globals';
import { logger as console } from '../logger';

import { problem0002 } from './problem0002';
Expand Down
1 change: 1 addition & 0 deletions src/projecteuler/problem0003.test.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { describe, expect, it } from '@jest/globals';
import { logger as console } from '../logger';

import { problem0003 } from './problem0003';
Expand Down
1 change: 1 addition & 0 deletions src/projecteuler/problem0004.test.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { describe, expect, it } from '@jest/globals';
import { logger as console } from '../logger';

import { problem0004 } from './problem0004';
Expand Down
1 change: 1 addition & 0 deletions src/projecteuler/problem0005-simple.test.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { describe, expect, it } from '@jest/globals';
import { logger as console } from '../logger';

import { problem0005Simple } from './problem0005-simple';
Expand Down
1 change: 1 addition & 0 deletions src/projecteuler/problem0005.bruteforce-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { logger as console } from '../logger';

import { problem0005Simple } from './problem0005-simple';

import { describe, expect, it } from '@jest/globals';
describe('problem 0005 simple', () => {
it('problem 0005 simple solution found by BRUTE FORCE FULL', async () => {
expect.assertions(1);
Expand Down
1 change: 1 addition & 0 deletions src/projecteuler/problem0005.test.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { describe, expect, it } from '@jest/globals';
import { logger as console } from '../logger';

import { problem0005 } from './problem0005';
Expand Down
1 change: 1 addition & 0 deletions src/projecteuler/problem0006.test.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { describe, expect, it } from '@jest/globals';
import { logger as console } from '../logger';

import { problem0006 } from './problem0006';
Expand Down
1 change: 1 addition & 0 deletions src/projecteuler/problem0007.bruteforce-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { logger as console } from '../logger';

import { problem0007 } from './problem0007';

import { describe, expect, it } from '@jest/globals';
describe('problem 0007 BRUTEFORCE', () => {
it('problem 0007 BRUTEFORCE large', () => {
expect.assertions(1);
Expand Down
1 change: 1 addition & 0 deletions src/projecteuler/problem0007.test.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { describe, expect, it } from '@jest/globals';
import { logger as console } from '../logger';

import { problem0007 } from './problem0007';
Expand Down
1 change: 1 addition & 0 deletions src/projecteuler/problem0008.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { logger as console } from '../logger';

import { problem0008 } from './problem0008';

import { describe, expect, it } from '@jest/globals';
describe('problem 0008', () => {
it('problem 0008 solution found', () => {
expect.assertions(1);
Expand Down
1 change: 1 addition & 0 deletions src/projecteuler/problem0009.test.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { describe, expect, it } from '@jest/globals';
import { logger as console } from '../logger';

import { problem0009 } from './problem0009';
Expand Down
1 change: 1 addition & 0 deletions src/projecteuler/problem0010.bruteforce-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { logger as console } from '../logger';

import { problem0010 } from './problem0010';

import { describe, expect, it } from '@jest/globals';
describe('problem 0010', () => {
it('problem 0010 solution found BRUTE FORCE', () => {
expect.assertions(1);
Expand Down
1 change: 1 addition & 0 deletions src/projecteuler/problem0010.test.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { describe, expect, it } from '@jest/globals';
import { logger as console } from '../logger';

import { problem0010 } from './problem0010';
Expand Down
1 change: 1 addition & 0 deletions src/projecteuler/problem0011.test.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { describe, expect, it } from '@jest/globals';
import { logger as console } from '../logger';

import { problem0011 } from './problem0011';
Expand Down
1 change: 1 addition & 0 deletions src/projecteuler/problem0012.test.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { describe, expect, it } from '@jest/globals';
import { logger as console } from '../logger';

import { problem0012 } from './problem0012';
Expand Down
1 change: 1 addition & 0 deletions src/projecteuler/problem0013.test.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { describe, expect, it } from '@jest/globals';
import { logger as console } from '../logger';

import { problem0013 } from './problem0013';
Expand Down
1 change: 1 addition & 0 deletions src/projecteuler/problem0014.test.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { describe, expect, it } from '@jest/globals';
import { logger as console } from '../logger';

import { problem0014 } from './problem0014';
Expand Down
1 change: 1 addition & 0 deletions src/projecteuler/problem0015.test.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { describe, expect, it } from '@jest/globals';
import { logger as console } from '../logger';

import { problem0015 } from './problem0015';
Expand Down
1 change: 1 addition & 0 deletions src/projecteuler/problem0016.test.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { describe, expect, it } from '@jest/globals';
import { logger as console } from '../logger';

import { problem0016 } from './problem0016';
Expand Down
1 change: 1 addition & 0 deletions src/projecteuler/problem0017.test.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { describe, expect, it } from '@jest/globals';
import { logger as console } from '../logger';

import { problem0017 } from './problem0017';
Expand Down
1 change: 1 addition & 0 deletions src/projecteuler/problem0018.test.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { describe, expect, it } from '@jest/globals';
import { logger as console } from '../logger';

import { problem0018 } from './problem0018';
Expand Down
1 change: 1 addition & 0 deletions src/projecteuler/problem0019.test.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { describe, expect, it } from '@jest/globals';
import { logger as console } from '../logger';

import { __SUNDAY__ } from '../constants';
Expand Down
2 changes: 2 additions & 0 deletions src/projecteuler/problem0020.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import { describe, expect, it } from '@jest/globals';
import { logger as console } from '../logger';

import { problem0020 } from './problem0020';

describe('problem 0020', () => {
Expand Down
1 change: 1 addition & 0 deletions src/projecteuler/problem0021.test.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { describe, expect, it } from '@jest/globals';
import { logger as console } from '../logger';

import { problem0021 } from './problem0021';
Expand Down
1 change: 1 addition & 0 deletions src/projecteuler/problem0022.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
// - src/data/p022_names.json
// ////////////////////////////////////////////////////////////////////////////

import { describe, expect, it } from '@jest/globals';
import { logger as console } from '../logger';

import { problem0022 } from './problem0022';
Expand Down
1 change: 1 addition & 0 deletions src/projecteuler/problem0023.test.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { describe, expect, it } from '@jest/globals';
import { logger as console } from '../logger';

import { problem0023 } from './problem0023';
Expand Down
1 change: 1 addition & 0 deletions src/projecteuler/problem0024.test.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { describe, expect, it } from '@jest/globals';
import { logger as console } from '../logger';

import { problem0024 } from './problem0024';
Expand Down
1 change: 1 addition & 0 deletions src/projecteuler/problem0025.test.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { describe, expect, it } from '@jest/globals';
import { logger as console } from '../logger';

import { problem0025 } from './problem0025';
Expand Down

0 comments on commit db7ab37

Please sign in to comment.