fix: auto-import自动导入eslint报未定义错误

Former-commit-id: 5aafa2907d8045ebdbe45d63d52317ea25a238f9
This commit is contained in:
haoxr
2023-01-15 10:36:14 +08:00
parent 3a24f39649
commit 3c38628218
8 changed files with 276 additions and 22 deletions

View File

@@ -45,6 +45,12 @@ export default defineConfig(({ mode }: ConfigEnv): UserConfig => {
AutoImport({
// 自动导入 Vue 相关函数ref, reactive, toRef 等
imports: ['vue', '@vueuse/core'],
//
eslintrc: {
enabled: true,
filepath: './.eslintrc-auto-import.json',
globalsPropValue: true
},
resolvers: [
// 自动导入 Element Plus 相关函数ElMessage, ElMessageBox... (带样式)
ElementPlusResolver(),