[web] Lint source code

This commit is contained in:
Alain Nussbaumer 2024-03-31 21:50:33 +02:00
parent cbedb4d38c
commit 7b41980ace
6 changed files with 16 additions and 17 deletions

View File

@ -25,14 +25,14 @@
</template> </template>
<script> <script>
import NavbarTop from '@/components/NavbarTop.vue' import * as types from '@/store/mutation_types'
import NavbarBottom from '@/components/NavbarBottom.vue'
import NotificationList from '@/components/NotificationList.vue'
import ModalDialogRemotePairing from '@/components/ModalDialogRemotePairing.vue' import ModalDialogRemotePairing from '@/components/ModalDialogRemotePairing.vue'
import ModalDialogUpdate from '@/components/ModalDialogUpdate.vue' import ModalDialogUpdate from '@/components/ModalDialogUpdate.vue'
import webapi from '@/webapi' import NavbarBottom from '@/components/NavbarBottom.vue'
import * as types from '@/store/mutation_types' import NavbarTop from '@/components/NavbarTop.vue'
import NotificationList from '@/components/NotificationList.vue'
import ReconnectingWebSocket from 'reconnectingwebsocket' import ReconnectingWebSocket from 'reconnectingwebsocket'
import webapi from '@/webapi'
export default { export default {
name: 'App', name: 'App',

View File

@ -94,10 +94,9 @@ export default {
: (end = index - 1) : (end = index - 1)
} }
return -1 return -1
} else {
this.reset_scrolling()
return -1
} }
this.reset_scrolling()
return -1
}, },
lyrics() { lyrics() {
const raw = this.$store.state.lyrics.content const raw = this.$store.state.lyrics.content
@ -110,7 +109,7 @@ export default {
if (matches && matches[4]) { if (matches && matches[4]) {
const verse = { const verse = {
text: matches[4], text: matches[4],
time: matches[2] * 60 + matches[3] * 1 time: matches[2] * 60 + Number(matches[3])
} }
parsed.push(verse) parsed.push(verse)
} }

View File

@ -31,8 +31,8 @@ const characterIndex = (string = '') => {
return '⌘' return '⌘'
} }
export const numberIndex = (number) => { const numberIndex = (number) => {
return Math.floor(number / 10) Math.floor(number / 10)
} }
const times = [ const times = [

View File

@ -1,6 +1,6 @@
const toColor = (string) => { const toColor = (string) => {
var hash = 0 let hash = 0
for (var i = 0; i < string.length; i++) { for (let i = 0; i < string.length; i++) {
hash = string.charCodeAt(i) + ((hash << 5) - hash) hash = string.charCodeAt(i) + ((hash << 5) - hash)
} }
return (hash & 0x00ffffff).toString(16) return (hash & 0x00ffffff).toString(16)

View File

@ -1,13 +1,13 @@
import './mystyles.scss' import './mystyles.scss'
import App from './App.vue' import App from './App.vue'
import VueClickAway from 'vue3-click-away'
import VueLazyLoad from 'vue3-lazyload'
import VueProgressBar from '@aacassandra/vue3-progressbar'
import { createApp } from 'vue' import { createApp } from 'vue'
import { filters } from './filter' import { filters } from './filter'
import i18n from './i18n' import i18n from './i18n'
import { icons } from './icons' import { icons } from './icons'
import mdiVue from 'mdi-vue/v3' import mdiVue from 'mdi-vue/v3'
import VueClickAway from 'vue3-click-away'
import VueLazyLoad from 'vue3-lazyload'
import VueProgressBar from '@aacassandra/vue3-progressbar'
import { router } from './router' import { router } from './router'
import store from './store' import store from './store'

View File

@ -1,5 +1,5 @@
import { createStore } from 'vuex'
import * as types from './mutation_types' import * as types from './mutation_types'
import { createStore } from 'vuex'
export default createStore({ export default createStore({
state() { state() {