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 @@