Skip to content

Commit

Permalink
fixed linting errors
Browse files Browse the repository at this point in the history
  • Loading branch information
jongund committed Jun 6, 2024
1 parent de2a7ac commit 764061a
Showing 1 changed file with 11 additions and 12 deletions.
23 changes: 11 additions & 12 deletions content/practices/high-contrast/high-contrast-practice.js
Original file line number Diff line number Diff line change
Expand Up @@ -560,8 +560,8 @@ const htmlColorValues = [
{
name: 'BLACK',
hex: '#000000',
}
]
},
];

/*
* @function computeDistance
Expand All @@ -576,22 +576,21 @@ const htmlColorValues = [
*/

function computeDistance(hex1, hex2) {

const rgb1 = {
r: parseInt(hex1.substring(1,2), 16),
b: parseInt(hex1.substring(3,4), 16),
g: parseInt(hex1.substring(5,6), 16)
r: parseInt(hex1.substring(1, 2), 16),
b: parseInt(hex1.substring(3, 4), 16),
g: parseInt(hex1.substring(5, 6), 16),
}

Check failure on line 583 in content/practices/high-contrast/high-contrast-practice.js

View workflow job for this annotation

GitHub Actions / lint-js

Insert `;`

Check failure on line 583 in content/practices/high-contrast/high-contrast-practice.js

View workflow job for this annotation

GitHub Actions / lint-js

Insert `;`

const rgb2 = {
r: parseInt(hex2.substring(1,2), 16),
b: parseInt(hex2.substring(3,4), 16),
g: parseInt(hex2.substring(5,6), 16)
r: parseInt(hex2.substring(1, 2), 16),
b: parseInt(hex2.substring(3, 4), 16),
g: parseInt(hex2.substring(5, 6), 16),
}

Check failure on line 589 in content/practices/high-contrast/high-contrast-practice.js

View workflow job for this annotation

GitHub Actions / lint-js

Insert `;`

Check failure on line 589 in content/practices/high-contrast/high-contrast-practice.js

View workflow job for this annotation

GitHub Actions / lint-js

Insert `;`

return Math.pow((rgb1.r - rgb2.r),2) +
Math.pow((rgb1.g - rgb2.g),2) +
Math.pow((rgb1.b - rgb2.b),2);
return Math.pow((rgb1.r - rgb2.r), 2) +

Check failure on line 591 in content/practices/high-contrast/high-contrast-practice.js

View workflow job for this annotation

GitHub Actions / lint-js

Replace `·Math.pow((rgb1.r·-·rgb2.r)` with `·(⏎····Math.pow(rgb1.r·-·rgb2.r`

Check failure on line 591 in content/practices/high-contrast/high-contrast-practice.js

View workflow job for this annotation

GitHub Actions / lint-js

Replace `·Math.pow((rgb1.r·-·rgb2.r)` with `·(⏎····Math.pow(rgb1.r·-·rgb2.r`
Math.pow((rgb1.g - rgb2.g), 2) +

Check failure on line 592 in content/practices/high-contrast/high-contrast-practice.js

View workflow job for this annotation

GitHub Actions / lint-js

Replace `·········Math.pow((rgb1.g·-·rgb2.g)` with `····Math.pow(rgb1.g·-·rgb2.g`

Check failure on line 592 in content/practices/high-contrast/high-contrast-practice.js

View workflow job for this annotation

GitHub Actions / lint-js

Replace `·········Math.pow((rgb1.g·-·rgb2.g)` with `····Math.pow(rgb1.g·-·rgb2.g`
Math.pow((rgb1.b - rgb2.b), 2);

Check failure on line 593 in content/practices/high-contrast/high-contrast-practice.js

View workflow job for this annotation

GitHub Actions / lint-js

Replace `·········Math.pow((rgb1.b·-·rgb2.b),·2);` with `····Math.pow(rgb1.b·-·rgb2.b,·2)`

Check failure on line 593 in content/practices/high-contrast/high-contrast-practice.js

View workflow job for this annotation

GitHub Actions / lint-js

Replace `·········Math.pow((rgb1.b·-·rgb2.b),·2);` with `····Math.pow(rgb1.b·-·rgb2.b,·2)`

Check failure on line 594 in content/practices/high-contrast/high-contrast-practice.js

View workflow job for this annotation

GitHub Actions / lint-js

Insert `··);`

Check failure on line 594 in content/practices/high-contrast/high-contrast-practice.js

View workflow job for this annotation

GitHub Actions / lint-js

Insert `··);`
}

Expand Down

0 comments on commit 764061a

Please sign in to comment.