chore(config): 更新格式化和 lint 配置,格式化部分文件

This commit was merged in pull request #10.
This commit is contained in:
2026-02-10 02:03:35 +08:00
parent 3c98ee0d47
commit 2c4951ff9b
7 changed files with 37 additions and 38 deletions

View File

@@ -11,6 +11,9 @@
"vueIndentScriptAndStyle": false, "vueIndentScriptAndStyle": false,
"bracketSameLine": false, "bracketSameLine": false,
"singleAttributePerLine": true, "singleAttributePerLine": true,
"experimentalSortPackageJson": false, "embeddedLanguageFormatting": "auto",
"experimentalSortPackageJson": true,
"experimentalSortImports": {},
"experimentalTailwindcss": {},
"ignorePatterns": [] "ignorePatterns": []
} }

View File

@@ -1,23 +1,17 @@
{ {
"$schema": "./node_modules/oxlint/configuration_schema.json", "$schema": "./node_modules/oxlint/configuration_schema.json",
"plugins": null, "plugins": [
"eslint",
"unicorn",
"vue",
"typescript",
"jsdoc",
"promise",
"vitest"
],
"categories": {}, "categories": {},
"rules": {}, "rules": {},
"settings": { "settings": {
"jsx-a11y": {
"polymorphicPropName": null,
"components": {},
"attributes": {}
},
"next": {
"rootDir": []
},
"react": {
"formComponents": [],
"linkComponents": [],
"version": null,
"componentWrapperFunctions": []
},
"jsdoc": { "jsdoc": {
"ignorePrivate": false, "ignorePrivate": false,
"ignoreInternal": false, "ignoreInternal": false,
@@ -37,4 +31,4 @@
}, },
"globals": {}, "globals": {},
"ignorePatterns": [] "ignorePatterns": []
} }

10
.vscode/settings.json vendored
View File

@@ -1,12 +1,14 @@
{ {
"oxc.fmt.configPath": ".oxfmtrc.json",
"editor.defaultFormatter": "oxc.oxc-vscode", "editor.defaultFormatter": "oxc.oxc-vscode",
"editor.formatOnSave": true, "editor.formatOnSave": true,
"editor.codeActionsOnSave": { // "editor.codeActionsOnSave": {
"source.fixAll.oxc": "always" // "source.fixAll.oxc": "always"
}, // },
"typescript.tsdk": "node_modules\\typescript\\lib", "typescript.tsdk": "node_modules\\typescript\\lib",
"[typescript]": { "[typescript]": {
"editor.defaultFormatter": "oxc.oxc-vscode" "editor.defaultFormatter": "oxc.oxc-vscode"
},
"[json]": {
"editor.defaultFormatter": "oxc.oxc-vscode"
} }
} }

View File

@@ -96,7 +96,7 @@ const onCreateCourseGreenSubmit = async (
BaseResponse<resp.gen.GBVideoCreate> BaseResponse<resp.gen.GBVideoCreate>
>('App.Digital_VideoTask.Create', payload) >('App.Digital_VideoTask.Create', payload)
.then((res) => { .then((res) => {
if (!!res.data.task_id) { if (res.data.task_id) {
toast.add({ toast.add({
title: '创建成功', title: '创建成功',
description: '视频已加入生成队列', description: '视频已加入生成队列',

View File

@@ -135,10 +135,10 @@ onMounted(async () => {
</script> </script>
<template> <template>
<div class="relative grid w-full min-h-screen"> <div class="relative grid min-h-screen w-full">
<header> <header>
<h1 class="inline-flex flex-col"> <h1 class="inline-flex flex-col">
<span class="text-lg text-neutral-600 dark:text-neutral-300 font-bold"> <span class="text-lg font-bold text-neutral-600 dark:text-neutral-300">
AIGC 微课视频研创平台 AIGC 微课视频研创平台
</span> </span>
<!-- <span class="text-xs text-neutral-600 dark:text-neutral-300">眩生花科技</span> --> <!-- <span class="text-xs text-neutral-600 dark:text-neutral-300">眩生花科技</span> -->
@@ -198,7 +198,7 @@ onMounted(async () => {
</UBadge> </UBadge>
</p> </p>
<p <p
class="truncate whitespace-nowrap max-w-40 font-medium text-gray-900 dark:text-white" class="max-w-40 truncate whitespace-nowrap font-medium text-gray-900 dark:text-white"
> >
{{ loginState.user?.username }} {{ loginState.user?.username }}
</p> </p>
@@ -208,7 +208,7 @@ onMounted(async () => {
<span class="truncate">{{ item.label }}</span> <span class="truncate">{{ item.label }}</span>
<UIcon <UIcon
:name="item.icon" :name="item.icon"
class="flex-shrink-0 h-4 w-4 text-gray-400 dark:text-gray-500 ms-auto" class="ms-auto size-4 flex-shrink-0 text-gray-400 dark:text-gray-500"
/> />
</template> </template>
</UDropdown> </UDropdown>
@@ -230,7 +230,7 @@ onMounted(async () => {
<style> <style>
body { body {
@apply bg-neutral-50 dark:bg-neutral-950 bg-fixed; @apply bg-neutral-50 bg-fixed dark:bg-neutral-950;
/* @apply bg-[url('~/assets/background-pattern.svg')] dark:bg-[url('~/assets/background-pattern-dark.svg')]; */ /* @apply bg-[url('~/assets/background-pattern.svg')] dark:bg-[url('~/assets/background-pattern-dark.svg')]; */
} }
@@ -271,10 +271,10 @@ body {
<style scoped> <style scoped>
header { header {
@apply fixed inset-x-0 h-16 bg-white border-b z-30; @apply fixed inset-x-0 z-30 h-16 border-b bg-white;
@apply dark:bg-neutral-900 dark:border-neutral-800; @apply dark:border-neutral-800 dark:bg-neutral-900;
@apply flex flex-row items-center justify-between px-4; @apply flex flex-row items-center justify-between px-4;
@apply bg-opacity-50 dark:bg-opacity-50 backdrop-blur-3xl backdrop-saturate-150; @apply bg-opacity-50 backdrop-blur-3xl backdrop-saturate-150 dark:bg-opacity-50;
} }
main { main {
@@ -282,8 +282,8 @@ main {
} }
footer { footer {
@apply h-16 bg-white border-t z-30; @apply z-30 h-16 border-t bg-white;
@apply dark:bg-neutral-900 dark:border-neutral-800; @apply dark:border-neutral-800 dark:bg-neutral-900;
@apply flex flex-row items-center justify-between px-4; @apply flex flex-row items-center justify-between px-4;
} }
</style> </style>

View File

@@ -58,11 +58,11 @@ onMounted(() => {
</script> </script>
<template> <template>
<div class="w-full flex relative"> <div class="relative flex w-full">
<div <div
class="absolute -translate-x-full md:sticky md:translate-x-0 z-10 flex flex-col h-[calc(100vh-4rem)] bg-neutral-100 dark:bg-neutral-900 p-4 w-full md:w-[300px] border-r border-neutral-200 dark:border-neutral-700 transition-all duration-300 ease-out" class="absolute z-10 flex h-[calc(100vh-4rem)] w-full -translate-x-full flex-col border-r border-neutral-200 bg-neutral-100 p-4 transition-all duration-300 ease-out md:sticky md:w-[300px] md:translate-x-0 dark:border-neutral-700 dark:bg-neutral-900"
> >
<div class="flex flex-col flex-1 overflow-auto overflow-x-hidden"> <div class="flex flex-1 flex-col overflow-auto overflow-x-hidden">
<div class="flex flex-col gap-1"> <div class="flex flex-col gap-1">
<ClientOnly> <ClientOnly>
<NavItem <NavItem
@@ -107,7 +107,7 @@ onMounted(() => {
.subpage-enter-from, .subpage-enter-from,
.subpage-leave-to { .subpage-leave-to {
@apply opacity-0 translate-x-4; @apply translate-x-4 opacity-0;
} }
.loading-screen-leave-active { .loading-screen-leave-active {

View File

@@ -12,7 +12,6 @@
"lint:fix": "oxlint --fix", "lint:fix": "oxlint --fix",
"postinstall": "nuxt prepare" "postinstall": "nuxt prepare"
}, },
"packageManager": "pnpm@10.22.0",
"dependencies": { "dependencies": {
"@ffmpeg/ffmpeg": "^0.12.15", "@ffmpeg/ffmpeg": "^0.12.15",
"@ffmpeg/util": "^0.12.2", "@ffmpeg/util": "^0.12.2",
@@ -59,5 +58,6 @@
"peerDependencies": { "peerDependencies": {
"dayjs": "^1.11.19", "dayjs": "^1.11.19",
"tailwindcss": "^3.4.7" "tailwindcss": "^3.4.7"
} },
"packageManager": "pnpm@10.22.0"
} }