Skip to content

Commit

Permalink
fix: module reference, close #2972
Browse files Browse the repository at this point in the history
  • Loading branch information
antfu committed Apr 14, 2023
1 parent 69be02c commit 7d001e3
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 3 deletions.
16 changes: 16 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ const { resolve } = require('node:path')

const restricted = [
'vue',
'@vue/reactivity',
'@vue/runtime-core',
'@vue/runtime-dom',
'@vue/composition-api',
'..',
'../..',
Expand Down Expand Up @@ -52,6 +55,19 @@ module.exports = {
],
},
},
{
files: ['packages/core/**/index.ts'],
rules: {
'no-restricted-imports': ['error',
{
paths: [
...restricted,
'@vueuse/core',
],
},
],
},
},
{
files: ['**/*.md', '**/*.md/*.*', 'demo.vue', 'demo.client.vue', 'scripts/*.ts', '*.test.ts'],
rules: {
Expand Down
2 changes: 1 addition & 1 deletion packages/core/useCssVar/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { useMutationObserver } from '@vueuse/core'
import { computed, ref, watch } from 'vue-demi'
import type { MaybeRefOrGetter } from '@vueuse/shared'
import { toValue } from '@vueuse/shared'
import { useMutationObserver } from '../useMutationObserver'
import type { ConfigurableWindow } from '../_configurable'
import { defaultWindow } from '../_configurable'
import type { MaybeElementRef } from '../unrefElement'
Expand Down
3 changes: 1 addition & 2 deletions packages/core/useIntersectionObserver/index.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import type { Ref } from 'vue-demi'
import { ref, watch } from 'vue-demi'
import { computed, ref, watch } from 'vue-demi'
import type { MaybeRefOrGetter, Pausable } from '@vueuse/shared'
import { noop, notNullish, toValue, tryOnScopeDispose } from '@vueuse/shared'
import { computed } from '@vue/reactivity'
import type { ConfigurableWindow } from '../_configurable'
import { defaultWindow } from '../_configurable'
import type { MaybeComputedElementRef, MaybeElement } from '../unrefElement'
Expand Down

0 comments on commit 7d001e3

Please sign in to comment.