mirror of
https://github.com/ZeroCatDev/Classworks.git
synced 2026-02-05 00:13:10 +00:00
chore: add browser globals for eslint
Co-authored-by: Sunwuyuan <88357633+Sunwuyuan@users.noreply.github.com>
This commit is contained in:
parent
aa0a0550ca
commit
730db45387
@ -1,5 +1,6 @@
|
|||||||
import js from '@eslint/js'
|
import js from '@eslint/js'
|
||||||
import pluginVue from 'eslint-plugin-vue'
|
import pluginVue from 'eslint-plugin-vue'
|
||||||
|
import globals from 'globals'
|
||||||
|
|
||||||
export default [
|
export default [
|
||||||
{
|
{
|
||||||
@ -16,6 +17,13 @@ export default [
|
|||||||
...pluginVue.configs['flat/recommended'],
|
...pluginVue.configs['flat/recommended'],
|
||||||
|
|
||||||
{
|
{
|
||||||
|
languageOptions: {
|
||||||
|
globals: {
|
||||||
|
...globals.browser,
|
||||||
|
...globals.node,
|
||||||
|
...globals.serviceworker,
|
||||||
|
},
|
||||||
|
},
|
||||||
rules: {
|
rules: {
|
||||||
'vue/multi-word-component-names': 'off',
|
'vue/multi-word-component-names': 'off',
|
||||||
},
|
},
|
||||||
|
|||||||
@ -305,8 +305,6 @@ export default {
|
|||||||
return {isMobile: mobile};
|
return {isMobile: mobile};
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
const provider = getSetting("server.provider");
|
|
||||||
|
|
||||||
const settings = {
|
const settings = {
|
||||||
server: {
|
server: {
|
||||||
domain: getSetting("server.domain"),
|
domain: getSetting("server.domain"),
|
||||||
|
|||||||
@ -339,7 +339,7 @@
|
|||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { ref, computed, onMounted, onUnmounted, nextTick } from 'vue';
|
import { ref, computed, onMounted, onUnmounted, nextTick } from 'vue';
|
||||||
import { getSocket, getServerUrl, disconnect, on, off } from '@/utils/socketClient';
|
import { getSocket, getServerUrl, disconnect } from '@/utils/socketClient';
|
||||||
|
|
||||||
// 状态数据
|
// 状态数据
|
||||||
const serverUrl = ref(getServerUrl());
|
const serverUrl = ref(getServerUrl());
|
||||||
@ -582,7 +582,7 @@ function cleanupSocketListeners() {
|
|||||||
if (socket.io?.engine) {
|
if (socket.io?.engine) {
|
||||||
socket.io.engine.off('upgrade', onUpgrade);
|
socket.io.engine.off('upgrade', onUpgrade);
|
||||||
}
|
}
|
||||||
} catch (e) {
|
} catch {
|
||||||
// 忽略清理错误
|
// 忽略清理错误
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user