Skip to content

Rule Proposal: disallow imports from @vue/* dependencies #1780

Closed
@jbhammon

Description

@jbhammon

Please describe what the rule should do:

Disallow or warn about imports from @vue/* dependencies. Particularly when using Vue CLI and the build target is a library.

What category should the rule belong to?

[ ] Enforces code style (layout)
[x] Warns about a potential error (problem)
[ ] Suggests an alternate way of doing something (suggestion)
[ ] Other (please specify:)

Provide 2-3 code examples that this rule should warn about:

<!-- Fail or Warn -->
import { computed } from "@vue/reactivity";

import {
  something,
  another,
} from "@vue/compiler-dom";
<!-- Pass -->
import { computed } from "vue";

Additional context

Full context can be found in this issue I opened in the core repo.

In short, using the @vue/reactivity import broke the components I was building for my UI library with Vue CLI and they were failing silently.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions