diff --git a/.eslintrc-auto-import.json b/.eslintrc-auto-import.json new file mode 100644 index 0000000..aa088c0 --- /dev/null +++ b/.eslintrc-auto-import.json @@ -0,0 +1,76 @@ +{ + "globals": { + "Component": true, + "ComponentPublicInstance": true, + "ComputedRef": true, + "DirectiveBinding": true, + "EffectScope": true, + "ExtractDefaultPropTypes": true, + "ExtractPropTypes": true, + "ExtractPublicPropTypes": true, + "InjectionKey": true, + "MaybeRef": true, + "MaybeRefOrGetter": 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, + "onBeforeMount": true, + "onBeforeUnmount": true, + "onBeforeUpdate": true, + "onDeactivated": true, + "onErrorCaptured": true, + "onMounted": true, + "onRenderTracked": true, + "onRenderTriggered": true, + "onScopeDispose": true, + "onServerPrefetch": true, + "onUnmounted": true, + "onUpdated": true, + "onWatcherCleanup": 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, + "useId": true, + "useModel": true, + "useRoute": true, + "useRouter": true, + "useSlots": true, + "useTemplateRef": true, + "watch": true, + "watchEffect": true, + "watchPostEffect": true, + "watchSyncEffect": true + } +} diff --git a/.gitignore b/.gitignore index 7259aab..7317078 100644 --- a/.gitignore +++ b/.gitignore @@ -6,6 +6,8 @@ .yarn* .yarn/* .yarn/**/* +.idea/codeStyles +.idea/codeStyles/* ### Git ### # Created by git for backups. To disable backups in Git: diff --git a/package.json b/package.json index 6c793db..1b5d75a 100644 --- a/package.json +++ b/package.json @@ -19,6 +19,7 @@ "@babel/types": "^7.24.7", "@types/node": "^20.14.10", "@vitejs/plugin-vue": "^5.0.5", + "@vue/compiler-sfc": "^3.5.12", "@vue/eslint-config-typescript": "^13.0.0", "eslint": "^8.57.0", "eslint-config-standard": "^17.1.0", diff --git a/src/auto-imports.d.ts b/src/auto-imports.d.ts index 7c9f508..15741ac 100644 --- a/src/auto-imports.d.ts +++ b/src/auto-imports.d.ts @@ -37,6 +37,7 @@ declare global { const onServerPrefetch: typeof import('vue')['onServerPrefetch'] const onUnmounted: typeof import('vue')['onUnmounted'] const onUpdated: typeof import('vue')['onUpdated'] + const onWatcherCleanup: typeof import('vue')['onWatcherCleanup'] const provide: typeof import('vue')['provide'] const reactive: typeof import('vue')['reactive'] const readonly: typeof import('vue')['readonly'] @@ -54,10 +55,13 @@ declare global { const useAttrs: typeof import('vue')['useAttrs'] const useCssModule: typeof import('vue')['useCssModule'] const useCssVars: typeof import('vue')['useCssVars'] + const useId: typeof import('vue')['useId'] const useLink: typeof import('vue-router')['useLink'] - const useRoute: typeof import('vue-router')['useRoute'] - const useRouter: typeof import('vue-router')['useRouter'] + const useModel: typeof import('vue')['useModel'] + const useRoute: typeof import('vue-router/auto')['useRoute'] + const useRouter: typeof import('vue-router/auto')['useRouter'] const useSlots: typeof import('vue')['useSlots'] + const useTemplateRef: typeof import('vue')['useTemplateRef'] const watch: typeof import('vue')['watch'] const watchEffect: typeof import('vue')['watchEffect'] const watchPostEffect: typeof import('vue')['watchPostEffect'] @@ -66,7 +70,7 @@ declare global { // for type re-export declare global { // @ts-ignore - export type { Component, ComponentPublicInstance, ComputedRef, ExtractDefaultPropTypes, ExtractPropTypes, ExtractPublicPropTypes, InjectionKey, PropType, Ref, VNode, WritableComputedRef } from 'vue' + export type { Component, ComponentPublicInstance, ComputedRef, DirectiveBinding, ExtractDefaultPropTypes, ExtractPropTypes, ExtractPublicPropTypes, InjectionKey, PropType, Ref, MaybeRef, MaybeRefOrGetter, VNode, WritableComputedRef } from 'vue' import('vue') } // for vue template auto import @@ -93,8 +97,6 @@ declare module 'vue' { readonly nextTick: UnwrapRef readonly onActivated: UnwrapRef readonly onBeforeMount: UnwrapRef - readonly onBeforeRouteLeave: UnwrapRef - readonly onBeforeRouteUpdate: UnwrapRef readonly onBeforeUnmount: UnwrapRef readonly onBeforeUpdate: UnwrapRef readonly onDeactivated: UnwrapRef @@ -106,6 +108,7 @@ declare module 'vue' { readonly onServerPrefetch: UnwrapRef readonly onUnmounted: UnwrapRef readonly onUpdated: UnwrapRef + readonly onWatcherCleanup: UnwrapRef readonly provide: UnwrapRef readonly reactive: UnwrapRef readonly readonly: UnwrapRef @@ -123,72 +126,12 @@ declare module 'vue' { readonly useAttrs: UnwrapRef readonly useCssModule: UnwrapRef readonly useCssVars: UnwrapRef - readonly useLink: UnwrapRef - readonly useRoute: UnwrapRef - readonly useRouter: UnwrapRef - readonly useSlots: UnwrapRef - readonly watch: UnwrapRef - readonly watchEffect: UnwrapRef - readonly watchPostEffect: UnwrapRef - readonly watchSyncEffect: UnwrapRef - } -} -declare module '@vue/runtime-core' { - interface GlobalComponents {} - interface ComponentCustomProperties { - readonly EffectScope: UnwrapRef - readonly computed: UnwrapRef - readonly createApp: UnwrapRef - readonly customRef: UnwrapRef - readonly defineAsyncComponent: UnwrapRef - readonly defineComponent: UnwrapRef - readonly effectScope: UnwrapRef - readonly getCurrentInstance: UnwrapRef - readonly getCurrentScope: UnwrapRef - readonly h: UnwrapRef - readonly inject: UnwrapRef - readonly isProxy: UnwrapRef - readonly isReactive: UnwrapRef - readonly isReadonly: UnwrapRef - readonly isRef: UnwrapRef - readonly markRaw: UnwrapRef - readonly nextTick: UnwrapRef - readonly onActivated: UnwrapRef - readonly onBeforeMount: UnwrapRef - readonly onBeforeRouteLeave: UnwrapRef - readonly onBeforeRouteUpdate: UnwrapRef - readonly onBeforeUnmount: UnwrapRef - readonly onBeforeUpdate: UnwrapRef - readonly onDeactivated: UnwrapRef - readonly onErrorCaptured: UnwrapRef - readonly onMounted: UnwrapRef - readonly onRenderTracked: UnwrapRef - readonly onRenderTriggered: UnwrapRef - readonly onScopeDispose: UnwrapRef - readonly onServerPrefetch: UnwrapRef - readonly onUnmounted: UnwrapRef - readonly onUpdated: UnwrapRef - readonly provide: UnwrapRef - readonly reactive: UnwrapRef - readonly readonly: UnwrapRef - readonly ref: UnwrapRef - readonly resolveComponent: UnwrapRef - readonly shallowReactive: UnwrapRef - readonly shallowReadonly: UnwrapRef - readonly shallowRef: UnwrapRef - readonly toRaw: UnwrapRef - readonly toRef: UnwrapRef - readonly toRefs: UnwrapRef - readonly toValue: UnwrapRef - readonly triggerRef: UnwrapRef - readonly unref: UnwrapRef - readonly useAttrs: UnwrapRef - readonly useCssModule: UnwrapRef - readonly useCssVars: UnwrapRef - readonly useLink: UnwrapRef - readonly useRoute: UnwrapRef - readonly useRouter: UnwrapRef + readonly useId: UnwrapRef + readonly useModel: UnwrapRef + readonly useRoute: UnwrapRef + readonly useRouter: UnwrapRef readonly useSlots: UnwrapRef + readonly useTemplateRef: UnwrapRef readonly watch: UnwrapRef readonly watchEffect: UnwrapRef readonly watchPostEffect: UnwrapRef diff --git a/src/typed-router.d.ts b/src/typed-router.d.ts index 6d6767c..331ee51 100644 --- a/src/typed-router.d.ts +++ b/src/typed-router.d.ts @@ -12,7 +12,7 @@ declare module 'vue-router/auto-routes' { ParamValueOneOrMore, ParamValueZeroOrMore, ParamValueZeroOrOne, - } from 'unplugin-vue-router/types' + } from 'vue-router' /** * Route name map generated by unplugin-vue-router diff --git a/yarn.lock b/yarn.lock index 9b52a3e..6386d82 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4578,6 +4578,7 @@ __metadata: "@mdi/font": "npm:7.4.47" "@types/node": "npm:^20.14.10" "@vitejs/plugin-vue": "npm:^5.0.5" + "@vue/compiler-sfc": "npm:^3.5.12" "@vue/eslint-config-typescript": "npm:^13.0.0" core-js: "npm:^3.37.1" eslint: "npm:^8.57.0"