From df66057fe369f947e46b7d0dc4b1d6cf309d41e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8F=B2=E9=B8=BD?= <1020103647@qq.com> Date: Mon, 4 Mar 2024 21:16:36 +0800 Subject: [PATCH] =?UTF-8?q?build(.gitignore):=20=E7=A7=BB=E9=99=A4=20.esli?= =?UTF-8?q?ntrc-auto-import.json?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .eslintrc-auto-import.json | 91 ++++++++++++++++++++++++++++++++++++++ .gitignore | 1 - vite.config.ts | 3 +- 3 files changed, 93 insertions(+), 2 deletions(-) create mode 100644 .eslintrc-auto-import.json diff --git a/.eslintrc-auto-import.json b/.eslintrc-auto-import.json new file mode 100644 index 0000000..be77d70 --- /dev/null +++ b/.eslintrc-auto-import.json @@ -0,0 +1,91 @@ +{ + "globals": { + "Component": true, + "ComponentPublicInstance": true, + "ComputedRef": true, + "EffectScope": true, + "ExtractDefaultPropTypes": true, + "ExtractPropTypes": true, + "ExtractPublicPropTypes": true, + "InjectionKey": true, + "PropType": true, + "Ref": true, + "VNode": true, + "WritableComputedRef": true, + "computed": true, + "createApp": true, + "customRef": true, + "defineAsyncComponent": true, + "defineComponent": true, + "effectScope": true, + "getCurrentInstance": true, + "getCurrentScope": true, + "h": true, + "inject": true, + "isProxy": true, + "isReactive": true, + "isReadonly": true, + "isRef": true, + "markRaw": true, + "nextTick": true, + "onActivated": true, + "onAddToFavorites": true, + "onBackPress": true, + "onBeforeMount": true, + "onBeforeUnmount": true, + "onBeforeUpdate": true, + "onDeactivated": true, + "onError": true, + "onErrorCaptured": true, + "onHide": true, + "onLaunch": true, + "onLoad": true, + "onMounted": true, + "onNavigationBarButtonTap": true, + "onNavigationBarSearchInputChanged": true, + "onNavigationBarSearchInputClicked": true, + "onNavigationBarSearchInputConfirmed": true, + "onNavigationBarSearchInputFocusChanged": true, + "onPageNotFound": true, + "onPageScroll": true, + "onPullDownRefresh": true, + "onReachBottom": true, + "onReady": true, + "onRenderTracked": true, + "onRenderTriggered": true, + "onResize": true, + "onScopeDispose": true, + "onServerPrefetch": true, + "onShareAppMessage": true, + "onShareTimeline": true, + "onShow": true, + "onTabItemTap": true, + "onThemeChange": true, + "onUnhandledRejection": true, + "onUnload": true, + "onUnmounted": true, + "onUpdated": true, + "provide": true, + "reactive": true, + "readonly": true, + "ref": true, + "resolveComponent": true, + "shallowReactive": true, + "shallowReadonly": true, + "shallowRef": true, + "toRaw": true, + "toRef": true, + "toRefs": true, + "toValue": true, + "triggerRef": true, + "unref": true, + "useAttrs": true, + "useCssModule": true, + "useCssVars": true, + "useSlots": true, + "watch": true, + "watchEffect": true, + "watchPostEffect": true, + "watchSyncEffect": true + } +} diff --git a/.gitignore b/.gitignore index 257a781..2add81a 100644 --- a/.gitignore +++ b/.gitignore @@ -25,7 +25,6 @@ dist stats.html # unplugin-auto-import 生成的类型文件 auto-import.d.ts -.eslintrc-auto-import.json # unplugin-vue-components 生成的类型文件 components.d.ts # vite-plugin-uni-pages 生成的类型文件 diff --git a/vite.config.ts b/vite.config.ts index 04ca08a..d0f7df0 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -57,6 +57,7 @@ export default ({ command, mode }) => { UniLayouts(), UniPlatform(), UniManifest(), + // 自动安装 src/components 里面的组件为全局组件,非全局组件不要放到 src/components Components(), // UniXXX 需要在 Uni 之前引入 Uni(), @@ -74,7 +75,7 @@ export default ({ command, mode }) => { imports: ['vue', 'uni-app'], dts: 'src/auto-import.d.ts', dirs: ['src/hooks'], // 自动导入 hooks - eslintrc: { enabled: true }, + eslintrc: { enabled: false }, }), // viteCompression(),