diff --git a/internal/lint-configs/eslint-config/src/configs/vue.ts b/internal/lint-configs/eslint-config/src/configs/vue.ts index d1c6521c..a64c55af 100644 --- a/internal/lint-configs/eslint-config/src/configs/vue.ts +++ b/internal/lint-configs/eslint-config/src/configs/vue.ts @@ -10,7 +10,15 @@ export async function vue(): Promise { interopDefault(import('@typescript-eslint/parser')), ] as const); + const flatEssential = pluginVue.configs?.['flat/essential'] || []; + const flatStronglyRecommended = + pluginVue.configs?.['flat/strongly-recommended'] || []; + const flatRecommended = pluginVue.configs?.['flat/recommended'] || []; + return [ + ...flatEssential, + ...flatStronglyRecommended, + ...flatRecommended, { files: ['**/*.vue'], languageOptions: { @@ -43,12 +51,9 @@ export async function vue(): Promise { plugins: { vue: pluginVue, }, - processor: pluginVue.processors['.vue'], + processor: pluginVue.processors?.['.vue'], rules: { - ...pluginVue.configs.base.rules, - ...pluginVue.configs['vue3-essential'].rules, - ...pluginVue.configs['vue3-strongly-recommended'].rules, - ...pluginVue.configs['vue3-recommended'].rules, + ...pluginVue.configs?.base?.rules, 'vue/attribute-hyphenation': [ 'error', @@ -131,7 +136,6 @@ export async function vue(): Promise { 'vue/require-default-prop': 'error', 'vue/require-explicit-emits': 'error', 'vue/require-prop-types': 'off', - 'vue/script-setup-uses-vars': 'error', 'vue/singleline-html-element-content-newline': 'off', 'vue/space-infix-ops': 'error', 'vue/space-unary-ops': ['error', { nonwords: false, words: true }], diff --git a/internal/lint-configs/stylelint-config/index.mjs b/internal/lint-configs/stylelint-config/index.mjs index 7ef175cc..08ac8238 100644 --- a/internal/lint-configs/stylelint-config/index.mjs +++ b/internal/lint-configs/stylelint-config/index.mjs @@ -43,6 +43,7 @@ export default { 'stylelint-scss', ], rules: { + 'at-rule-no-deprecated': null, 'at-rule-no-unknown': [ true, { diff --git a/package.json b/package.json index 2b7c57d5..452dd503 100644 --- a/package.json +++ b/package.json @@ -110,7 +110,7 @@ "@ast-grep/napi": "catalog:", "@ctrl/tinycolor": "catalog:", "clsx": "catalog:", - "esbuild": "0.24.0", + "esbuild": "0.25.3", "pinia": "catalog:", "vue": "catalog:" }, diff --git a/packages/@core/base/shared/src/utils/inference.ts b/packages/@core/base/shared/src/utils/inference.ts index a9ace62c..195d071b 100644 --- a/packages/@core/base/shared/src/utils/inference.ts +++ b/packages/@core/base/shared/src/utils/inference.ts @@ -1,3 +1,4 @@ +// eslint-disable-next-line vue/prefer-import-from-vue import { isFunction, isObject, isString } from '@vue/shared'; /** diff --git a/packages/@core/ui-kit/menu-ui/src/components/menu.vue b/packages/@core/ui-kit/menu-ui/src/components/menu.vue index 7a737008..db4bda31 100644 --- a/packages/@core/ui-kit/menu-ui/src/components/menu.vue +++ b/packages/@core/ui-kit/menu-ui/src/components/menu.vue @@ -374,10 +374,10 @@ $namespace: vben; var(--menu-item-margin-x); font-size: var(--menu-font-size); color: var(--menu-item-color); - text-decoration: none; white-space: nowrap; - list-style: none; + text-decoration: none; cursor: pointer; + list-style: none; background: var(--menu-item-background-color); border: none; border-radius: var(--menu-item-radius); @@ -701,8 +701,8 @@ $namespace: vben; width: var(--menu-item-icon-size); height: var(--menu-item-icon-size); margin-right: 8px; - text-align: center; vertical-align: middle; + text-align: center; } } diff --git a/packages/@core/ui-kit/menu-ui/src/components/sub-menu-content.vue b/packages/@core/ui-kit/menu-ui/src/components/sub-menu-content.vue index 31eead11..5622d413 100644 --- a/packages/@core/ui-kit/menu-ui/src/components/sub-menu-content.vue +++ b/packages/@core/ui-kit/menu-ui/src/components/sub-menu-content.vue @@ -10,7 +10,7 @@ import { VbenIcon } from '@vben-core/shadcn-ui'; import { useMenuContext } from '../hooks'; interface Props extends MenuItemProps { - isMenuMore: boolean; + isMenuMore?: boolean; isTopLevelMenuSubmenu: boolean; level?: number; } diff --git a/packages/@core/ui-kit/shadcn-ui/src/components/segmented/segmented.vue b/packages/@core/ui-kit/shadcn-ui/src/components/segmented/segmented.vue index f1a8e570..25ad42e3 100644 --- a/packages/@core/ui-kit/shadcn-ui/src/components/segmented/segmented.vue +++ b/packages/@core/ui-kit/shadcn-ui/src/components/segmented/segmented.vue @@ -10,7 +10,7 @@ import TabsIndicator from './tabs-indicator.vue'; interface Props { defaultValue?: string; - tabs: SegmentedItem[]; + tabs?: SegmentedItem[]; } const props = withDefaults(defineProps(), { diff --git a/packages/effects/common-ui/src/components/captcha/hooks/useCaptchaPoints.ts b/packages/effects/common-ui/src/components/captcha/hooks/useCaptchaPoints.ts index 511fb3b7..a3f61fd6 100644 --- a/packages/effects/common-ui/src/components/captcha/hooks/useCaptchaPoints.ts +++ b/packages/effects/common-ui/src/components/captcha/hooks/useCaptchaPoints.ts @@ -9,7 +9,7 @@ export function useCaptchaPoints() { } function clearPoints() { - points.splice(0, points.length); + points.splice(0); } return { addPoint, diff --git a/packages/effects/common-ui/src/components/json-viewer/style.scss b/packages/effects/common-ui/src/components/json-viewer/style.scss index 73ce22b9..47acb891 100644 --- a/packages/effects/common-ui/src/components/json-viewer/style.scss +++ b/packages/effects/common-ui/src/components/json-viewer/style.scss @@ -14,8 +14,8 @@ padding: 0 4px 2px; font-size: 0.9em; line-height: 0.9; - color: hsl(var(--secondary-foreground)); vertical-align: 2px; + color: hsl(var(--secondary-foreground)); cursor: pointer; user-select: none; background-color: hsl(var(--secondary)); @@ -65,7 +65,7 @@ &.jv-string { color: hsl(var(--primary)); - word-break: break-word; + overflow-wrap: break-word; white-space: normal; } } diff --git a/packages/effects/common-ui/src/components/resize/resize.vue b/packages/effects/common-ui/src/components/resize/resize.vue index aaf89eaf..e89ea8b8 100644 --- a/packages/effects/common-ui/src/components/resize/resize.vue +++ b/packages/effects/common-ui/src/components/resize/resize.vue @@ -1072,8 +1072,8 @@ watch( box-sizing: border-box; width: 100%; height: 100%; - content: ''; outline: 1px dashed #d6d6d6; + content: ''; } .resize-stick { diff --git a/packages/effects/common-ui/src/ui/authentication/login.vue b/packages/effects/common-ui/src/ui/authentication/login.vue index 08777c82..96d1e4aa 100644 --- a/packages/effects/common-ui/src/ui/authentication/login.vue +++ b/packages/effects/common-ui/src/ui/authentication/login.vue @@ -17,7 +17,7 @@ import Title from './auth-title.vue'; import ThirdPartyLogin from './third-party-login.vue'; interface Props extends AuthenticationProps { - formSchema: VbenFormSchema[]; + formSchema?: VbenFormSchema[]; } defineOptions({ diff --git a/packages/effects/common-ui/src/ui/authentication/register.vue b/packages/effects/common-ui/src/ui/authentication/register.vue index 1faa9607..69a69d4a 100644 --- a/packages/effects/common-ui/src/ui/authentication/register.vue +++ b/packages/effects/common-ui/src/ui/authentication/register.vue @@ -14,7 +14,7 @@ import { VbenButton } from '@vben-core/shadcn-ui'; import Title from './auth-title.vue'; interface Props { - formSchema: VbenFormSchema[]; + formSchema?: VbenFormSchema[]; /** * @zh_CN 是否处于加载处理状态 */ diff --git a/packages/effects/common-ui/src/ui/dashboard/analysis/analysis-charts-tabs.vue b/packages/effects/common-ui/src/ui/dashboard/analysis/analysis-charts-tabs.vue index 9c8cf203..453ee5cf 100644 --- a/packages/effects/common-ui/src/ui/dashboard/analysis/analysis-charts-tabs.vue +++ b/packages/effects/common-ui/src/ui/dashboard/analysis/analysis-charts-tabs.vue @@ -6,7 +6,7 @@ import { computed } from 'vue'; import { Tabs, TabsContent, TabsList, TabsTrigger } from '@vben-core/shadcn-ui'; interface Props { - tabs: TabOption[]; + tabs?: TabOption[]; } defineOptions({ diff --git a/packages/effects/common-ui/src/ui/dashboard/analysis/analysis-overview.vue b/packages/effects/common-ui/src/ui/dashboard/analysis/analysis-overview.vue index ea4d7bca..18c49295 100644 --- a/packages/effects/common-ui/src/ui/dashboard/analysis/analysis-overview.vue +++ b/packages/effects/common-ui/src/ui/dashboard/analysis/analysis-overview.vue @@ -12,7 +12,7 @@ import { } from '@vben-core/shadcn-ui'; interface Props { - items: AnalysisOverviewItem[]; + items?: AnalysisOverviewItem[]; } defineOptions({ diff --git a/packages/effects/common-ui/src/ui/dashboard/workbench/workbench-project.vue b/packages/effects/common-ui/src/ui/dashboard/workbench/workbench-project.vue index 0a3fb7c2..1df68647 100644 --- a/packages/effects/common-ui/src/ui/dashboard/workbench/workbench-project.vue +++ b/packages/effects/common-ui/src/ui/dashboard/workbench/workbench-project.vue @@ -10,7 +10,7 @@ import { } from '@vben-core/shadcn-ui'; interface Props { - items: WorkbenchProjectItem[]; + items?: WorkbenchProjectItem[]; title: string; } diff --git a/packages/effects/common-ui/src/ui/dashboard/workbench/workbench-quick-nav.vue b/packages/effects/common-ui/src/ui/dashboard/workbench/workbench-quick-nav.vue index 9eb517f9..ad5d90c9 100644 --- a/packages/effects/common-ui/src/ui/dashboard/workbench/workbench-quick-nav.vue +++ b/packages/effects/common-ui/src/ui/dashboard/workbench/workbench-quick-nav.vue @@ -10,7 +10,7 @@ import { } from '@vben-core/shadcn-ui'; interface Props { - items: WorkbenchQuickNavItem[]; + items?: WorkbenchQuickNavItem[]; title: string; } diff --git a/packages/effects/common-ui/src/ui/dashboard/workbench/workbench-todo.vue b/packages/effects/common-ui/src/ui/dashboard/workbench/workbench-todo.vue index 8aae81fe..90f20c1d 100644 --- a/packages/effects/common-ui/src/ui/dashboard/workbench/workbench-todo.vue +++ b/packages/effects/common-ui/src/ui/dashboard/workbench/workbench-todo.vue @@ -10,7 +10,7 @@ import { } from '@vben-core/shadcn-ui'; interface Props { - items: WorkbenchTodoItem[]; + items?: WorkbenchTodoItem[]; title: string; } diff --git a/packages/effects/common-ui/src/ui/dashboard/workbench/workbench-trends.vue b/packages/effects/common-ui/src/ui/dashboard/workbench/workbench-trends.vue index 358b210f..06f2a5e4 100644 --- a/packages/effects/common-ui/src/ui/dashboard/workbench/workbench-trends.vue +++ b/packages/effects/common-ui/src/ui/dashboard/workbench/workbench-trends.vue @@ -10,7 +10,7 @@ import { } from '@vben-core/shadcn-ui'; interface Props { - items: WorkbenchTrendItem[]; + items?: WorkbenchTrendItem[]; title: string; } diff --git a/packages/effects/layouts/src/basic/copyright/copyright.vue b/packages/effects/layouts/src/basic/copyright/copyright.vue index 8202076a..de49c7cd 100644 --- a/packages/effects/layouts/src/basic/copyright/copyright.vue +++ b/packages/effects/layouts/src/basic/copyright/copyright.vue @@ -1,8 +1,8 @@