Skip to content

Commit ec412f4

Browse files
committed
Lint fixes for new xo
1 parent 531008d commit ec412f4

File tree

1 file changed

+8
-10
lines changed

1 file changed

+8
-10
lines changed

src/iso.js

+8-10
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,8 @@ const initUI = () => {
8585
insertLocation = insertLocation.previousElementSibling
8686
}
8787

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

9191
const squaresButton = document.createElement('button')
9292
squaresButton.innerHTML = '2D'
@@ -106,9 +106,9 @@ const initUI = () => {
106106
cubesButton.classList.add('selected')
107107
}
108108

109-
btnGroup.append(squaresButton)
110-
btnGroup.append(cubesButton)
111-
insertLocation.before(btnGroup)
109+
buttonGroup.append(squaresButton)
110+
buttonGroup.append(cubesButton)
111+
insertLocation.before(buttonGroup)
112112

113113
setContainerViewType(toggleSetting)
114114
}
@@ -283,9 +283,7 @@ const loadStats = () => {
283283

284284
// Best day
285285
dateBest = dateFormat.format(bestDay)
286-
if (!dateBest) {
287-
dateBest = 'No activity found'
288-
}
286+
dateBest ||= 'No activity found'
289287

290288
// Longest streak
291289
if (streakLongest > 0) {
@@ -303,8 +301,8 @@ const loadStats = () => {
303301
}
304302

305303
const rgbToHex = (rgb) => {
306-
const sep = rgb.includes(',') ? ',' : ' '
307-
rgb = rgb.slice(4).split(')')[0].split(sep)
304+
const separator = rgb.includes(',') ? ',' : ' '
305+
rgb = rgb.slice(4).split(')')[0].split(separator)
308306

309307
let r = Number(rgb[0]).toString(16)
310308
let g = Number(rgb[1]).toString(16)

0 commit comments

Comments
 (0)