chore(frontend): introduce prettier + eslint and prune unused code
- Add Prettier 3 with prettier-plugin-organize-imports (sorts/removes unused imports) - Add ESLint 10 flat config with typescript-eslint + eslint-plugin-vue + eslint-config-prettier - Add root scripts: format, format:check, lint, lint:fix - Reformat 257 files across admin-web, ops-web, desktop-client, packages - Remove unused locals/exports flagged by --noUnusedLocals/--noUnusedParameters - Fix duplicate localTabLabel key, surrogate-pair regex u-flag, NBSP literal in regex - Skip server/ (Go) and apps/browser-extension/ (deprecated per ADR) Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
+18
-19
@@ -1,4 +1,4 @@
|
||||
import { QueryClient, VueQueryPlugin } from "@tanstack/vue-query";
|
||||
import { QueryClient, VueQueryPlugin } from '@tanstack/vue-query'
|
||||
import {
|
||||
Alert,
|
||||
App as AntApp,
|
||||
@@ -28,15 +28,15 @@ import {
|
||||
Tag,
|
||||
Tooltip,
|
||||
message,
|
||||
} from "ant-design-vue";
|
||||
import { createApp } from "vue";
|
||||
} from 'ant-design-vue'
|
||||
import { createApp } from 'vue'
|
||||
|
||||
import App from "./App.vue";
|
||||
import { bindUnauthorizedHandler } from "@/lib/http";
|
||||
import { router } from "@/router";
|
||||
import { pinia } from "@/stores/pinia";
|
||||
import "./styles.css";
|
||||
import "ant-design-vue/dist/reset.css";
|
||||
import { bindUnauthorizedHandler } from '@/lib/http'
|
||||
import { router } from '@/router'
|
||||
import { pinia } from '@/stores/pinia'
|
||||
import 'ant-design-vue/dist/reset.css'
|
||||
import App from './App.vue'
|
||||
import './styles.css'
|
||||
|
||||
const queryClient = new QueryClient({
|
||||
defaultOptions: {
|
||||
@@ -46,16 +46,15 @@ const queryClient = new QueryClient({
|
||||
retry: false,
|
||||
},
|
||||
},
|
||||
});
|
||||
})
|
||||
|
||||
const app = createApp(App);
|
||||
const app = createApp(App)
|
||||
|
||||
bindUnauthorizedHandler(() => {
|
||||
void router.replace({ name: "login" });
|
||||
message.warning("登录已过期,请重新登录");
|
||||
});
|
||||
|
||||
[
|
||||
void router.replace({ name: 'login' })
|
||||
message.warning('登录已过期,请重新登录')
|
||||
})
|
||||
;[
|
||||
Alert,
|
||||
AntApp,
|
||||
Avatar,
|
||||
@@ -84,7 +83,7 @@ bindUnauthorizedHandler(() => {
|
||||
Tag,
|
||||
Tooltip,
|
||||
].forEach((component) => {
|
||||
app.use(component);
|
||||
});
|
||||
app.use(component)
|
||||
})
|
||||
|
||||
app.use(pinia).use(router).use(VueQueryPlugin, { queryClient }).mount("#app");
|
||||
app.use(pinia).use(router).use(VueQueryPlugin, { queryClient }).mount('#app')
|
||||
|
||||
Reference in New Issue
Block a user