+
diff --git a/docs/.vitepress/config/plugins/demo-preview.ts b/docs/.vitepress/config/plugins/demo-preview.ts
index 03b1698ca..ba3863b0b 100644
--- a/docs/.vitepress/config/plugins/demo-preview.ts
+++ b/docs/.vitepress/config/plugins/demo-preview.ts
@@ -84,7 +84,7 @@ export const demoPreviewPlugin = (md: MarkdownRenderer) => {
return '';
}
const firstString = 'index.vue';
- childFiles = childFiles.sort((a, b) => {
+ childFiles = childFiles.toSorted((a, b) => {
if (a === firstString) return -1;
if (b === firstString) return 1;
return a.localeCompare(b, 'en', { sensitivity: 'base' });
diff --git a/docs/src/demos/vben-drawer/auto-height/drawer.vue b/docs/src/demos/vben-drawer/auto-height/drawer.vue
index 9ab433ccb..1b09723c2 100644
--- a/docs/src/demos/vben-drawer/auto-height/drawer.vue
+++ b/docs/src/demos/vben-drawer/auto-height/drawer.vue
@@ -32,7 +32,7 @@ function handleUpdate(len: number) {
{{ item }}
diff --git a/docs/src/demos/vben-modal/auto-height/modal.vue b/docs/src/demos/vben-modal/auto-height/modal.vue
index 8757d5ef0..e270df1ae 100644
--- a/docs/src/demos/vben-modal/auto-height/modal.vue
+++ b/docs/src/demos/vben-modal/auto-height/modal.vue
@@ -32,7 +32,7 @@ function handleUpdate(len: number) {
{{ item }}
diff --git a/internal/lint-configs/commitlint-config/index.mjs b/internal/lint-configs/commitlint-config/index.mjs
index 3d854399f..36c3b09ac 100644
--- a/internal/lint-configs/commitlint-config/index.mjs
+++ b/internal/lint-configs/commitlint-config/index.mjs
@@ -21,7 +21,7 @@ const scopeComplete = execSync('git status --porcelain || true')
.trim()
.split('\n')
.find((r) => ~r.indexOf('M src'))
- ?.replace(/(\/)/g, '%%')
+ ?.replaceAll(/(\/)/g, '%%')
?.match(/src%%((\w|-)*)/)?.[1]
?.replace(/s$/, '');
diff --git a/internal/lint-configs/eslint-config/src/configs/command.ts b/internal/lint-configs/eslint-config/src/configs/command.ts
index 67651b233..d0c902de2 100644
--- a/internal/lint-configs/eslint-config/src/configs/command.ts
+++ b/internal/lint-configs/eslint-config/src/configs/command.ts
@@ -3,7 +3,6 @@ import createCommand from 'eslint-plugin-command/config';
export async function command() {
return [
{
- // @ts-expect-error - no types
...createCommand(),
},
];
diff --git a/internal/lint-configs/eslint-config/src/configs/perfectionist.ts b/internal/lint-configs/eslint-config/src/configs/perfectionist.ts
index 136bfa332..4a7d12fe9 100644
--- a/internal/lint-configs/eslint-config/src/configs/perfectionist.ts
+++ b/internal/lint-configs/eslint-config/src/configs/perfectionist.ts
@@ -4,7 +4,6 @@ import { interopDefault } from '../util';
export async function perfectionist(): Promise
{
const perfectionistPlugin = await interopDefault(
- // @ts-expect-error - no types
import('eslint-plugin-perfectionist'),
);
diff --git a/internal/lint-configs/eslint-config/src/configs/turbo.ts b/internal/lint-configs/eslint-config/src/configs/turbo.ts
index 9f6bf75be..bcc27eb69 100644
--- a/internal/lint-configs/eslint-config/src/configs/turbo.ts
+++ b/internal/lint-configs/eslint-config/src/configs/turbo.ts
@@ -4,7 +4,6 @@ import { interopDefault } from '../util';
export async function turbo(): Promise {
const [pluginTurbo] = await Promise.all([
- // @ts-expect-error - no types
interopDefault(import('eslint-config-turbo')),
] as const);
diff --git a/internal/lint-configs/eslint-config/src/configs/typescript.ts b/internal/lint-configs/eslint-config/src/configs/typescript.ts
index cff9aa4bc..2f6f97650 100644
--- a/internal/lint-configs/eslint-config/src/configs/typescript.ts
+++ b/internal/lint-configs/eslint-config/src/configs/typescript.ts
@@ -5,7 +5,6 @@ import { interopDefault } from '../util';
export async function typescript(): Promise {
const [pluginTs, parserTs] = await Promise.all([
interopDefault(import('@typescript-eslint/eslint-plugin')),
- // @ts-expect-error missing types
interopDefault(import('@typescript-eslint/parser')),
] as const);
@@ -27,11 +26,11 @@ export async function typescript(): Promise {
},
},
plugins: {
- '@typescript-eslint': pluginTs,
+ '@typescript-eslint': pluginTs as any,
},
rules: {
- ...pluginTs.configs['eslint-recommended'].overrides?.[0].rules,
- ...pluginTs.configs.strict.rules,
+ ...pluginTs.configs['eslint-recommended']?.overrides?.[0]?.rules,
+ ...pluginTs.configs.strict?.rules,
'@typescript-eslint/ban-ts-comment': [
'error',
{
diff --git a/internal/lint-configs/eslint-config/src/configs/vue.ts b/internal/lint-configs/eslint-config/src/configs/vue.ts
index a64c55aff..5db72992d 100644
--- a/internal/lint-configs/eslint-config/src/configs/vue.ts
+++ b/internal/lint-configs/eslint-config/src/configs/vue.ts
@@ -6,7 +6,6 @@ export async function vue(): Promise {
const [pluginVue, parserVue, parserTs] = await Promise.all([
interopDefault(import('eslint-plugin-vue')),
interopDefault(import('vue-eslint-parser')),
- // @ts-expect-error missing types
interopDefault(import('@typescript-eslint/parser')),
] as const);
diff --git a/internal/lint-configs/eslint-config/tsconfig.json b/internal/lint-configs/eslint-config/tsconfig.json
index b2ec3b61e..dbd3bcc8d 100644
--- a/internal/lint-configs/eslint-config/tsconfig.json
+++ b/internal/lint-configs/eslint-config/tsconfig.json
@@ -1,6 +1,9 @@
{
"$schema": "https://json.schemastore.org/tsconfig",
"extends": "@vben/tsconfig/node.json",
+ "compilerOptions": {
+ "moduleResolution": "bundler"
+ },
"include": ["src"],
"exclude": ["node_modules"]
}
diff --git a/internal/vite-config/src/config/application.ts b/internal/vite-config/src/config/application.ts
index f9808cc74..a5d33c604 100644
--- a/internal/vite-config/src/config/application.ts
+++ b/internal/vite-config/src/config/application.ts
@@ -114,7 +114,7 @@ function createCssOptions(injectGlobalScss = true): CSSOptions {
}
return content;
},
- api: 'modern',
+ // api: 'modern',
importers: [new NodePackageImporter()],
},
}
diff --git a/packages/@core/base/design/src/design-tokens/index.ts b/packages/@core/base/design/src/design-tokens/index.ts
index 2d031d81f..4bf1467d3 100644
--- a/packages/@core/base/design/src/design-tokens/index.ts
+++ b/packages/@core/base/design/src/design-tokens/index.ts
@@ -1,4 +1,2 @@
import './default.css';
import './dark.css';
-
-export {};
diff --git a/packages/@core/base/design/src/index.ts b/packages/@core/base/design/src/index.ts
index d7c05340c..952caef7a 100644
--- a/packages/@core/base/design/src/index.ts
+++ b/packages/@core/base/design/src/index.ts
@@ -4,5 +4,3 @@ import './css/global.css';
import './css/transition.css';
import './css/nprogress.css';
import './css/ui.css';
-
-export {};
diff --git a/packages/@core/preferences/src/preferences.ts b/packages/@core/preferences/src/preferences.ts
index 23c5f8bef..9ac8fb054 100644
--- a/packages/@core/preferences/src/preferences.ts
+++ b/packages/@core/preferences/src/preferences.ts
@@ -221,12 +221,8 @@ class PreferenceManager {
const dom = document.documentElement;
const COLOR_WEAK = 'invert-mode';
const COLOR_GRAY = 'grayscale-mode';
- colorWeakMode
- ? dom.classList.add(COLOR_WEAK)
- : dom.classList.remove(COLOR_WEAK);
- colorGrayMode
- ? dom.classList.add(COLOR_GRAY)
- : dom.classList.remove(COLOR_GRAY);
+ dom.classList.toggle(COLOR_WEAK, colorWeakMode);
+ dom.classList.toggle(COLOR_GRAY, colorGrayMode);
}
}
}
diff --git a/packages/@core/ui-kit/form-ui/src/form-render/form-field.vue b/packages/@core/ui-kit/form-ui/src/form-render/form-field.vue
index 86ca81661..53c731e72 100644
--- a/packages/@core/ui-kit/form-ui/src/form-render/form-field.vue
+++ b/packages/@core/ui-kit/form-ui/src/form-render/form-field.vue
@@ -339,7 +339,7 @@ onUnmounted(() => {
:is="FieldComponent"
ref="fieldComponentRef"
:class="{
- 'border-destructive focus:border-destructive hover:border-destructive/80 focus:shadow-[0_0_0_2px_rgba(255,38,5,0.06)]':
+ 'border-destructive hover:border-destructive/80 focus:border-destructive focus:shadow-[0_0_0_2px_rgba(255,38,5,0.06)]':
isInValid,
}"
v-bind="createComponentProps(slotProps)"
@@ -367,7 +367,7 @@ onUnmounted(() => {
diff --git a/packages/@core/ui-kit/form-ui/src/form-render/form-label.vue b/packages/@core/ui-kit/form-ui/src/form-render/form-label.vue
index 9af4c133d..44d002d9b 100644
--- a/packages/@core/ui-kit/form-ui/src/form-render/form-label.vue
+++ b/packages/@core/ui-kit/form-ui/src/form-render/form-label.vue
@@ -21,7 +21,7 @@ const props = defineProps();
- *
+ *
diff --git a/packages/@core/ui-kit/layout-ui/src/components/layout-content.vue b/packages/@core/ui-kit/layout-ui/src/components/layout-content.vue
index da39c1c58..1be778007 100644
--- a/packages/@core/ui-kit/layout-ui/src/components/layout-content.vue
+++ b/packages/@core/ui-kit/layout-ui/src/components/layout-content.vue
@@ -55,7 +55,7 @@ const style = computed((): CSSProperties => {
-
+
diff --git a/packages/@core/ui-kit/layout-ui/src/components/layout-footer.vue b/packages/@core/ui-kit/layout-ui/src/components/layout-footer.vue
index 129209dae..3793f9225 100644
--- a/packages/@core/ui-kit/layout-ui/src/components/layout-footer.vue
+++ b/packages/@core/ui-kit/layout-ui/src/components/layout-footer.vue
@@ -37,7 +37,7 @@ const style = computed((): CSSProperties => {
diff --git a/packages/@core/ui-kit/layout-ui/src/components/layout-header.vue b/packages/@core/ui-kit/layout-ui/src/components/layout-header.vue
index 534e4162c..fba07d4e6 100644
--- a/packages/@core/ui-kit/layout-ui/src/components/layout-header.vue
+++ b/packages/@core/ui-kit/layout-ui/src/components/layout-header.vue
@@ -64,7 +64,7 @@ const logoStyle = computed((): CSSProperties => {
diff --git a/packages/@core/ui-kit/shadcn-ui/src/components/back-top/back-top.vue b/packages/@core/ui-kit/shadcn-ui/src/components/back-top/back-top.vue
index 1f8b0bc77..8da6cde42 100644
--- a/packages/@core/ui-kit/shadcn-ui/src/components/back-top/back-top.vue
+++ b/packages/@core/ui-kit/shadcn-ui/src/components/back-top/back-top.vue
@@ -32,7 +32,7 @@ const { handleClick, visible } = useBackTop(props);