My current approach involves using an async function to interpolate specific elements from the DOM, and while it is effective, I am unable to pass the lint verification. This has led me to seek out alternative solutions. Below is my existing code:
async mounted() {
let colorMap = interpolate(['#fffbfb', '#ff4141']);
let i
// eslint-disable-next-line no-constant-condition
while (true) {
let switchColor = false
for (i = 0; i < 100; i++) {
let group = this.blinkingGroup
if (!switchColor) {
colorMap = interpolate(['#ff4141', '#fffbfb']);
} else {
colorMap = interpolate(['#fffbfb', '#ff4141']);
}
group.forEach(value => {
try {
value.dom.style.stroke = colorMap(i * 0.01)
} catch (e) {
//console.log(e)
}
})
await new Promise(r => setTimeout(r, 10));
switchColor = true
}
}
}