chore(eslint): config and fix eslint rules (#340)

* chore(eslint): init & config eslint

Signed-off-by: Stefan Dej <meteyou@gmail.com>

* chore(eslint): fix eslint rules

Signed-off-by: Stefan Dej <meteyou@gmail.com>
This commit is contained in:
Stefan Dej
2021-08-28 16:08:00 +02:00
committed by GitHub
parent b8c93bdb0f
commit f1094e9c29
153 changed files with 5586 additions and 5159 deletions

View File

@@ -6,7 +6,7 @@ import './plugins/longpress'
import store from '@/store'
import router from '@/plugins/router'
Vue.config.productionTip = false;
Vue.config.productionTip = false
// vue-observe-visibility
import VueObserveVisibility from 'vue-observe-visibility'
@@ -21,9 +21,9 @@ import VueLoadImage from 'vue-load-image'
Vue.component('vue-load-image', VueLoadImage)
//vue-toast-notification
import VueToast from 'vue-toast-notification';
import 'vue-toast-notification/dist/theme-sugar.css';
import {WebSocketPlugin} from "@/plugins/webSocketClient";
import VueToast from 'vue-toast-notification'
import 'vue-toast-notification/dist/theme-sugar.css'
import {WebSocketPlugin} from '@/plugins/webSocketClient'
//vue2-perfect-scrollbar
import PerfectScrollbar from 'vue2-perfect-scrollbar'
@@ -37,38 +37,38 @@ Vue.use(VueToast, {
//vue-echarts-ts
import { plugin } from 'echarts-for-vue'
import * as echarts from "echarts/core"
import * as echarts from 'echarts/core'
Vue.use(plugin, { echarts })
//load config.json and init vue
fetch('/config.json')
.then(res => res.json())
.then(file => {
store.commit('socket/setData', file)
.then(res => res.json())
.then(file => {
store.commit('socket/setData', file)
const url = store.getters['socket/getWebsocketUrl']
Vue.use(WebSocketPlugin, {
url: url,
store: store,
const url = store.getters['socket/getWebsocketUrl']
Vue.use(WebSocketPlugin, {
url: url,
store: store,
})
if (!store?.state?.socket?.remoteMode) Vue.$socket.connect()
new Vue({
vuetify,
router,
store,
i18n,
render: h => h(App)
}).$mount('#app')
})
.catch((error) => {
const p = document.createElement('p')
const content = document.createTextNode('config.json not found or cannot be decoded!')
p.appendChild(content)
document.getElementById('app')?.append(p)
window.console.error('Error:', error)
})
if (!store?.state?.socket?.remoteMode) Vue.$socket.connect()
new Vue({
vuetify,
router,
store,
i18n,
render: h => h(App)
}).$mount('#app')
})
.catch((error) => {
const p = document.createElement("p");
const content = document.createTextNode("config.json not found or cannot be decoded!");
p.appendChild(content);
document.getElementById('app')?.append(p);
window.console.error('Error:', error);
});