Skip to content

Commit

Permalink
Lint fixes for new xo
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonlong committed Feb 12, 2024
1 parent 531008d commit ec412f4
Showing 1 changed file with 8 additions and 10 deletions.
18 changes: 8 additions & 10 deletions src/iso.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,8 @@ const initUI = () => {
insertLocation = insertLocation.previousElementSibling
}

const btnGroup = document.createElement('div')
btnGroup.className = 'BtnGroup mt-1 ml-3 position-relative top-0 float-right'
const buttonGroup = document.createElement('div')
buttonGroup.className = 'BtnGroup mt-1 ml-3 position-relative top-0 float-right'

const squaresButton = document.createElement('button')
squaresButton.innerHTML = '2D'
Expand All @@ -106,9 +106,9 @@ const initUI = () => {
cubesButton.classList.add('selected')
}

btnGroup.append(squaresButton)
btnGroup.append(cubesButton)
insertLocation.before(btnGroup)
buttonGroup.append(squaresButton)
buttonGroup.append(cubesButton)
insertLocation.before(buttonGroup)

setContainerViewType(toggleSetting)
}
Expand Down Expand Up @@ -283,9 +283,7 @@ const loadStats = () => {

// Best day
dateBest = dateFormat.format(bestDay)
if (!dateBest) {
dateBest = 'No activity found'
}
dateBest ||= 'No activity found'

// Longest streak
if (streakLongest > 0) {
Expand All @@ -303,8 +301,8 @@ const loadStats = () => {
}

const rgbToHex = (rgb) => {
const sep = rgb.includes(',') ? ',' : ' '
rgb = rgb.slice(4).split(')')[0].split(sep)
const separator = rgb.includes(',') ? ',' : ' '
rgb = rgb.slice(4).split(')')[0].split(separator)

let r = Number(rgb[0]).toString(16)
let g = Number(rgb[1]).toString(16)
Expand Down

0 comments on commit ec412f4

Please sign in to comment.