chore(frontend): introduce prettier + eslint and prune unused code
Backend CI / Backend (push) Has been cancelled
Frontend CI / Frontend (push) Failing after 1m39s

- 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:
2026-05-01 20:39:09 +08:00
parent 21c7892ee4
commit 162abdc97c
258 changed files with 42261 additions and 37556 deletions
+33 -36
View File
@@ -1,6 +1,5 @@
import { createFromIconfontCN } from "@ant-design/icons-vue";
import { QueryClient, VueQueryPlugin } from "@tanstack/vue-query";
import { createApp } from "vue";
import { createFromIconfontCN } from '@ant-design/icons-vue'
import { QueryClient, VueQueryPlugin } from '@tanstack/vue-query'
import {
Alert,
App as AntApp,
@@ -26,38 +25,37 @@ import {
Modal,
Pagination,
Popconfirm,
Popover,
Progress,
Radio,
Result,
Row,
Select,
Skeleton,
Slider,
Space,
Spin,
Statistic,
Switch,
Steps,
Switch,
Table,
Tabs,
Tag,
Tree,
TimePicker,
Tooltip,
Upload,
Tree,
TreeSelect,
Popover,
Slider,
} from "ant-design-vue";
Upload,
} from 'ant-design-vue'
import { createApp } from 'vue'
import App from "./App.vue";
import { i18n } from "./i18n";
import { subscribeAuthExpired } from "./lib/session";
import { router } from "./router";
import { pinia } from "./stores/pinia";
import "./styles.css";
import "ant-design-vue/dist/reset.css";
import select from "ant-design-vue/es/select";
import tree from "ant-design-vue/es/tree";
import 'ant-design-vue/dist/reset.css'
import App from './App.vue'
import { i18n } from './i18n'
import { subscribeAuthExpired } from './lib/session'
import { router } from './router'
import { pinia } from './stores/pinia'
import './styles.css'
const queryClient = new QueryClient({
defaultOptions: {
@@ -67,31 +65,30 @@ const queryClient = new QueryClient({
retry: false,
},
},
});
})
const app = createApp(App);
const app = createApp(App)
subscribeAuthExpired(() => {
const current = router.currentRoute.value;
if (current.name === "login") {
return;
const current = router.currentRoute.value
if (current.name === 'login') {
return
}
void router.replace({
name: "login",
name: 'login',
query: current.fullPath ? { redirect: current.fullPath } : undefined,
});
});
})
})
const IconFont = createFromIconfontCN({
const IconFont = createFromIconfontCN({
// 需要替换为你自己真实项目的 js 地址,才能显示出你的 '#icon-line-global_undo'。
scriptUrl: "//at.alicdn.com/t/c/font_5154382_922oh81rh1.js",
});
app.component("IconFont", IconFont);
scriptUrl: '//at.alicdn.com/t/c/font_5154382_922oh81rh1.js',
})
app.component('IconFont', IconFont)
app.component("ATextarea", Input.TextArea);
[
app.component('ATextarea', Input.TextArea)
;[
Alert,
AntApp,
Avatar,
@@ -138,7 +135,7 @@ app.component("ATextarea", Input.TextArea);
TreeSelect,
Upload,
].forEach((component) => {
app.use(component);
});
app.use(component)
})
app.use(i18n).use(pinia).use(router).use(VueQueryPlugin, { queryClient }).mount("#app");
app.use(i18n).use(pinia).use(router).use(VueQueryPlugin, { queryClient }).mount('#app')