Lint: Fix linter errors

Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
Knut Ahlers 2021-07-11 16:32:52 +02:00
parent 09a296ea98
commit 91f29c3853
Signed by: luzifer
GPG key ID: 0066F03ED215AD7D

36
app.js
View file

@ -1,4 +1,4 @@
/* global axios, moment, Vue */ /* global axios, moment, Highcharts, Vue */
const twitchClientID = 'kf1i6vf07ihojqei5autfb52vwl586' const twitchClientID = 'kf1i6vf07ihojqei5autfb52vwl586'
@ -43,6 +43,7 @@ new Vue({
}, },
bucketSize() { bucketSize() {
/* eslint-disable sort-keys */
const tickSettings = { const tickSettings = {
604800: 600, 604800: 600,
86400: 120, 86400: 120,
@ -53,6 +54,7 @@ new Vue({
300: 5, 300: 5,
0: 1, 0: 1,
} }
/* eslint-enable sort-keys */
const timerangeSecs = Math.round((this.zoomArea.max - this.zoomArea.min) / 1000) const timerangeSecs = Math.round((this.zoomArea.max - this.zoomArea.min) / 1000)
for (const thresh of Object.keys(tickSettings).sort((b, a) => Number(a) - Number(b))) { for (const thresh of Object.keys(tickSettings).sort((b, a) => Number(a) - Number(b))) {
@ -80,14 +82,21 @@ new Vue({
enabled: false, enabled: false,
}, },
title: { series: [
text: 'Follows over Time', {
}, data: this.followCounts,
name: '',
},
],
subtitle: { subtitle: {
text: 'Click and drag in the plot area to zoom in / Shift + Drag to pan around', text: 'Click and drag in the plot area to zoom in / Shift + Drag to pan around',
}, },
title: {
text: 'Follows over Time',
},
xAxis: { xAxis: {
events: { events: {
afterSetExtremes: evt => this.updateZoomArea(evt), afterSetExtremes: evt => this.updateZoomArea(evt),
@ -104,13 +113,6 @@ new Vue({
text: '', text: '',
}, },
}, },
series: [
{
name: '',
data: this.followCounts,
},
],
} }
}, },
@ -173,15 +175,15 @@ new Vue({
protectedIDs: [], protectedIDs: [],
timespan: 2, timespan: 2,
timespanOpts: [ timespanOpts: [
{ value: 2, text: '2 days' }, { text: '2 days', value: 2 },
{ value: 7, text: '7 days' }, { text: '7 days', value: 7 },
{ value: 14, text: '14 days' }, { text: '14 days', value: 14 },
{ value: 30, text: '30 days' }, { text: '30 days', value: 30 },
], ],
twitchAuthorizedUserID: null,
twitchToken: null, twitchToken: null,
twitchUserID: null, twitchUserID: null,
twitchAuthorizedUserID: null,
zoomArea: { max: 0, min: 0 }, zoomArea: { max: 0, min: 0 },
} }
}, },
@ -204,7 +206,7 @@ new Vue({
} }
axios.put(`https://api.twitch.tv/helix/users/blocks?target_user_id=${toBlock[0].from_id}`, null, this.axiosOptions) axios.put(`https://api.twitch.tv/helix/users/blocks?target_user_id=${toBlock[0].from_id}`, null, this.axiosOptions)
.then(resp => { .then(() => {
Vue.set(toBlock[0], 'blocked', true) Vue.set(toBlock[0], 'blocked', true)
window.setTimeout(() => fn(), 100) window.setTimeout(() => fn(), 100)
}) })