From 26f1911ff284176abc4ce08c9dc024ac15bd4a04 Mon Sep 17 00:00:00 2001 From: h_mo <596417202@qq.com> Date: Sat, 20 May 2023 18:43:22 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=96=B0=E5=A2=9E[unplugin-auto-import?= =?UTF-8?q?]=20=E8=87=AA=E5=8A=A8=E5=AF=BC=E5=85=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .eslintrc.cjs | 2 +- .gitignore | 4 +++- package.json | 1 + src/pages/about/index.vue | 3 --- src/pages/demo/index.vue | 1 - src/pages/index/index.vue | 2 -- src/pages/log/index.vue | 2 -- src/pages/login/index.vue | 6 ++---- src/pages/notFound/404.vue | 2 -- src/pagesA/list/test1/index.vue | 1 - src/pagesA/list/test2/index.vue | 1 - tsconfig.json | 12 ++++++++++-- vite.config.ts | 30 +++++++++++++++++++++++++++--- 13 files changed, 44 insertions(+), 23 deletions(-) diff --git a/.eslintrc.cjs b/.eslintrc.cjs index a84367b..53c7743 100644 --- a/.eslintrc.cjs +++ b/.eslintrc.cjs @@ -19,7 +19,7 @@ module.exports = { parser: '@typescript-eslint/parser', }, /**定义文件继承的子规范 */ - extends: ['eslint:recommended', 'plugin:vue/vue3-essential', 'plugin:@typescript-eslint/recommended'], + extends: ['eslint:recommended', 'plugin:vue/vue3-essential', 'plugin:@typescript-eslint/recommended','./.eslintrc-auto-import.json'], plugins: ['vue', '@typescript-eslint'], rules: { 'no-var': 'error', //要求使用 let 或 const 而不是 var diff --git a/.gitignore b/.gitignore index fb74d2f..932460e 100644 --- a/.gitignore +++ b/.gitignore @@ -8,4 +8,6 @@ *.log **/*.tsbuildinfo .eslintcache -pnpm-lock.yaml \ No newline at end of file +pnpm-lock.yaml +/.eslintrc-auto-import.json +/typings/ diff --git a/package.json b/package.json index ef3bc46..1a02791 100644 --- a/package.json +++ b/package.json @@ -89,6 +89,7 @@ "uni-read-pages-vite": "^0.0.6", "unocss": "^0.51.13", "unocss-preset-weapp": "^0.6.3", + "unplugin-auto-import": "^0.16.0", "vite": "^4.3.7" } } diff --git a/src/pages/about/index.vue b/src/pages/about/index.vue index b42d08b..78222c1 100644 --- a/src/pages/about/index.vue +++ b/src/pages/about/index.vue @@ -1,10 +1,7 @@