diff --git a/.lintstagedrc.mjs b/.lintstagedrc.mjs index e68d8a3e026..94b0192a75b 100644 --- a/.lintstagedrc.mjs +++ b/.lintstagedrc.mjs @@ -1,4 +1,10 @@ export default { + '*.md': ['prettier --cache --ignore-unknown --write'], + '*.vue': [ + 'prettier --write', + 'eslint --cache --fix', + 'stylelint --fix --allow-empty-input', + ], '*.{js,jsx,ts,tsx}': [ 'prettier --cache --ignore-unknown --write', 'eslint --cache --fix', @@ -7,14 +13,8 @@ export default { 'prettier --cache --ignore-unknown --write', 'stylelint --fix --allow-empty-input', ], - '*.md': ['prettier --cache --ignore-unknown --write'], - '*.vue': [ - 'prettier --write', - 'eslint --cache --fix', - 'stylelint --fix --allow-empty-input', - ], + 'package.json': ['prettier --cache --write'], '{!(package)*.json,*.code-snippets,.!(browserslist)*rc}': [ 'prettier --cache --write--parser json', ], - 'package.json': ['prettier --cache --write'], }; diff --git a/apps/web-antd/src/adapter/component/index.ts b/apps/web-antd/src/adapter/component/index.ts index a43a8280a8e..17436a83439 100644 --- a/apps/web-antd/src/adapter/component/index.ts +++ b/apps/web-antd/src/adapter/component/index.ts @@ -3,9 +3,10 @@ * 可用于 vben-form、vben-modal、vben-drawer 等组件使用, */ +import type { Component, SetupContext } from 'vue'; + import type { BaseFormComponentType } from '@vben/common-ui'; -import type { Component, SetupContext } from 'vue'; import { h } from 'vue'; import { ApiComponent, globalShareState, IconPicker } from '@vben/common-ui'; diff --git a/apps/web-antd/src/locales/index.ts b/apps/web-antd/src/locales/index.ts index 1972e06eede..7f32bd18ef3 100644 --- a/apps/web-antd/src/locales/index.ts +++ b/apps/web-antd/src/locales/index.ts @@ -1,7 +1,9 @@ -import type { LocaleSetupOptions, SupportedLanguagesType } from '@vben/locales'; import type { Locale } from 'ant-design-vue/es/locale'; import type { App } from 'vue'; + +import type { LocaleSetupOptions, SupportedLanguagesType } from '@vben/locales'; + import { ref } from 'vue'; import { diff --git a/apps/web-antd/src/views/dashboard/analytics/analytics-trends.vue b/apps/web-antd/src/views/dashboard/analytics/analytics-trends.vue index fadfc917c96..f1f0b232a62 100644 --- a/apps/web-antd/src/views/dashboard/analytics/analytics-trends.vue +++ b/apps/web-antd/src/views/dashboard/analytics/analytics-trends.vue @@ -1,11 +1,9 @@ diff --git a/packages/@core/ui-kit/shadcn-ui/src/ui/avatar/AvatarImage.vue b/packages/@core/ui-kit/shadcn-ui/src/ui/avatar/AvatarImage.vue index bac84a5c4ea..787eeeb7e2d 100644 --- a/packages/@core/ui-kit/shadcn-ui/src/ui/avatar/AvatarImage.vue +++ b/packages/@core/ui-kit/shadcn-ui/src/ui/avatar/AvatarImage.vue @@ -1,5 +1,7 @@ diff --git a/packages/@core/ui-kit/shadcn-ui/src/ui/avatar/avatar.ts b/packages/@core/ui-kit/shadcn-ui/src/ui/avatar/avatar.ts index b996415563b..8aae81f4925 100644 --- a/packages/@core/ui-kit/shadcn-ui/src/ui/avatar/avatar.ts +++ b/packages/@core/ui-kit/shadcn-ui/src/ui/avatar/avatar.ts @@ -1,4 +1,6 @@ -import { cva, type VariantProps } from 'class-variance-authority'; +import type { VariantProps } from 'class-variance-authority'; + +import { cva } from 'class-variance-authority'; export const avatarVariant = cva( 'inline-flex items-center justify-center font-normal text-foreground select-none shrink-0 bg-secondary overflow-hidden', diff --git a/packages/@core/ui-kit/shadcn-ui/src/ui/badge/Badge.vue b/packages/@core/ui-kit/shadcn-ui/src/ui/badge/Badge.vue index 729dc9dc3d3..818d404523f 100644 --- a/packages/@core/ui-kit/shadcn-ui/src/ui/badge/Badge.vue +++ b/packages/@core/ui-kit/shadcn-ui/src/ui/badge/Badge.vue @@ -1,7 +1,9 @@ diff --git a/packages/@core/ui-kit/shadcn-ui/src/ui/button/Button.vue b/packages/@core/ui-kit/shadcn-ui/src/ui/button/Button.vue index 7895d01060e..03e67803b18 100644 --- a/packages/@core/ui-kit/shadcn-ui/src/ui/button/Button.vue +++ b/packages/@core/ui-kit/shadcn-ui/src/ui/button/Button.vue @@ -1,9 +1,11 @@ diff --git a/packages/@core/ui-kit/shadcn-ui/src/ui/context-menu/ContextMenuItem.vue b/packages/@core/ui-kit/shadcn-ui/src/ui/context-menu/ContextMenuItem.vue index ed11878d4cd..aab42115da2 100644 --- a/packages/@core/ui-kit/shadcn-ui/src/ui/context-menu/ContextMenuItem.vue +++ b/packages/@core/ui-kit/shadcn-ui/src/ui/context-menu/ContextMenuItem.vue @@ -1,17 +1,14 @@ diff --git a/packages/@core/ui-kit/shadcn-ui/src/ui/context-menu/ContextMenuRadioGroup.vue b/packages/@core/ui-kit/shadcn-ui/src/ui/context-menu/ContextMenuRadioGroup.vue index bfed356d5f4..b757dd51667 100644 --- a/packages/@core/ui-kit/shadcn-ui/src/ui/context-menu/ContextMenuRadioGroup.vue +++ b/packages/@core/ui-kit/shadcn-ui/src/ui/context-menu/ContextMenuRadioGroup.vue @@ -1,11 +1,11 @@ diff --git a/packages/@core/ui-kit/shadcn-ui/src/ui/dialog/DialogContent.vue b/packages/@core/ui-kit/shadcn-ui/src/ui/dialog/DialogContent.vue index 9a8d73962c8..67bf64a688d 100644 --- a/packages/@core/ui-kit/shadcn-ui/src/ui/dialog/DialogContent.vue +++ b/packages/@core/ui-kit/shadcn-ui/src/ui/dialog/DialogContent.vue @@ -1,4 +1,6 @@ diff --git a/packages/@core/ui-kit/shadcn-ui/src/ui/dropdown-menu/DropdownMenu.vue b/packages/@core/ui-kit/shadcn-ui/src/ui/dropdown-menu/DropdownMenu.vue index 6a4328e63e5..12c20692b1e 100644 --- a/packages/@core/ui-kit/shadcn-ui/src/ui/dropdown-menu/DropdownMenu.vue +++ b/packages/@core/ui-kit/shadcn-ui/src/ui/dropdown-menu/DropdownMenu.vue @@ -1,10 +1,7 @@ diff --git a/packages/@core/ui-kit/shadcn-ui/src/ui/dropdown-menu/DropdownMenuItem.vue b/packages/@core/ui-kit/shadcn-ui/src/ui/dropdown-menu/DropdownMenuItem.vue index 3aac6678074..c8836d47bef 100644 --- a/packages/@core/ui-kit/shadcn-ui/src/ui/dropdown-menu/DropdownMenuItem.vue +++ b/packages/@core/ui-kit/shadcn-ui/src/ui/dropdown-menu/DropdownMenuItem.vue @@ -1,16 +1,14 @@ diff --git a/packages/@core/ui-kit/shadcn-ui/src/ui/form/index.ts b/packages/@core/ui-kit/shadcn-ui/src/ui/form/index.ts index 3e8467b25bc..1d45b2b4d86 100644 --- a/packages/@core/ui-kit/shadcn-ui/src/ui/form/index.ts +++ b/packages/@core/ui-kit/shadcn-ui/src/ui/form/index.ts @@ -5,7 +5,7 @@ export { default as FormLabel } from './FormLabel.vue'; export { default as FormMessage } from './FormMessage.vue'; export { FORM_ITEM_INJECTION_KEY } from './injectionKeys'; export { + Form, Field as FormField, FieldArray as FormFieldArray, - Form, } from 'vee-validate'; diff --git a/packages/@core/ui-kit/shadcn-ui/src/ui/hover-card/HoverCard.vue b/packages/@core/ui-kit/shadcn-ui/src/ui/hover-card/HoverCard.vue index 6c4ac04fcea..f960699b966 100644 --- a/packages/@core/ui-kit/shadcn-ui/src/ui/hover-card/HoverCard.vue +++ b/packages/@core/ui-kit/shadcn-ui/src/ui/hover-card/HoverCard.vue @@ -1,10 +1,7 @@ diff --git a/packages/@core/ui-kit/shadcn-ui/src/ui/label/Label.vue b/packages/@core/ui-kit/shadcn-ui/src/ui/label/Label.vue index a4169355d68..ba6890a8656 100644 --- a/packages/@core/ui-kit/shadcn-ui/src/ui/label/Label.vue +++ b/packages/@core/ui-kit/shadcn-ui/src/ui/label/Label.vue @@ -1,11 +1,13 @@ diff --git a/packages/@core/ui-kit/shadcn-ui/src/ui/radio-group/RadioGroup.vue b/packages/@core/ui-kit/shadcn-ui/src/ui/radio-group/RadioGroup.vue index 35c48701b0e..0bdcafc3c85 100644 --- a/packages/@core/ui-kit/shadcn-ui/src/ui/radio-group/RadioGroup.vue +++ b/packages/@core/ui-kit/shadcn-ui/src/ui/radio-group/RadioGroup.vue @@ -1,16 +1,13 @@ diff --git a/packages/@core/ui-kit/shadcn-ui/src/ui/select/SelectLabel.vue b/packages/@core/ui-kit/shadcn-ui/src/ui/select/SelectLabel.vue index 598426865f7..0dd694f80ca 100644 --- a/packages/@core/ui-kit/shadcn-ui/src/ui/select/SelectLabel.vue +++ b/packages/@core/ui-kit/shadcn-ui/src/ui/select/SelectLabel.vue @@ -1,9 +1,11 @@