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 7, 2024
1 parent d262c7e commit f7c43f4
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions content/practices/high-contrast/high-contrast-practice.js
Original file line number Diff line number Diff line change
Expand Up @@ -588,9 +588,10 @@ function computeDistance(hex1, hex2) {
g: parseInt(hex2.substring(5, 6), 16),
};

return Math.pow(rgb1.r - rgb2.r, 2) +
return (
Math.pow(rgb1.r - rgb2.r, 2) +
Math.pow(rgb1.g - rgb2.g, 2) +
Math.pow(rgb1.b - rgb2.b, 2);
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 All @@ -604,7 +605,7 @@ function computeDistance(hex1, hex2) {
* @return {String) see @desc
*/

function getHTMLColorName (systemColorName, colorHex) {
function getHTMLColorName(systemColorName, colorHex) {

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

View workflow job for this annotation

GitHub Actions / lint-js

Delete `⏎`

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

View workflow job for this annotation

GitHub Actions / lint-js

Delete `⏎`

// Check for transparent

Expand All @@ -620,9 +621,9 @@ function getHTMLColorName (systemColorName, colorHex) {
}

// See if shade of gray

if (colorHex.substring(1, 2) === colorHex.substring(3, 4) &&
colorHex.substring(1, 2) === colorHex.substring(5, 6)) {
if (
colorHex.substring(1, 2) === colorHex.substring(3, 4) &&
colorHex.substring(1, 2) === colorHex.substring(5, 6)) {

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

View workflow job for this annotation

GitHub Actions / lint-js

Replace `)·{⏎` with `⏎··)·{`

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

View workflow job for this annotation

GitHub Actions / lint-js

Replace `)·{⏎` with `⏎··)·{`

switch (colorHex[1]) {
case '0':
Expand Down

0 comments on commit f7c43f4

Please sign in to comment.