Skip to content

Commit 17b7d27

Browse files
authored
Merge pull request #871 from sir-gon/dependabot/npm_and_yarn/eslint/js-10.0.1
Bump @eslint/js from 9.39.2 to 10.0.1
2 parents 2bc6f71 + 5da6aa3 commit 17b7d27

8 files changed

Lines changed: 36 additions & 21 deletions

File tree

package-lock.json

Lines changed: 26 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
"@babel/plugin-syntax-import-assertions": "^7.28.6",
2828
"@eslint/compat": "^2.0.2",
2929
"@eslint/eslintrc": "^3.1.0",
30-
"@eslint/js": "^9.39.2",
30+
"@eslint/js": "^10.0.1",
3131
"@jest/globals": "^30.0.0",
3232
"concurrently": "9.2.1",
3333
"cross-env": "^10.0.0",

src/hackerrank/implementation/repeatedString.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,16 +19,14 @@ function countAs(word) {
1919
}
2020

2121
function repeatedString(s, n) {
22-
let result = 0;
23-
2422
const blockSize = s.length;
2523

2624
const countBlocks = Math.floor(n / blockSize);
2725
const restSize = Math.floor(n % blockSize);
2826

2927
console.debug(`countBlocks: ${countBlocks} + rest: ${restSize}`);
3028

31-
result = countAs(s) * countBlocks + countAs(s.slice(0, restSize));
29+
const result = countAs(s) * countBlocks + countAs(s.slice(0, restSize));
3230
return result;
3331
}
3432

src/projecteuler/helpers/bigNumbers.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ export const bigSum = (strNumberA, strNumberB) => {
1515
const a = bigNum(strNumberA).reverse();
1616
const b = bigNum(strNumberB).reverse();
1717

18-
let sum = 0;
18+
let sum;
19+
let digit;
1920
let carry = 0;
20-
let digit = 0;
2121

2222
// adjust numbers length
2323
if (a.length > b.length) {
@@ -65,9 +65,9 @@ export const bigMultiplyRowToBigNum = (strNumber, multiplierDigit) => {
6565
const number = bigNum(strNumber).reverse();
6666
const result = [];
6767

68-
let mul = 0;
68+
let mul;
69+
let digit;
6970
let carry = 0;
70-
let digit = 0;
7171

7272
for (const multiplicand of number) {
7373
mul = multiplicand * multiplierDigit + carry;

src/projecteuler/problem0002.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ function problem0002(_top) {
1010
let last2 = 0;
1111
let evenSum = 0;
1212

13-
let fibo = 0;
13+
let fibo;
1414
do {
1515
fibo = last2 + last1;
1616

src/projecteuler/problem0005-simple.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ function problem0005Simple(_bottom, _top, _startFrom) {
2626

2727
do {
2828
i = 2;
29-
fail = false;
3029
do {
3130
fail = test % i !== 0;
3231

src/projecteuler/problem0006.js

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,19 +12,16 @@
1212
import { logger as console } from '../logger.js';
1313

1414
function problem0006(_bottom = 1, _top = 100) {
15-
let answer = 0;
16-
1715
let sumOfSquares = 0;
1816
let baseForSquareOfSum = 0;
19-
let squareOfSum = 0;
2017

2118
for (let i = _bottom; i <= _top; i++) {
2219
sumOfSquares += i ** 2;
2320
baseForSquareOfSum += i;
2421
}
2522

26-
squareOfSum = baseForSquareOfSum ** 2;
27-
answer = squareOfSum - sumOfSquares;
23+
const squareOfSum = baseForSquareOfSum ** 2;
24+
const answer = squareOfSum - sumOfSquares;
2825

2926
console.debug(`Sum of first ${_top} squares = ${sumOfSquares}`);
3027
console.debug(

src/projecteuler/problem0025.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ function problem0025(_top) {
99
let last1 = bigNum('1');
1010
let last2 = bigNum('1');
1111
let counter = 2;
12-
let fibo = '0';
12+
let fibo;
1313

1414
do {
1515
fibo = bigSum(bigNumToString(last1), bigNumToString(last2));

0 commit comments

Comments
 (0)