Procházet zdrojové kódy

build(.gitignore): 移除 .eslintrc-auto-import.json

菲鸽 před 2 roky
rodič
revize
df66057fe3
3 změnil soubory, kde provedl 93 přidání a 2 odebrání
  1. 91 0
      .eslintrc-auto-import.json
  2. 0 1
      .gitignore
  3. 2 1
      vite.config.ts

+ 91 - 0
.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
+  }
+}

+ 0 - 1
.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 生成的类型文件

+ 2 - 1
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(),