Skip to content

Files

Latest commit

 

History

History
38 lines (25 loc) · 964 Bytes

prefer-import-from-vue.md

File metadata and controls

38 lines (25 loc) · 964 Bytes

Pattern: Missing use of 'vue' import

Issue: -

Description

This rule aims to use imports from 'vue' instead of imports from '@vue/*'.

Imports from the following modules are almost always wrong. You should import from vue instead.

  • @vue/runtime-dom
  • @vue/runtime-core
  • @vue/reactivity
  • @vue/shared
/* ✓ GOOD */
import { createApp, ref, Component } from 'vue'
/* ✗ BAD */
import { createApp } from '@vue/runtime-dom'
import { Component } from '@vue/runtime-core'
import { ref } from '@vue/reactivity'

Further Reading